I used ffmpeg to generate some segment files that I'm using as slate to play before a program starts. Using nodejs, I'm generating a an m3u8 file that loops perfectly in HLS.js, but on some players (namely VLC), it stutters around and can't seem to play smoothly at all.
Here is what the playlist looks like:
#EXT-X-TARGETDURATION:3
#EXT-X-PLAYLIST-TYPE:EVENT
#EXT-X-VERSION:7
#EXT-X-START:TIME-OFFSET=6.256256,PRECISE=YES
#EXT-X-MEDIA-SEQUENCE:39
#EXT-X-DISCONTINUITY
#EXTINF:2.502500,
http://localhost:8000/slate/000000003.ts
#EXT-X-DISCONTINUITY
#EXTINF:1.251244,
http://localhost:8000/slate/000000004.ts
#EXT-X-DISCONTINUITY
#EXTINF:1.001067,
http://localhost:8000/slate/000000005.ts
#EXT-X-DISCONTINUITY
#EXTINF:2.502500,
http://localhost:8000/slate/000000000.ts
#EXT-X-DISCONTINUITY
#EXTINF:2.502500,
http://localhost:8000/slate/000000001.ts
#EXT-X-DISCONTINUITY
#EXTINF:1.251256,
http://localhost:8000/slate/000000002.ts
I'm dynamically updating the EXT-X-START:TIME-OFFSET
and EXT-X-MEDIA-SEQUENCE
tags and the order of the segments when a request comes in.
Is there something obvious I can change to make it playback normally in VLC?
I've noticed that if I don't have the EXT-X-DISCONTINUITY
tag then it won't loop on any player but it does play smoother for about 5 seconds in VLC...