Live Streaming
Plinken includes a full live streaming system with three broadcast protocols, OBS-style Studio Mode, and centralized broadcast management. The compositor output is encoded in real-time and delivered to streaming platforms or custom endpoints.
Protocols
Section titled “Protocols”WHEP (WebRTC)
Section titled “WHEP (WebRTC)”WebRTC-HTTP Egress Protocol for ultra-low-latency broadcasting (typically < 500ms).
| Step | Description |
|---|---|
| 1 | Create SDP offer with H.264 video + Opus audio |
| 2 | POST offer to WHEP endpoint URL |
| 3 | Receive SDP answer from server |
| 4 | Establish WebRTC peer connection |
| 5 | Stream encoded frames via RTP |
Video codec: H.264 (VideoToolbox hardware encoder on macOS) Audio codec: Opus Clock rates: Video 90 kHz, Audio 48 kHz
Best for: Interactive streams, Cloudflare Calls, low-latency monitoring.
RTMP / RTMPS
Section titled “RTMP / RTMPS”Real-Time Messaging Protocol for standard streaming platform delivery.
| Step | Description |
|---|---|
| 1 | TCP handshake (TLS for RTMPS) |
| 2 | RTMP connect + create stream |
| 3 | Publish with stream key |
| 4 | Send H.264 video + AAC audio in FLV format |
Video codec: H.264 Audio codec: AAC-LC (falls back to raw PCM)
Built-in presets:
| Platform | Ingest URL |
|---|---|
| Twitch | rtmps://live.twitch.tv:443/app |
| YouTube | rtmps://a.rtmps.youtube.com:443/live2 |
Best for: Twitch, YouTube, Facebook, and other RTMP-compatible platforms.
Secure Reliable Transport for professional broadcast with error recovery.
Video codec: H.264 Audio codec: AAC-LC or Opus
Best for: Professional broadcast workflows, inter-facility links.
Broadcast Manager
Section titled “Broadcast Manager”The Broadcast Manager coordinates all protocols. Broadcasting requires two conditions:
- At least one protocol is enabled in Settings > Streaming
- The broadcast button is active in the Transport Panel
When both conditions are met, the manager starts the enabled broadcasters and routes compositor frames + audio to them.
Broadcast State
Section titled “Broadcast State”| Property | Description |
|---|---|
whep_enabled | WHEP toggle from settings |
whep_url | WHEP endpoint URL |
rtmp_enabled | RTMP toggle from settings |
rtmp_url | RTMP ingest URL |
rtmp_stream_key | Stream key |
srt_enabled | SRT toggle from settings |
srt_url | SRT endpoint URL |
RTMP Ingest
Section titled “RTMP Ingest”Plinken can also receive RTMP streams as compositor layer sources. External encoders (DJI gimbal, OBS, hardware encoders) can push to Plinken’s built-in RTMP server.
Use the rtmp_ingest layer source type to display incoming RTMP feeds in the compositor.
Studio Mode
Section titled “Studio Mode”Toggle Studio Mode with Shift+L. This provides an OBS-style dual view:
| View | Description |
|---|---|
| Preview | Prepare your next scene — edit layers, adjust positions |
| Program | The live output currently being broadcast |
Studio Mode lets you make changes to the preview without affecting the live output. When ready, press Go Live to push preview to program.
Scene Management
Section titled “Scene Management”| Operation | Description |
|---|---|
| Add Scene | Create a new scene with its own layer stack |
| Rename Scene | Change scene display name |
| Delete Scene | Remove a scene (minimum 1 required) |
| Switch Scene | Load a scene’s layers into preview |
| Reorder | Move scenes up/down in the list |
Commands
Section titled “Commands”| Command ID | Name | Description |
|---|---|---|
streaming:go-live | Go Live | Push preview scene to program output |
streaming:toggle-studio-mode | Toggle Studio Mode | Enable/disable dual preview/program view |
video:toggle-broadcast | Toggle Broadcast | Start/stop the broadcast stream |
Lua API
Section titled “Lua API”-- Go live (push preview to program)pl.cmd("streaming:go-live")
-- Toggle studio modepl.cmd("streaming:toggle-studio-mode")
-- Start broadcastingpl.cmd("video:toggle-broadcast")
-- Check if we're livelocal is_live = plinken.get("streaming", "live")Configuration
Section titled “Configuration”Configure streaming in Settings > Streaming:
| Setting | Description |
|---|---|
| WHEP Enabled | Enable WebRTC broadcasting |
| WHEP URL | WHEP endpoint URL |
| RTMP Enabled | Enable RTMP broadcasting |
| RTMP URL | RTMP/RTMPS ingest URL |
| Stream Key | Platform stream key |
| SRT Enabled | Enable SRT broadcasting |
| SRT URL | SRT endpoint URL |
Keyboard Shortcuts
Section titled “Keyboard Shortcuts”| Shortcut | Action |
|---|---|
Cmd+L | Go Live |
Shift+L | Toggle Studio Mode |
Architecture
Section titled “Architecture”Compositor Output (CVPixelBuffer) ↓ ┌────┼────┐ ↓ ↓ ↓WHEP RTMP SRT(WebRTC) (FLV) (MPEG-TS) ↓ ↓ ↓H.264+Opus H.264+AAC H.264+AACAll broadcasters share a dedicated Tokio runtime (plinken-streaming) with 2 worker threads to avoid blocking the UI or audio threads.
Related
Section titled “Related”- Video Overview — Video playback and modules
- Compositor — Layer system and scene management