+
Skip to content

BlackBoyZeus/pegasusswitch

Repository files navigation

PegasusSwitch

A professional-grade video production switcher for content creators, streamers, TikTokers, YouTubers, and broadcasters.

License: MIT Status: Production Ready

Overview

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.

Key Features

  • 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

Use Cases

  • 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

Getting Started

Prerequisites

  • 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

Installation

From Source

# Clone the repository
git clone https://github.com/pegasusedge/pegasusswitch.git
cd pegasusswitch

# Build the project
cargo build --release

# Run PegasusSwitch
./target/release/pegasusswitch

Using Docker

# Pull the image
docker pull pegasusedge/pegasusswitch:latest

# Run the container
docker run -p 3030:3030 -p 1935:1935 pegasusedge/pegasusswitch:latest

Configuration

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

Web Interface

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

API Documentation

The REST API is available at http://localhost:3030/api with comprehensive documentation.

Basic API Usage

# 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"
  }'

Streaming Setup

Using OBS Studio

  1. Set Service to "Custom"
  2. Server: rtmp://localhost:1935/live
  3. Stream Key: your_stream_key

Using FFmpeg

ffmpeg -i input.mp4 -c:v libx264 -c:a aac -f flv rtmp://localhost:1935/live/your_stream_key

Attribution

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

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • 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.

About

PegasusSwitch - Professional video production switcher for content creators

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载