Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dynamitemedia
Binge Watcher

Re: HLS streaming questions

I have tested this over and over and its working on VLC but NOt the roku and now not on my iPhone either

here is the link to the .php file:
http://iptvmyway.com/roku/HLS/playlists/test.php

and a working m3u8 on Roku:
http://iptvmyway.com/roku/HLS/playlists/stream.m3u8

now strange thing is, that m3u8 will work on VLC and Roku but not my iPhone... keeps saying the movie can't be played.

I have pasted the code above as well and you can see by the download it looks the same as the playlist file that is working.
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
retrotom
Visitor

Re: HLS streaming questions

"dynamitemedia" wrote:
I have tested this over and over and its working on VLC but NOt the roku and now not on my iPhone either

here is the link to the .php file:
http://iptvmyway.com/roku/HLS/playlists/test.php

and a working m3u8 on Roku:
http://iptvmyway.com/roku/HLS/playlists/stream.m3u8

now strange thing is, that m3u8 will work on VLC and Roku but not my iPhone... keeps saying the movie can't be played.

I have pasted the code above as well and you can see by the download it looks the same as the playlist file that is working.


I've been playing with HLS and finally got in working on our channel/app. I see three issues -- two (I think) with your code and one (potentially) with your testing. First, the testing -- VLC does not really support HLS. It will play the files sequentially because it's a playlist. So when it plays in VLC, what that means is -- you have a valid playlist -- but you may not have a valid HLS playlist. Secondly, looking at your PHP code -- it looks like you've got TARGETDURATION set to the length of the entire stream.You should try to set it to 10 or something. When testing with the Roku, I had an issue with this -- even though it should work when you've specified ENDLIST. Then the last potential issue I think I see is that you're giving each segment the same title (a blank space) with
#EXTINF:10,<?php echo " \r\n"?>
. I would try giving them all unique titles. In my code, which I finally got working -- they all have their sequence number as the title. That shouldn't be a deal breaker because it's just a title and doesn't uniquely identify the segment -- but you never know. Lastly, are you setting the content-type (mime) of the file being downloaded as "application/vnd.apple.mpegurl"?
0 Kudos
dynamitemedia
Binge Watcher

Re: HLS streaming questions

very good tips Tom!

Let me play with this tomorrow, can i PM you if i have some questions?
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
RokuMarkn
Visitor

Re: HLS streaming questions

The playlist titles are not used by the player. It's fine for them to be empty.

--Mark
0 Kudos
dynamitemedia
Binge Watcher

Re: HLS streaming questions

@ tom

could you show what info your passing as the header?

as far as mime type goes i have added

AddType application/vnd.apple.mpegurl .m3u8
AddType video/MP2T .ts


in my .htaccess ... one ? i have about the .htaccess i have put this in the myserver.com/roku/HLS folder and inside the playlist folder i thought you only needed it on the HLS and not myserver.com/roku/HLS/playlist folder too.. is that true?

and have changed my header to this:

header("Content-Type: application/vnd.apple.mpegurl");
header("Cache-Control: no-cache");
header("Pragma: no-cache");


and i am still getting the media is not supported or corrupt error in roku

I also cleaned up that whitespace you mentioned.

if i am missing something or misunderstood could you maybe show your code that you got working?
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
retrotom
Visitor

Re: HLS streaming questions

I'm not using php or apache to serve up my streams. So I'm not sure what all you need to do on your end. Here's a raw dump of an HLS playlist that works. Keep in mind that the IP address, etc. is would need to be changed to whatever your server is. I'm not using any of those other headers for cache control, etc.. Hope this helps.


HTTP/1.1 200 OK
Connection: close
Content-Length: 278
Content-Type: application/vnd.apple.mpegurl
Date: Thu, 07 Oct 2010 11:16:55 GMT
Server: Gabby Media Server

#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:1

#EXTINF:10,hls-44-00002.ts
http://127.0.0.1:42785/hls/hls-44-00002.ts
#EXTINF:10,hls-44-00003.ts
http://127.0.0.1:42785/hls/hls-44-00003.ts
#EXTINF:10,hls-44-00004.ts
http://127.0.0.1:42785/hls/hls-44-00004.ts
0 Kudos
dynamitemedia
Binge Watcher

Re: HLS streaming questions

still nothing is working..

No one here is using apache or PHP to do a playlist?
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
dynamitemedia
Binge Watcher

Re: HLS streaming questions

So there is not another Developer here that is using apache to serve the stream?

Is there a reason? is it not a good idea or any help here would be help as i have spent 2 weeks on trying to get this to work, if its something that wont work please let me know.
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
RokuMarkn
Visitor

Re: HLS streaming questions

I think you should explain exactly what you're trying to do. Are you trying to stream a live stream? If so, what kind of hardware/software is producing the stream? Or are you trying to stream prerecorded (video on demand) content? If so, what format is that content in?

Generally developers who are using HLS use existing products like Wowza, Inlet, the Apple segmenter or the open source ioncannon segmenter to produce the playlist and TS files. The logic to produce the HLS files is nontrivial (as you've discovered) so there should be a good reason why you'd want to try to implement it yourself rather than using an existing solution.

--Mark
0 Kudos
dynamitemedia
Binge Watcher

Re: HLS streaming questions

i have shown here and/or other posts that i have the .ts files its the playlist i am having issues with. i want to create a dynamic .m3u8 playlist.

it can be done with other playlists examples here:

http://djlab.com/2010/08/asxm3upls-on-demand-playlist-generator/comment-page-1/

http://www.palegroove.com/search/36

and i am trying to do the same with the .m3u8, i am sorry if i haven't explained it better, at this time is only on existing videos. segmenting the videos is not an issue. Only making the playlist dynamic.
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos