A professional-grade video production switcher for content creators, streamers, TikTokers, YouTubers, and broadcasters.
PegasusSwitch is a cutting-edge serverless video production switcher built with Rust and modern web technologies. Originally inspired by the rtmp-switcher project, PegasusSwitch has been completely modernized and enhanced with advanced features specifically designed for today's content creators.
- AI-Powered Content Generation: Generate video ideas, scripts, captions, and hooks tailored to your niche
- Multi-platform Publishing: Stream to YouTube, TikTok, Instagram, Twitch, and more simultaneously
- Advanced Scene Composition: Create complex layouts with multiple sources, overlays, and effects
- Professional Transitions: Cross-fade, wipe, push, zoom, and custom transition effects
- Real-time Analytics: Deep insights into your audience and stream performance
- Hardware Acceleration: Utilize GPU encoding for maximum performance
- Plugin System: Extend functionality with custom plugins and effects
- Web Interface: Control your production from any device with our modern web UI
- API Access: Integrate with other tools via comprehensive REST API
- Live Streaming: Create engaging multi-camera streams with professional transitions
- Virtual Events: Host conferences and webinars with remote guests
- Content Creation: Produce high-quality video content with multiple sources
- Podcast Production: Mix video and audio sources for professional podcasts
- Educational Content: Create interactive learning experiences
- Rust 1.70 or later
- GStreamer 1.22 or later with required plugins:
# macOS (using Homebrew) brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav # Ubuntu/Debian sudo apt-get install gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav
# Clone the repository
git clone https://github.com/pegasusedge/pegasusswitch.git
cd pegasusswitch
# Build the project
cargo build --release
# Run PegasusSwitch
./target/release/pegasusswitch
# Pull the image
docker pull pegasusedge/pegasusswitch:latest
# Run the container
docker run -p 3030:3030 -p 1935:1935 pegasusedge/pegasusswitch:latest
Create a config.toml
file in the application directory:
[server]
http_port = 3030
rtmp_port = 1935
host = "0.0.0.0"
[recording]
path = "./recordings"
format = "mp4"
[outputs]
# Define your streaming destinations
[outputs.twitch]
url = "rtmp://live.twitch.tv/app/YOUR_STREAM_KEY"
enabled = true
[outputs.youtube]
url = "rtmp://a.rtmp.youtube.com/live2/YOUR_STREAM_KEY"
enabled = false
Access the web interface at http://localhost:3030
to control your production:
- Sources Panel: Manage and monitor all input sources
- Scene Composer: Create and edit complex scene layouts
- Transitions: Select and customize transition effects
- Output Control: Manage streaming destinations and recording
The REST API is available at http://localhost:3030/api
with comprehensive documentation.
# Check server status
curl http://localhost:3030/health
# Get version information
curl http://localhost:3030/version
# Add a new source
curl -X POST http://localhost:3030/api/sources \
-H "Content-Type: application/json" \
-d '{
"name": "Camera 1",
"type": "rtmp",
"source": "rtmp://localhost:1935/live/stream1"
}'
# Switch between sources with transition
curl -X POST http://localhost:3030/api/mixer/transition \
-H "Content-Type: application/json" \
-d '{
"source_id": "camera1",
"transition_type": "fade"
}'
- Set Service to "Custom"
- Server:
rtmp://localhost:1935/live
- Stream Key:
your_stream_key
ffmpeg -i input.mp4 -c:v libx264 -c:a aac -f flv rtmp://localhost:1935/live/your_stream_key
PegasusSwitch is built upon the foundation of the original rtmp-switcher project by Erik St. Martin. We've completely modernized and enhanced the codebase with:
- Updated to Rust 2021 edition
- Modern dependency versions and architecture
- Advanced AI-powered features
- Professional video production capabilities
- Comprehensive API and web interface
- Plugin system for extensibility
- Enhanced performance and reliability
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Original rtmp-switcher project by Erik St. Martin
- GStreamer for the powerful multimedia framework
- Rust for the safe and efficient programming language
- All contributors who have helped shape this project
PegasusSwitch - Empowering content creators with professional video production tools.