Random Stinger Transition Script
A Lua script for OBS Studio that automatically randomizes stinger transition videos with intelligent rotation and per-video transition point support.
The established option for this (found here) is buggy and occasionally loads new stingers before the current selection is finished playing. This script fixes that issue and adds new functionality.
Features
- Smart Rotation - Ensures every stinger plays once before repeating
- Per-Video Transition Points - Automatically reads transition timing from filenames
- Selective Application - Choose which specific stinger transition to randomize
Installation
- Download RandomStingerCustom.lua (Right click this link → Save Link As...)
- In OBS Studio, go to Tools → Scripts
- Click the + button and select the script file
- Configure the settings (see below)
Setup
1. Set Up Your Stingers
Create a folder somewhere on your PC to hold your stingers.Include the transition point (in milliseconds) in your filename using the format
_XXXms:The number before ms tells OBS when to cut between scenes during the transition.
Examples:
- stinger_500ms.webm → Transition point at 500ms
- custom_750ms.mp4 → Transition point at 750ms
- transition300ms.webm → Transition point at 300ms (underscore optional)
2. Create a Stinger Transition
If you don't already have one:- In OBS, go to your Scene Transitions dock
- Click + and add a Stinger transition
- Name it (e.g., "Random")
3. Configure the Script
In the OBS Scripts window:- Stinger Video Folder - Select the folder containing your stinger videos
- Target Stinger Transition - Choose which Stinger transition to apply random videos to
- Click Refresh Video List to scan for videos
How It Works
- The script loads all stinger videos from your specified folder
- When you switch scenes using your target transition, it plays the current stinger
- After the transition completes, the script queues the next random stinger
- Videos are selected randomly from those that haven't been played yet
- Once all stingers have played, the rotation resets automatically
Controls
- Refresh Video List - Re-scan the folder for new stinger videos
- Reset Rotation - Mark all stingers as unplayed and start fresh
Logging
The script logs detailed information to the OBS log file:
- Which videos are found and their transition points
- Which stinger is selected for each transition
- How many unplayed stingers remain
- Rotation resets
Requirements
- OBS Studio 28.0 or later
- Stinger transition videos with timing in filenames