VLC and m3u8 file

tl;dr: This looks like a bug with VLC. Use a different player.

I can reproduce this problem with a set of HLS video file, created by ffmpeg as indicated in the question. That is with ffmpeg 4.0.2 and VLC 3.0.4

Symptoms:

Opening the .m3u8 file with VLC, I get the error message:

adaptive demux error: Failed to create demuxer (nil) TLS

The debug logs indicate that VLC actually successfully reads the playlist, and finds the TS files, but then something goes wrong.

However, I can successfully play the files with both ffplay and MPlayer, so it looks like the fault is with VLC.

The VLC bugtracker has some similar-looking bug reports, but most are quite old and supposedly fixed. I did manage to play an HLS stream over HTTP, by opening the URL of the .m3u8 file, so the bug seems to only apply to downloaded HLS streams. Maybe playing of locally downloaded .m3u8 files is not a high priority for VLC, so just use a different player.


VLC can't seem to process a m3u8 file with those 'EXT-X' directives in it. Presumably this is a VLC bug (as noted elsewhere) which has yet to be resolved even upto today.

Your best choices are:

  1. Edit the .m3u8 file and delete the EXT-X lines (but do keep those EXTINF lines). You should then be able to play the playlist with VLC, or
  2. Use a different application to play the .m3u8 file as is. ffplay is one that will play it, for example.