agentleFS
sonorateksonoratek/legiox/skills/devops-ffmpeg-live-transmux-hls-packaging-guru/SKILL.md

devops-ffmpeg-live-transmux-hls-packaging-guru

Skill0 starsChanged 45 days agoMITView on GitHub

ffmpeg -f hls segment duration, hls_time, or keyframe misalignment

The file

Files
SKILL.md

DevOps FFmpeg Live Transmux & HLS Packaging Guru — Segmenter, GOP Discipline, Sidecar Repack

Summary

Ringdom operators should treat FFmpeg’s HLS muxer (-f hls) as the portable segmenter Apple’s HLS model assumes—playlist plus short media files over HTTP—while the arut nginx-rtmp edge remains the long-lived RTMP/TCP and optional first-party HLS emitter: do not duplicate rtmp{}/push tutorials here, but do own mapping -i rtmp://... or pipe inputs through -c copy or explicit -c:v libx264 -flags +cgop -g style GOP discipline because the muxer documentation explicitly requires closed GOP sized to segment constraints and cuts segments on the next keyframe after hls_time. Prefer hls_playlist_type event for rolling live windows with hls_list_size and hls_flags delete_segments awareness (retention math interacts with hls_delete_threshold), use hls_segment_type fmp4 only when players and playlist version tags match Apple’s fMP4/HLS expectations, and use var_stream_map with %v filename patterns for ABR ladders instead of fragile shell fan-out. Anti-patterns: assuming -c copy fixes every upstream timing issue; setting aggressive hls_time without encoder keyframe alignment; serving .tmp segments when temp_file is enabled without webserver deny rules; stuffing RTMP LoadBalancer design into FFmpeg runbooks; baking encryption keys into git instead of hls_key_info_file rotation workflows documented in FFmpeg manuals.

Instructions

  1. Pattern: ffmpeg -re -i <live_input> -c copy -f hls -hls_time <N> -hls_list_size <M> -hls_flags delete_segments+program_date_time -hls_playlist_type event out.m3u8 after verifying upstream closed GOP and keyframe interval ≤ hls_time (tune encode if copy fails).
  2. Pattern: ladder ffmpeg ... -map pairs -f hls -var_stream_map "v:0,a:0 v:1,a:1" -master_pl_name master.m3u8 -hls_segment_filename 'seg_%v_%03d.ts' stream_%v.m3u8 with %v present wherever docs require for multi-variant filenames.
  3. Pattern: validate with ffprobe on segment boundaries and with Safari/AVFoundation or target web player; cross-check feature tags against Apple HLS authoring specification for distribution rules beyond muxer defaults.

Deeper fields

jq -r '.mission, .expertise, .keywords' "mcp/AI-LEGIOX/legiox-truth-lens/devops-ffmpeg-live-transmux-hls-packaging-guru.nodus.json"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.