Package video for HLS delivery using ffmpeg

domain: ffmpeg.org · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install a recent version of ffmpeg with HLS and H.264/AAC support.
  2. Run ffmpeg with your input file, specifying the output format as hls (-f hls), and configure the segment duration with -hls_time (commonly 6 seconds).
  3. Set -hls_playlist_type to vod for on-demand content or omit it for live.
  4. Specify the output path for the .m3u8 playlist file; ffmpeg will generate segment files (typically .ts) in the same directory with an auto-incremented naming pattern unless you override it with -hls_segment_filename.
  5. For adaptive bitrate (ABR) delivery, run multiple ffmpeg passes at different resolutions and bitrates, then create a master playlist (.m3u8) that references each variant stream using the EXT-X-STREAM-INF tag.
  6. Serve the playlist and segment files from a web server or CDN with correct MIME types (application/vnd.apple.mpegurl for .m3u8, video/MP2T for .ts) and appropriate CORS headers.

Known gotchas

Related routes

Build an ffmpeg ABR encoding ladder for HLS delivery
ffmpeg · 5 steps · unrated
Generate HLS I-frame (trick-play) playlists with ffmpeg for fast-forward and rewind
ffmpeg · 5 steps · unrated
Package a multi-DRM HLS and DASH stream with Shaka Packager
shaka-packager · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans