Overview
Hyperscape streams gameplay to multiple RTMP destinations simultaneously using FFmpeg’s tee muxer for efficient single-encode multi-output.Supported Platforms
Active Platforms
- Twitch -
rtmp://live.twitch.tv/app - Kick -
rtmps://fa723fc1b171.global-contribute.live-video.net/app(RTMPS) - X/Twitter -
rtmp://sg.pscp.tv:80/x
Removed Platforms
- YouTube - Explicitly disabled (set
YOUTUBE_STREAM_KEY=""to prevent stale keys)
YouTube was removed from default streaming destinations in February 2026. To re-enable, set
YOUTUBE_STREAM_KEY and YOUTUBE_RTMP_URL.Configuration
Environment Variables
Get Stream Keys
Twitch:- Go to Twitch Dashboard
- Copy Primary Stream Key
- Set as
TWITCH_STREAM_KEY
- Go to Kick Creator Dashboard
- Navigate to Stream Settings
- Copy Stream Key
- Set as
KICK_STREAM_KEY
- Go to Media Studio
- Click Producer → Create Broadcast → Create Source
- Copy RTMP URL and Stream Key
- Set as
X_RTMP_URLandX_STREAM_KEY
Streaming Quality
Balanced Mode (Default)
Optimized for smooth playback and viewer experience:- Tune:
film(allows B-frames for better compression) - Buffer: 4x bitrate (18000k for 4500k bitrate)
- Lookahead: Better bitrate smoothing
- Use Case: Passive viewing, longer streams, unstable connections
Low Latency Mode
Optimized for minimal delay:- Tune:
zerolatency(no B-frames) - Buffer: 2x bitrate (9000k for 4500k bitrate)
- No lookahead: Immediate encoding
- Use Case: Interactive streams, live betting, viewer interaction
Quality Settings
Canonical Platform
The canonical platform determines default public delay for anti-cheat timing:youtube→ 15000ms delaytwitch→ 12000ms delayhls→ 4000ms delay
Set
STREAMING_PUBLIC_DELAY_MS=0 for live betting with no delay. This disables anti-cheat timing protection.Audio Configuration
Enable Audio Capture
Disable Audio
anullsrc).
FFmpeg Configuration
Complete Command
Input Buffering
Audio Buffering:Output Buffering
Kick RTMP URL Fix
Problem
Kick streaming used incorrect URL:Solution
Use proper IVS endpoint with RTMPS:- Kick uses AWS IVS (Interactive Video Service)
- Regional ingest endpoints (not generic domain)
- RTMPS (RTMP over TLS) for secure streaming
/apppath required
Stream Key Security
Masked Logging
Stream keys are masked in logs:Explicit Unset
Prevent stale stream keys from being used:Streaming Diagnostics
RTMP Status File
Check FFmpeg Processes
Check PM2 Logs
Troubleshooting
Stream Not Appearing
1. Check stream keys are set:- Twitch: dashboard.twitch.tv
- Kick: Creator Dashboard
- X: Media Studio
Audio Not in Stream
See Audio Streaming Troubleshooting.Buffering Issues
Increase buffer size:Connection Drops
Check network stability:High CPU Usage
Reduce encoding preset:Advanced Configuration
Custom RTMP Destination
JSON Fanout Config
For additional destinations:RTMP Multiplexer
Use a multiplexer service (Restream, Livepeer) for fanout:- Single stream to multiplexer
- Multiplexer fans out to all platforms
- Reduces server bandwidth and CPU usage
Local Testing
nginx-rtmp Server
Test RTMP streaming locally:Test Command
Production Deployment
PM2 Configuration
GitHub Secrets
Configure in Settings → Secrets → Actions:Deployment Script
Thescripts/deploy-vast.sh explicitly manages stream keys:
Monitoring
Stream Health
FFmpeg Stats
Platform Dashboards
Twitch:- Stream Manager
- Shows viewer count, bitrate, FPS
- Creator Dashboard
- Shows stream status and viewers
- Media Studio
- Shows broadcast status
Related Documentation
Audio Streaming
PulseAudio audio capture setup
Vast.ai Deployment
Complete Vast.ai deployment guide
Configuration
Environment variables and settings
Troubleshooting
Common issues and solutions