"EnTerr" wrote:"belltown" wrote:
I wouldn't bother. It won't work, due to the way HLS operates. The m3u8 playlist file is updated every few seconds as new media segment files are added. It's not a "static" playlist file. Even if you could download it from the server every few seconds, create a new version of the file and write it out to a "tmp" file, I don't know whether the roVideoPlayer would be able to handle a local file as a stream Url, and even if it did, you'd have to do something about the fact that the segment files it references aren't local, but served from a remote url. I think you're out of luck, unfortunately.
Hmm. Why are you so sure?
Video segments can be local, relative or full URLs:"https://en.wikipedia.org/wiki/M3U#File_format" wrote:
Each entry ... can be any one of the following:
- an absolute local pathname; e.g., C:\My Music\Heavysets.mp3
- a local pathname relative to the M3U file location; e.g. Heavysets.mp3
- a URL.
"EnTerr" wrote:
I have doubts about your previous paragraph too, where you say a player should start at the end of the m3u - rather seem to me that since a sliding window is used for live streaming, it is server's job to update the m3u promptly so that new clients hopping in are on the current segment. But that doesn't even matter in this case - as long as player keeps playing the 6 segments (each ~10sec) without caching - even if it started at the wrong # segment, the worst that can happen is delay from live of 5x10 = 50sec
"belltown" wrote: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.
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.
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, etcAnd 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?
"EnTerr" wrote:
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?
"RokuMarkn" wrote:
I can't tell you exactly why that stream is failing, although I'm sure it has something to do with the peculiar reuse of sequence numbers. I can tell you however that the Roku player ignores the EXT-X-ALLOW-CACHE header, so that's not related.
"EnTerr" wrote:
That's good to know (that Roku does not follow the HLS spec in the case of EXT-X-ALLOW-CACHE) -
"RokuMarkn" wrote:
Roku follows the spec by never caching content. That is correct behavior regardless of the EXT-X-ALLOW-CACHE setting.
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
Thanks for your patience — we’re excited to share what’s next!