Tool

HLS m3u8 Master Playlist Inspector

Paste the text of an m3u8 file to see which variants it holds and each one's codecs and bandwidth in a table, then pick one and get the ffmpeg command that fetches it. Your input is processed only inside this browser and is never sent anywhere, and this tool never connects to the address.

Use it only on video you made or have the right to save. It does not cover getting around copy protection or removing DRM.

What you paste is analyzed only inside this browser and is never sent anywhere.

Paste m3u8 text to analyze it. Open the m3u8 address in a browser tab, or open the .m3u8 file in a text editor, and paste the text as it is.

What is an m3u8 master playlist?

HLS (HTTP Live Streaming) sends video as segments a few seconds long, and an m3u8 is the text file that lists them. There are two kinds. A master playlist is a list of variants: for each one it has an #EXT-X-STREAM-INF line followed by the address of that variant's media playlist. A media playlist is the segment list (#EXTINF) of one variant. A player reads the master and picks the variant that fits the network.

So if you pass the master straight to ffmpeg -i master.m3u8 -c copy out.mp4, you leave the choice of variant to ffmpeg's default. To get the variant you want you have to name the program, and this tool builds that command.

How to read the table

  • Resolution and fps: the RESOLUTION and FRAME-RATE attributes. They are optional and may be missing.
  • Codecs: the CODECS attribute. The box below the table explains strings like avc1.640028; the rules are covered in the Codec String Decoder.
  • Bandwidth: the spec (RFC 8216) defines BANDWIDTH as the peak bitrate of the variant and AVERAGE-BANDWIDTH as the average. The average is shown when it exists.
  • Estimated size: bandwidth (bit/s) × video length (seconds) ÷ 8. You enter the length because a master playlist does not say how long the video is.
  • Program no.: the number ffmpeg uses when it shows variants as “programs”, usually the order in the file starting at 0.

How to use it

  • Pick a variant: choose a row and the command comes out in the form -map 0:p:N:v:0 -map 0:p:N:a?. If the audio is a per-language group you can pick one and it becomes -map 0:p:N:a:K.
  • Estimate the size before downloading: compare how the size differs between variants for the same length. The gap in average bandwidth between 1080p and 720p is the gap in size.
  • Handle common ffmpeg errors: if the input is a local m3u8 file, -protocol_whitelist file,http,https,tcp,tls,crypto is added automatically. Without it ffmpeg often fails to open the http addresses inside the file. For messages about aac_adtstoasc when putting AAC into MP4, the checkbox adds the filter. If an error persists, paste the log into the FFmpeg Error Log Explainer.
  • When you want to re-encode instead of copy: -c copy moves the quality as it is. To shrink the file, re-encode it with the FFmpeg Command Builder and the CRF Recommender. You can check the codec and resolution of the MP4 you got with the Video File Info Viewer.

The difference between the two commands

Method 1 gives the master address as input and chooses the program with -map. It can fetch the audio linked to that variant even when the audio is a separate group.Method 2 gives the media playlist address of that variant directly. The command is simpler, but if the audio is a separate group you only get video. When a variant address is relative, Method 2 builds the full address from the master's full address.

Limits

  • The program number and audio order are assumptions. The tool assumes the order in the file matches ffmpeg's numbering. It is safer to check the Program and Stream lines of ffmpeg -i.
  • The estimated size is calculated from bandwidth. Using the peak can give more than the real file, and the average is just the value the service wrote down, not a measurement of the actual file. Whether audio is included in BANDWIDTH may also differ by service.
  • This tool does not connect to the address. So it cannot know the segment length, the real total length, or whether the address is still valid. Streams that need headers, cookies or tokens need extra ffmpeg options.
  • It does not remove encryption or DRM. If an encryption tag is present it only shows a warning. A DRM-protected stream cannot be played after copying.
  • Codec explanations cover avc1, hvc1, av01, vp09 and common audio strings. DASH (mpd) is not supported.