Workflow streaming distribution

From damionrashford/media-os · View interactive version

Workflow streaming distribution is an AI agent skill from the GitHub repository damionrashford/media-os. Deliver live or VOD content over HLS / DASH / RTMP / SRT / WHIP / RIST with adaptive bitrate ladders, DRM (Widevine / PlayReady / FairPlay cbcs), multi-protocol fanout via MediaMTX, and CDN upload (Cloudflare Stream / Mux / Bunny / S3). Use when the user says "stream to HLS", "build an ABR ladder",

How to use this skill

Skill file

Workflow — Streaming Distribution

What: Ship live or VOD content out to every playback surface. Package once, protect optionally, deliver everywhere.

Skills used

ffmpeg-streaming, ffmpeg-whip, ffmpeg-rist-zmq, ffmpeg-hwaccel, ffmpeg-drm, media-shaka, media-gpac, mediamtx-server, gstreamer-pipeline, media-cloud-upload, media-batch, ffmpeg-quality, webrtc-spec, webrtc-pion, webrtc-mediasoup, webrtc-livekit, ffmpeg-docs.

Pipeline

Step 1 — Pick contribution protocol

Latency vs. reliability vs. tooling:

| Protocol | Latency | Pros | Cons |

|---|---|---|---|

| WHIP (WebRTC) | sub-second | lowest latency; browser-native | needs HTTPS in prod; ffmpeg 7+ |

| SRT | 120 ms default (tunable) | reliable UDP, forward error recovery | needs port forwarding |

| RTMP | 2–5 s | ubiquitous ingest | TCP, no FEC, aging |

| RIST | low | FEC + ARQ pro contribution | fewer CDN endpoints |

Step 2 — Build the ABR ladder

Use ffmpeg-streaming with the split-scale-encode pattern — one decode, N rate/size variants emitted in parallel. Netflix-style default: 4 video renditions (240p, 480p, 720p, 1080p) + 2 audio tracks (stereo + 5.1). Force keyframe alignment with -g <fps*seg_len>, -keyint_min <fps*seg_len>, -sc_threshold 0.

Step 3 — Package

Canonical target is CMAF (unified fMP4 segments serving both HLS and DASH manifests). Use media-shaka (Shaka Packager) for one-command HLS+DASH output from the same segment set. For pure HLS classic, ffmpeg-streaming's hls muxer works directly.

Step 4 — Optional DRM

Step 5 — Fanout via MediaMTX

The mediamtx-server skill ingests RTMP/SRT/WebRTC and republishes to every other protocol. One YAML → every playback client served.

Step 6 — CDN upload

Use media-cloud-upload: Cloudflare Stream (tus resumable), Mux (token id + secret), Bunny (PUT to storage zone), S3 (aws CLI / rclone). Tokens live in plugin userConfig.

Step 7 — Scale — SFU for large interactive audiences

For bidirectional many-to-many (> ~50 peers), deploy an SFU instead of MediaMTX: webrtc-livekit (Go + JWT minter), webrtc-mediasoup (Node), or webrtc-pion (Go, lower-level).

Variants

Gotchas

Example — 4-variant CMAF HLS + DASH with unified DRM

Invoke media-shaka to take a single master ProRes/MOV through Shaka Packager with 4 video renditions + AAC stereo + cbcs key rotation, emitting both master.m3u8 and manifest.mpd pointing at the same *.m4s segments. Upload with media-cloud-upload. QC the result with workflow-analysis-quality.

Related

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.