ffmpeghttp-live-streamingm3u8

Attempting to parse an m3u8 file in FFmpeg with mismatched extensions and formats


As I attempt to parse an m3u8 file thats being downloaded over the air, it utilizes "html" as an extension to represent the ts video slices. Even with the command being written as follows:

ffmpeg -allowed_extensions ALL -i https://.../master.m3u8 -codec copy ./out.mkv

It still produces the following error:

detected format mpegts extension none mismatches allowed extensions in url (...)/page-0.html

Could there be a way to ignore this format and extension mismatch?


Solution

  • allowed_extensions is hls-specific property which is only used when reading HLS "stream" from a filesystem. Your issue is related to hls segment validation. Interestingly, the very latest (yet unreleased) ffmpeg allows html as a valid mpegts extension. There are two allowlists checked for; generic allowlist can be overridden with allowed_segment_extensions option, but there is no way to override per-format allowlist as it is hardcoded in hls demuxer. So, your options are: