2026-07-035 min readffmpeg m3u8 flags, ffmpeg hls options, ffmpeg m3u8 parameters

FFmpeg M3U8 Flags: Complete Options Reference

Complete reference of FFmpeg flags for M3U8/HLS operations. Every option explained for downloading, converting, and troubleshooting streams.

Input Options for M3U8

FlagPurpose
-i url.m3u8Input M3U8 playlist URL
-protocol_whitelistAllow HTTP/HTTPS protocols (add if you get "protocol not found")
-allowed_extensions ALLAllow .m3u8 extension (needed for some streams)
-headersAdd custom HTTP headers (for authentication)
-user_agentSet custom User-Agent string

Output Options

FlagPurpose
-c copyStream copy (no re-encoding, fastest, lossless)
-c:v libx264Re-encode video to H.264
-c:a aacRe-encode audio to AAC
-crf NQuality (0-51, lower = better, 18-28 typical)
-presetEncoding speed (ultrafast, fast, medium, slow, veryslow)
-t NDuration limit in seconds (for live streams)
-ss NStart time offset in seconds
-bsf:a aac_adtstoascFix AAC bitstream for MP4 container

Stream Selection Options

  • -map 0:v:0 — Select first video stream (usually highest quality)
  • -map 0:a:0 — Select first audio stream
  • -vn — Disable video (audio-only extraction)
  • -an — Disable audio (video-only)
  • -sn — Disable subtitles

Troubleshooting Flags

  • -v debug or -loglevel debug — Maximum logging detail for debugging
  • -stats — Show encoding progress (enabled by default)
  • -progress url — Send progress updates to a URL
  • -y — Overwrite output file without asking
  • -n — Never overwrite output file

Related Articles