CYCLIC COMMERCIAL FOR OBS STUDIO
This script switches scenes continuously in an automated loop, without needing fixed time schedules:
Keeps the movie/main scene live for the configured duration (in minutes).
Automatically switches to the commercial scene.
Detects when the media source contained in that scene finishes playing.
Returns to the main movie scene and restarts the countdown cycle.
INSTALLATION / UPDATE
In OBS Studio, go to Tools > Scripts.
If updating, remove the old version of the script (using the - button).
Click + and select comercial_ciclo.lua from this version.
Set the exact names of your Movie Scene and Commercial Scene, as well as the interval in minutes.
IMPORTANT NOTES
The commercial video must be a Media Source inside the commercial scene.
Disable Loop/Repeat on the media source so it can trigger the "media ended" event properly.
The script detects media sources directly contained within the commercial scene.
Keep OBS Studio open with the main movie scene live to begin the countdown cycle.
Uses the default scene transition configured in OBS.
This script switches scenes continuously in an automated loop, without needing fixed time schedules:
Keeps the movie/main scene live for the configured duration (in minutes).
Automatically switches to the commercial scene.
Detects when the media source contained in that scene finishes playing.
Returns to the main movie scene and restarts the countdown cycle.
INSTALLATION / UPDATE
In OBS Studio, go to Tools > Scripts.
If updating, remove the old version of the script (using the - button).
Click + and select comercial_ciclo.lua from this version.
Set the exact names of your Movie Scene and Commercial Scene, as well as the interval in minutes.
IMPORTANT NOTES
The commercial video must be a Media Source inside the commercial scene.
Disable Loop/Repeat on the media source so it can trigger the "media ended" event properly.
The script detects media sources directly contained within the commercial scene.
Keep OBS Studio open with the main movie scene live to begin the countdown cycle.
Uses the default scene transition configured in OBS.