"renojim" wrote:
It looks like they're reusing file names in that playlist. The content of the files changes every minute. I don't know if that meets the HLS spec, but somehow I doubt it. I'm surprised VLC plays it. If you really, really wanted to play it on a Roku, I suppose you could process the playlist and download the segments to tmp: while renumbering the segments and recreating the playlist on tmp:, but it would be a lot of work fraught with potential problems. Is it really worth it? You'd probably have better luck trying to get the producer of the stream to fix his encoding.
On the other hand, if the playlist really is valid under the HLS spec, then I guess you've uncovered a bug on the Roku. Something tells me it wouldn't be a high priority to fix. 😄
First, let me disclaim i am talking out of my mule here, since i haven't used HLS before - all i did was open teh spec and searched for "cache" in it. Using said ninja skill, here is what i found:
"http://tools.ietf.org/html/draft-pantos-http-live-streaming-13" wrote:
3.4.6. EXT-X-ALLOW-CACHE
The EXT-X-ALLOW-CACHE tag indicates whether the client MAY or MUST NOT cache downloaded media segments for later replay. It MAY occur anywhere in a Media Playlist file; it MUST NOT occur more than once. The EXT-X-ALLOW-CACHE tag applies to all segments in the playlist. Its format is:
#EXT-X-ALLOW-CACHE:<YES|NO>
See Section 6.3.3 for more information on the EXT-X-ALLOW-CACHE tag.
...
6.3.3. Playing the Playlist file
...
If the Playlist file contains the EXT-X-ALLOW-CACHE tag and its value is NO, the client MUST NOT cache downloaded media segments after they have been played. Otherwise the client MAY cache downloaded media segments indefinitely for later replay.
So if there is "#EXT-X-ALLOW-CACHE: NO" in the M3U, client is required NOT to cache segments, even if they repeat. If there is no such line or it has different value but "NO" (that is
any other string, including "YES", "NOPE", "NEVER", "3.141592"!), the client is free to do whatever the heck they see fit - cache them or not cache them - and they will be spec compliant.
Now looking at our m3u,
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOWCACHE:1
#EXT-X-TARGETDURATION:10
it says "#EXT-X-ALLOWCACHE:1", which means exactly nothing. It should be saying NO there.
PS. even the name is misspelled there, EXT-X-ALLOWCACHE instead of EXT-X-ALLOW-CACHE ! That file is chock-full of errors. Can't blame RokuCo for the behavior, it would be bending over backwards.