Play Random Video from Folder

Description

Play a random video from a folder using Streamer.bot (OBS WebSocket v5).

OBS WS v5

It is recommended that you use the actions in this import in a blocking queue.

Import File

Random_Video_from_Folder.sb (4.7 KB)

Installation

In Streamer.bot in select Import from the top left.
Download the Import File and drag and drop it into the Import String section.

You’ll receive two actions, one which has a Dynamic Delay built into it depending on how long the video is and the other uses a set delay, use whichever fits your needs more!

Configuration

Change the Set Argument Value for %randomVideoFolder% to the folder you want to use.

playRandomVideoSetArgumentRandomFolder

Change the Set Argument Value for %sourceName% to the name of your media source.

Update the Scene and Source values on the OBS Source Visibility State sub-actions to reflect the Scene and Source for your Media Source (This is an optional step, and these sub-actions can be removed if you do not wish to use them)

Optional Configuration Step

For the “Set Delay” action change the Delay to be greater than or equal to the longest clip in your random videos folder. This step is not needed for the “Dynamic Delay” action

The “playEachFileOnce” Set Argument sub-action is for whether files should all be played once before starting over. For example, you have File1, File2, and File3, it would have to randomly go through each file at least once before starting over again. The Value should be True or False.

The “noDirectRepeat” Set Argument sub-action determines whether the video that was played should have a chance of playing immediately again or not. If Value is set to True it will not repeat (unless there is only one file), if False then there will be a chance the video will repeat.

Contributors

3 Likes