Skip to content

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.

WebRTC-HTTP Egress Protocol for ultra-low-latency broadcasting (typically < 500ms).

StepDescription
1Create SDP offer with H.264 video + Opus audio
2POST offer to WHEP endpoint URL
3Receive SDP answer from server
4Establish WebRTC peer connection
5Stream 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.

Real-Time Messaging Protocol for standard streaming platform delivery.

StepDescription
1TCP handshake (TLS for RTMPS)
2RTMP connect + create stream
3Publish with stream key
4Send H.264 video + AAC audio in FLV format

Video codec: H.264 Audio codec: AAC-LC (falls back to raw PCM)

Built-in presets:

PlatformIngest URL
Twitchrtmps://live.twitch.tv:443/app
YouTubertmps://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.

The Broadcast Manager coordinates all protocols. Broadcasting requires two conditions:

  1. At least one protocol is enabled in Settings > Streaming
  2. 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.

PropertyDescription
whep_enabledWHEP toggle from settings
whep_urlWHEP endpoint URL
rtmp_enabledRTMP toggle from settings
rtmp_urlRTMP ingest URL
rtmp_stream_keyStream key
srt_enabledSRT toggle from settings
srt_urlSRT endpoint URL

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.

Toggle Studio Mode with Shift+L. This provides an OBS-style dual view:

ViewDescription
PreviewPrepare your next scene — edit layers, adjust positions
ProgramThe 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.

OperationDescription
Add SceneCreate a new scene with its own layer stack
Rename SceneChange scene display name
Delete SceneRemove a scene (minimum 1 required)
Switch SceneLoad a scene’s layers into preview
ReorderMove scenes up/down in the list
Command IDNameDescription
streaming:go-liveGo LivePush preview scene to program output
streaming:toggle-studio-modeToggle Studio ModeEnable/disable dual preview/program view
video:toggle-broadcastToggle BroadcastStart/stop the broadcast stream
-- Go live (push preview to program)
pl.cmd("streaming:go-live")
-- Toggle studio mode
pl.cmd("streaming:toggle-studio-mode")
-- Start broadcasting
pl.cmd("video:toggle-broadcast")
-- Check if we're live
local is_live = plinken.get("streaming", "live")

Configure streaming in Settings > Streaming:

SettingDescription
WHEP EnabledEnable WebRTC broadcasting
WHEP URLWHEP endpoint URL
RTMP EnabledEnable RTMP broadcasting
RTMP URLRTMP/RTMPS ingest URL
Stream KeyPlatform stream key
SRT EnabledEnable SRT broadcasting
SRT URLSRT endpoint URL
ShortcutAction
Cmd+LGo Live
Shift+LToggle Studio Mode
Compositor Output (CVPixelBuffer)
┌────┼────┐
↓ ↓ ↓
WHEP RTMP SRT
(WebRTC) (FLV) (MPEG-TS)
↓ ↓ ↓
H.264+Opus H.264+AAC H.264+AAC

All broadcasters share a dedicated Tokio runtime (plinken-streaming) with 2 worker threads to avoid blocking the UI or audio threads.