"belltown" wrote:
If the client were to start reading the file any earlier than 6 segments from the end, an error would most likely result since the segment file corresponding to that sequence number no longer exists, having been over-written by a later segment.
Segment does not exist in the logical sense - but there is a new file under the same name - that gets played. Nobody has seen an error. I'll take a guess they use file rename for switching file contents transactionally.
The earlier segments having the same names as the later segments also have different EXTINF tag values, so when the player reads an earlier segment with a 4 second duration, for example, but the file that overwrote that segment file has a 9 second duration, it ends up trying to play 9 seconds of video when the file only contains 4 seconds' worth, which can really mess things up.
That's true, i noticed values go over EXT-X-TARGETDURATION:10, i don't like it but apparently it was not a practical issue. And both Roku and VLC played without messing things up. But i suppose trouble may surface if trying to rewind.
Another example - let's say there are 7 segments in the file, sequence numbers 0 to 6, the first six having filenames ending in 0 through 5, the last one having a filename ending in 0. If the client started reading from the start of the file, it could potentially read the first couple of segments (seq. no. 0 and 1), but when it goes to read the next segment, which should be the data from seq. no. 2, the file it reads could by then have been overwritten by the data for seq. no. 7. That could mess things up too.
Yes. But all that means is there will be a jerk in playback within the first segment loop (or 60 seconds) - then it will auto-synchronize and should play smooth. Don't get me wrong, i am not saying everything is fine with that m3u - like i said, chock full of problems. But the issues you point out don't seem related to the looping.
I don't believe that the caching you keep referring to has anything to do with anything. It just tells the client it can keep segments that it's already read in its local memory once it's read them so it can replay them later giving the client the ability to rewind and fast-forward through the stream, etc
And i believe caching explains all of the behavior here - how Roku plays the same video loop, repeatedly - and VLC plays linearly. None of your arguments explain that, do they?