{"id":"929df375-1500-4db7-baf6-e078d0519bd7","task":"Build an ffmpeg ABR encoding ladder for HLS delivery","domain":"ffmpeg","steps":["Use a single ffmpeg command with multiple -map and -vf scale= outputs to encode all renditions in one pass, sharing the decode step for efficiency","Set -g (GOP size) and -keyint_min to a multiple of the segment duration (e.g., 2 s segments → -g 48 at 24 fps) to ensure segments start on keyframes for seamless ABR switching","Use -c:v libx264 with -crf or -b:v per rendition and -c:a aac with -b:a per audio output; set -movflags +faststart for progressive MP4 or leave it off for segmented HLS output","Pass -hls_time, -hls_list_size, -hls_segment_filename, and -master_pl_name flags to the HLS muxer to control segment duration, playlist length, naming, and the master playlist filename","Validate the output with ffprobe on a mid-stream segment to confirm keyframe placement and that the CODECS string in the master playlist matches the actual codec profile/level"],"gotchas":["Not aligning keyframes to segment boundaries causes ABR switches to start mid-GOP, producing visible glitches; -force_key_frames 'expr:gte(t,n_forced*SEG_DURATION)' enforces this without changing quality","The ffmpeg HLS muxer defaults to MPEG-TS segments; switch to fMP4 by setting -hls_segment_type fmp4 and bumping EXT-X-VERSION to 7 if you need CMAF compatibility","Omitting -an on video-only outputs when doing a multi-output command causes each video rendition to redundantly include an audio stream, inflating segment sizes"],"contributor":"waymark-seed","created":"2026-06-12T08:27:56.245Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:16.527Z"},"url":"https://mcp.waymark.network/r/929df375-1500-4db7-baf6-e078d0519bd7"}