C Island wrote:
> P.S. I wonder if this is also what causes Sean's anomaly where some stream were playing past content. However he was getting content from an hour or more in the past. Maybe the first m3u8 playlist in his case had a HUGE amount of items from the past???
That is an interesting thought. I downloaded that long .m3u file using wget and searched it to find the channel that I saw the problem on. It gave a m3u8 link for that channel, so I downloaded that using wget. It contains this:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=2000,RESOLUTION=768x432
https://(redacted)/event/(redacted)/768x432.m3u8?start_time=2021-05-16T23%3A45%3A00%2B00%3A00&end_time=2023-05-17T05%3A00%3A00%2B00%3A00&env=prd&uid=(redacted)
#EXT-X-STREAM-INF:BANDWIDTH=4500,RESOLUTION=1280x720
https://(redacted)/event/(redacted)/1280x720.m3u8?start_time=2021-05-16T23%3A45%3A00%2B00%3A00&end_time=2023-05-17T05%3A00%3A00%2B00%3A00&env=prd&uid=(redacted)
Note I am redacting the actual links and other data that might identify the link because I don't want them to be searchable in this thread, since I don't know anything about their origin. But anyway, it appears there are streams in two different resolutions, but so far both VLC and Tvheadend (with or without the ffmpeg pipe) have used the larger one (I think VLC will sometimes play a couple seconds of the smaller one before switching to the larger). So again, I used wget on that link and got back a file that contains this:
(Lines 1-30):
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T15:31:18.929+0000
#EXTINF:6.000,
1280x720/(redacted)0458.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T15:31:24.929+0000
#EXTINF:6.000,
1280x720/(redacted)0459.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T15:31:30.929+0000
#EXTINF:6.000,
1280x720/(redacted)0460.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T15:31:36.929+0000
#EXTINF:6.000,
1280x720/(redacted)0461.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T15:31:42.929+0000
#EXTINF:6.000,
1280x720/(redacted)0462.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T15:31:48.929+0000
#EXTINF:6.000,
1280x720/(redacted)0463.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T15:31:54.929+0000
#EXTINF:6.000,
1280x720/(redacted)0464.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T15:32:00.929+0000
#EXTINF:6.000,
1280x720/(redacted)0465.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T15:32:06.929+0000
#EXTINF:6.000,
1280x720/(redacted)0466.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T15:32:12.929+0000
#EXTINF:6.000,
1280x720/(redacted)0467.ts
(Lines 2032-2052):
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T16:37:48.929+0000
#EXTINF:6.000,
1280x720/(redacted)1123.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T16:37:54.929+0000
#EXTINF:6.000,
1280x720/(redacted)1124.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T16:38:00.929+0000
#EXTINF:6.000,
1280x720/(redacted)1125.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T16:38:06.929+0000
#EXTINF:6.000,
1280x720/(redacted)1126.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T16:38:12.929+0000
#EXTINF:6.000,
1280x720/(redacted)1127.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T16:38:18.929+0000
#EXTINF:6.000,
1280x720/(redacted)1128.ts
#EXT-X-PROGRAM-DATE-TIME:2021-09-23T16:38:24.929+0000
#EXTINF:6.000,
1280x720/(redacted)1129.ts
So it looks like the first link is from 15:31:18.929 UTC while the last one was from 16:38:24.929 UTC, which would have been very close to the current time at the time I downloaded it. But apparently VLC is smart enough to skip to the end of the list and start playing there, and ffmpeg also goes to the end of the list but for some reason screws up the audio and video sync. But for whatever reason, if you put the original m3u8 link in a Tvheadend IPTV mux, it has no problem keeping the audio and video in sync but it's not smart enough to skip to the end of the list and start playing there. When I say "end of the list" I'm assuming that is the current time, but I may be wrong about that. Anyway, your theory appears to be correct! And I suspect that file can be MUCH longer because I have at times seen video from
several hours in the past.