CasparCG-OBS Control Client
March 16, 2026 ยท View on GitHub
A Python GUI application for seamless integration between CasparCG media servers and OBS Studio. This client automates the complete workflow of transitioning OBS scenes, playing media through CasparCG, and transitioning backโall with precise timing control.
Caution
This project has never been tested in a production environment. Expect bugs and potential issues. The project is no longer maintained.
๐ฏ Key Features
Connection Management
- โ Dual Connection Monitoring: Real-time status for both CasparCG and OBS
- โ Auto-Reconnect: Attempts reconnection every 5 seconds on connection loss
- โ Visual Indicators: Green/red status dots for instant connection feedback
Media Management
- ๐ Media Library Browser: View all available media from CasparCG server
- ๐ผ๏ธ Thumbnail Support: Visual preview of media files (framework ready)
- ๐ Auto-Refresh: Media list updates every 60 seconds automatically
- โ ๏ธ Existence Validation: Visual warnings for missing media files
- ๐ฏ Drag & Drop Playlist: Intuitive playlist creation
Playback Control
- ๐ฌ Automated Workflow:
- Transition OBS to CasparCG scene
- Play media in CasparCG
- Monitor playback progress
- Transition back before video ends
- โฑ๏ธ Precise Timing: Configure exact moment for back-transition
- ๐ Real-Time Progress: Live playback position and time remaining
- ๐ Audio Levels: Visual audio level meters (via OSC)
- โฏ๏ธ Playback Controls: Play, stop, and navigation buttons
Settings & Persistence
- ๐พ Auto-Save: Settings and playlist saved automatically
- ๐ JSON Configuration: Easy to backup and share
- ๐ง Comprehensive Settings: Control all aspects of both systems
- ๐ผ Session Restoration: Automatically loads last configuration
User Interface
- ๐ Responsive Design: Scales to 1/3 screen width or full screen
- ๐จ Modern Qt Interface: Clean, professional appearance
- ๐ฑ Collapsible Panels: Hide sections for more workspace
- ๐ฑ๏ธ Intuitive Controls: Familiar drag-drop and click interactions
๐ Quick Start
Easiest Way - Use Run Script
macOS/Linux:
./run.sh
Windows:
run.bat
The script will automatically set up the virtual environment if needed and launch the application.
Manual Setup
-
Run Setup Script:
./setup.sh # macOS/Linux setup.bat # Windows -
Run Application:
source venv/bin/activate # Activate venv python main.py # Start app
๐ Requirements
Software
- Python 3.8+ (3.10 recommended)
- CasparCG Server 2.3+ (for media playback)
- OBS Studio 28+ with WebSocket plugin enabled
Python Dependencies
PyQt6- GUI frameworkobs-websocket-py- OBS controlpython-osc- OSC message handlingPillow- Image processingpyamcp- CasparCG AMCP protocol
All dependencies are installed automatically by the setup script.
โ๏ธ Configuration
First-Time Setup
-
Launch the application
-
Click "Settings" button in top bar
-
Configure OBS:
- Host: IP address of OBS machine (localhost for same machine)
- Port: WebSocket port (default: 4455)
- Password: Your OBS WebSocket password
- Transition: Name of transition to use (e.g., "Fade", "Cut")
- CasparCG Scene: OBS scene name where CasparCG output appears
-
Configure CasparCG:
- Host: IP address of CasparCG server
- Port: AMCP port (default: 5250)
- Channel: Video channel number (typically 1)
- Layer: Video layer (default: 10)
- OSC Port: Port for receiving feedback (default: 6250)
-
Configure Playback:
- Pre-transition time: Seconds before video ends to start transition back
-
Click OK to save and connect
OBS WebSocket Setup
- Open OBS Studio
- Go to Tools โ WebSocket Server Settings
- โ Enable WebSocket Server
- Note the port and set a password
- Click Apply
CasparCG OSC Setup
Ensure your CasparCG casparcg.config has OSC enabled:
<osc>
<default-port>6250</default-port>
<predefined-clients>
<predefined-client>
<address>127.0.0.1</address>
<port>6250</port>
</predefined-client>
</predefined-clients>
</osc>
๐ Usage
Adding Media to Playlist
- Click Refresh in Available Media panel
- Drag media files from Available Media list
- Drop into Playlist panel
- Playlist is automatically saved
Playing Media
Three ways to play:
- Double-click any item in playlist
- Single-click item, then click Play in Selected Media panel
- Select item and use big Play button
The Playback Workflow
When you play a media file:
- โ Client validates media exists on server
- ๐ฌ OBS transitions to configured CasparCG scene
- โถ๏ธ CasparCG starts playing the media file
- ๐ Real-time progress tracking via OSC
- โฑ๏ธ Before video ends (configured time), OBS transitions back
- โ Seamless return to previous scene
Monitoring Playback
The Currently Playing panel shows:
- ๐ผ๏ธ Media thumbnail
- ๐ Filename
- โฑ๏ธ Current time / Total duration
- ๐ Progress bar
- ๐ Audio level meters (2 channels)
- โน๏ธ Stop button
๐ Project Structure
caspar-client/
โโโ main.py # Main GUI application
โโโ casparcg_connection.py # CasparCG AMCP/OSC handler
โโโ obs_connection.py # OBS WebSocket handler
โโโ settings_manager.py # Configuration management
โโโ media_manager.py # Media library & playlist
โโโ playback_controller.py # Workflow orchestration
โโโ requirements.txt # Python dependencies
โโโ setup.sh / setup.bat # Setup scripts
โโโ run.sh / run.bat # Run scripts
โโโ README.md # This file
โโโ QUICKSTART.md # Quick start guide
โโโ ARCHITECTURE.md # Technical documentation
โโโ DEVELOPMENT.md # Development guide
โโโ .gitignore # Git ignore patterns
๐ Documentation
- QUICKSTART.md - Quick start guide and common tasks
- ARCHITECTURE.md - Technical architecture and design
- DEVELOPMENT.md - Development and testing guide
๐ง Troubleshooting
Connection Issues
CasparCG won't connect:
- โ Verify CasparCG Server is running
- โ Check correct IP and port in Settings
- โ
Test with:
telnet localhost 5250 - โ Check firewall settings
OBS won't connect:
- โ Verify OBS is running
- โ Enable WebSocket in OBS settings
- โ Check password is correct
- โ Verify port matches (default 4455)
Media Issues
No media files showing:
- โ Click Refresh button
- โ Verify CasparCG is connected (green dot)
- โ Check CasparCG media folder has files
- โ Verify correct channel in settings
Red text in playlist:
- โ ๏ธ Media file missing from CasparCG server
- โ Add file to CasparCG media folder
- โ Click Refresh to update status
Playback Issues
Transition doesn't work:
- โ Verify transition name matches OBS exactly
- โ Check scene name matches OBS scene
- โ Ensure OBS is connected (green dot)
No OSC feedback:
- โ Configure CasparCG OSC in config file
- โ Verify OSC port matches settings
- โ Check firewall allows UDP on OSC port
๐ ๏ธ Advanced Usage
Command Line Arguments (Future)
python main.py --config custom_settings.json
python main.py --debug
Keyboard Shortcuts (Framework Ready)
Space- Play selected mediaS- Stop playbackR- Refresh media listCtrl+Q- Quit application
๐ค Contributing
Contributions are welcome! Please see DEVELOPMENT.md for guidelines.
๐ License
This project is licensed under the MIT License.
๐ Acknowledgments
Built with:
- CasparCG - Professional graphics and video play-out software
- OBS Studio - Open broadcaster software
- PyQt6 - Python Qt bindings
- obs-websocket-py - OBS WebSocket Python client
๐ Support
For issues, questions, or suggestions:
- Check documentation files
- Review troubleshooting section
- Check CasparCG and OBS documentation
- Create an issue with detailed description
๐บ๏ธ Roadmap
-
Recheck if obs scene and transition are correctly configured by correct event
-
If client was restarted, but caspar still play video, after restart, client should check current scene in obs and if something is playing and execute missing steps of second transition
-
Before returning transition, recheck if on live is still casparcg scene - zrobiฤ poprzez callback obs
-
Usuล osc unsubscribe, bo niedostepne
-
Zrobiฤ coลผ z woลaniem wฤ tkรณw przy callbackach niepotrzebnym
-
Dodaj check przed playoutem, czy scena zdefiniowana w obs istnieje
-
jeลli nie wyjdzie odtwarzanie, to wyลwietl informacje dlaczego. Lub, ลผe doszลo do maualnego override itd.
-
Zamiast zamiany preview z live, wrzuฤ scenฤ z preview na live (zostaw jฤ rรณwnieลผ na preview)
-
reduce log verbosity
-
jakoล obsลuลผ bลฤdy np. gdy lista odลwieลผyลa siฤ niepoprawnie
-
Przy zamykaniu okno dialogowe, czy chcฤ zamknฤ ฤ. Jeลli odtwarzany jakiล film, nie moลผna zamknฤ ฤ aplikacji
-
execute python instructions md on whole project
-
Split project into modules (custom errors, eg.)
-
poprawiฤ te offsety, aby byลy z odpowiednimi instrukcjami itd.
GUI: dynamiczne przerzucanie kolumny z available mediami nad playlistฤ w zaleznosci od szerokosci