"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. 😄
"http://tools.ietf.org/html/draft-pantos-http-live-streaming-13" wrote: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.
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.
#EXTM3Uit says "#EXT-X-ALLOWCACHE:1", which means exactly nothing. It should be saying NO there.
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOWCACHE:1
#EXT-X-TARGETDURATION:10
"httpslash" wrote:
Thanks so much for the help, I would be willing to try the tmp thing however it seems far too difficult for me to do. How would you go about doing it? Does it take a lot of steps? Thanks
xfer = createObject("roURLTransfer")
xfer.setURL("http://stream0.latvdefrance.com/live/tf1.m3u8")
m3u = xfer.getToString()
tmp_m3u = ""
for each line in m3u.tokenize(chr(10)):
if left(line, 1) <> "#":
line = "http://stream0.latvdefrance.com/live/" + line
else if left(lines, 18) = "#EXT-X-ALLOWCACHE:":
line = "#EXT-X-ALLOW-CACHE:NO"
end if
tmp_m3u = tmp_m3u + chr(10) + line
end for
WriteAsciiFile("tmp:/tf1.m3u8", tmp_m3u)
"renojim" wrote:
Um... there's only 6 segments in that file that just repeat over and over again. It's no wonder it repeats after a minute. I'm not sure it's even "legal" to repeat segments within the m3u8 playlist file.
"httpslash" wrote:
Hi thanks for taking the time to help. I really appreciate it. I am very new to roku, where would I paste your code? I'm using simple video player...?
EDIT: I pasted it in appmain.brs in simplevideoplayer, all i get is a loading... screen. Did i do it worng?
"httpslash" wrote:
hi, thanks for the reply, i just download the m3u8 changed the allowcache to <NO>, added the link before the segments to make it play and then uploaded it to dropbox to point the roku to it. It still repeats :(, could it be because i used dropbox? <Force equals mass times acceleration> i tried everything, what makes it worse it that vlc plays it fine so i feel that there must be a way to make it play...
"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.
"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.
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!