Missing HLS segments M3U8 files

Edit: Wasn’t sure whether to post this in Help or API. The M3U8 files and such are retrieved through the API calls…suppose it touches on both (general VOD topics, and API).

It seems that some VODs that have missing segments simply report the duration of the vod minus the missing segments, which makes for incorrect indexing if you’re assuming the VOD starting time + duration = end time of vod.

Take a look at this for example: http://www.twitch.tv/merlinidota/v/40268248?t=52m45s

If you’ll watch that for 10 seconds (and know Dota 2 in the slightest) you’ll see the game suddenly jumps to an entirely different game. It turns out those segments are missing.

Now, the interesting part:

If you download the M3U8 index file for the VOD you’ll find that the following line is in there:

This comes out to a VOD duration of: 8:18:55

However if you were to parse the M3U8 file and count the individual length of the segments, it’ll come out to the same length as the player is reporting: 27355 sec = 7:35:55

The problem is that because time jumps forward, the index from that point on no longer holds, you can no longer assume that begin time + length = end time of the VOD

Could anything be done about this, if a vod is ‘corrupted’, an indication (or even empty seconds of footage to keep the duration intact) would be very useful.

Curious to hear what you guys / Twitch staff thinks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.