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: 
RokuMarkn
Visitor

Re: Debugging and Playing live stream wmv content

Are you running build 388? I think there may have been a bug in 385 that prevented single-level playlists from working correctly.

If that doesn't solve it, can you verify that you:
1. are setting StreamFormat to "hls"
2. have one stream in the StreamXXX arrays (the m3u8 file)
3. are setting StreamQuality to 0
4. are using the correct IP address in the URL in the m3u8


--Mark
0 Kudos
renojim
Community Streaming Expert

Re: Debugging and Playing live stream wmv content

It won't let me update to 388; I've tried several times from different servers. As soon as I get it I'll let you know if it made a difference.

I was going to start a new thread since I didn't really want to hijack this one, but I'll put this here anyway. I tried stripping my code down to the bare minimum and creating a m3u8 file on the fly on the tmp device (maybe this isn't allowed, but I get the same result whether the m3u file is retrieved from my server or tmp). Maybe you can spot the problem?
Sub displayHls()
port = CreateObject("roMessagePort")
videoScreen = CreateObject("roVideoScreen")
videoScreen.setMessagePort(port)

videoclip = CreateObject("roAssociativeArray")
videoclip.title = "HLS Test"
videoclip.ContentType = "movie"
videoclip.StreamFormat = "hls"
videoclip.StreamBitrates = [500]
videoclip.StreamQualities = ["0"]

m3u="#EXTM3U"+chr(10)+"#EXT-X-TARGETDURATION:60"+chr(10)+"#EXTINF:60,Test Title"+chr(10)+"http://192.168.1.102/test.ts"+chr(10)+"#EXT-X-ENDLIST"+chr(10)
WriteAsciiFile("tmp:/test.m3u8",m3u)
videoclip.StreamUrls = ["tmp:/test.m3u8"]
videoScreen.SetContent(videoclip)
videoScreen.show()


while true
msg = wait(0, port)
if type(msg) = "roVideoScreenEvent"
if msg.isScreenClosed() then 'ScreenClosed event'
print "Closing video screen"
exit while
else if msg.isPlaybackPosition() then
print "isPlaybackPosition"
else if msg.isRequestFailed()
print "play failed: "; msg.GetMessage()
else if msg.isFullResult()
print "isFullResult"
'exit while
else if msg.isPartialResult()
print "isPartialResult"
'exit while
else
print "Unknown event: "; msg.GetType(); " msg: "; msg.GetMessage()
end if
end if
end while
End Sub

The result is always the "play failed: An unexpected problem (but not server timeout or HTTP error) has been detected." message.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
nowhereman
Visitor

Re: Debugging and Playing live stream wmv content

"renojim" wrote:
The result is always the "play failed: An unexpected problem (but not server timeout or HTTP error) has been detected." message.


For what it's worth, I'm having the same issues under build 388. In my case, I'm using an m3u8 provided by a 3rd party, so I can't tweak it. It looks something like this...
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=300000, CODECS="avc1.66.30, mp4a.40.5"
http://iphone.domain.com/streams/live/playlist.m3u8?sessionid=1358836792
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=64000, CODECS="mp4a.40.5"
http://iphone.domain.com/streams/live_audio/playlist.m3u8?sessionid=1519427599
twitter:nowhereman
http://www.thenowhereman.com/roku
http://www.thenowhereman.com/netflix
0 Kudos
malik
Visitor

Re: Debugging and Playing live stream wmv content

Hi,
This change in code now playing live WOWZA stream on Roku but it does not encode audio, although same stream playing with audion on iPhone.

can you please tell me what is going wrong now?


videoclip.StreamUrls = ["http://192.168.0.49:1935/rtplive/vlc.sdp/playlist.m3u8"]
videoclip.StreamBitrates = [500]
videoclip.StreamQualities = ["0"] 'can be one of these HD, SD, 0
videoclip.StreamFormat = "hls" 'can be one of these mp4, wmv, hls
videoclip.Live = True


Thanks
0 Kudos
RokuMarkn
Visitor

Re: Debugging and Playing live stream wmv content

Sorry to both of you for a piece of misinformation -- it's StreamBitrates that should be set to 0 (that is, to an array containing one zero). StreamQualities should be "SD" or "HD" as usual.

malik -- the Roku player supports only LC profile AAC audio. I think Wowza has a bug that tags all AAC audio streams as Main profile. I'll get you more information on this shortly.

renojim -- until you upgrade to build 388, you might try building a two-level playlist and see if that works. You'd have a top level playlist like this:


#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=1500000
http://server/secondlevel.m3u8


where the secondlevel.m3u8 line contains the URL of the playlist you're currently using.

--Mark
0 Kudos
malik
Visitor

Re: Debugging and Playing live stream wmv content

Hi
StreamBitrates = [0] does not work at all and it throws exception. I set StreamBitrates = [500] and StreamQualities = ["SD"] and it work perfectly with audio and video. There is no bug in WOWZA related to AAC audio stream.

Thanks for all your help
0 Kudos
RokuMarkn
Visitor

Re: Debugging and Playing live stream wmv content

Can you give me some more information about the exception you see when you set StreamBitrates = [0]? We've used that without problems.

The Wowza bug has been confirmed by several other parties. Wowza doesn't know the audio profile of the input stream, so it just sets the ADTS headers in the output to indicate Main profile. We have discussed this with Wowza and expect them to issue a patch, hopefully soon.

--Mark
0 Kudos
renojim
Community Streaming Expert

Re: Debugging and Playing live stream wmv content

"RokuMarkn" wrote:
Sorry to both of you for a piece of misinformation -- it's StreamBitrates that should be set to 0 (that is, to an array containing one zero). StreamQualities should be "SD" or "HD" as usual.

renojim -- until you upgrade to build 388, you might try building a two-level playlist and see if that works. You'd have a top level playlist like this:


#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=1500000
http://server/secondlevel.m3u8


where the secondlevel.m3u8 line contains the URL of the playlist you're currently using.

--Mark

That did it. I still can't seem to get 388. I was able to create the top level m3u on the tmp: device, but trying to specify the second level EXT-X-STREAM-INF as tmp:/test.m3u8 didn't work. It worked when I directed it to one on my server. Now I just have to figure out why the video doesn't play. I'll go back and look at the spec, but is it safe to say that just because an m4v file will play normally on the Roku DVP doesn't necessarily mean it meets the spec for an HLS video?

Thanks for your help,
-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
RokuKevin
Visitor

Re: Debugging and Playing live stream wmv content

You must remux the h264 data in a .m4v file to a .ts mpeg transport stream file. In HLS, the m3u8 file must point to mpeg transport stream file segments. Many developers are using the Wowza server for this purpose.

--Kevin
0 Kudos
renojim
Community Streaming Expert

Re: Debugging and Playing live stream wmv content

Thanks Kevin, I will look into it.

Edit: Just thought I'd report back. I was finally able to get 388 and my single level m3u file works. Time to look into encoders, I guess.

Thanks again,
-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos