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: 
melkat
Binge Watcher

Live m3u8 file not playing

Our live stream suddenly stopped playing yesterday. When I click "play" it goes to load, but then very quickly stops and goes back. This is for our channel "UCTV - UC Television." The link it points to plays fine in a web browser: http://ucsdtv-wowza.ucsd.edu:1935/live/ ... ylist.m3u8

However, not from Roku:
Model 3100X - Roku 2 XS
Version 6.2 - build 6003

Here's the xml file info:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<feed>

<!-- resultLength indicates the total number of results for this feed -->

<resultLength>4</resultLength>

<!-- endIndix indicates the number of results for this *paged* section of the feed -->

<endIndex>4</endIndex>

<item sdImg="http://www.uctv.tv/images/roku/livestream.jpg" hdImg="http://www.uctv.tv/images/roku/livestream.jpg">

<title>UCTV Live Stream</title>

<contentId>000000</contentId>

<contentType>LIVE</contentType>

<live>true</live>

<contentQuality>SD</contentQuality>

<streamFormat>hls</streamFormat>

<media>

<streamQuality>SD</streamQuality>

<streamBitrate>0</streamBitrate>
<streamUrl>http://ucsdtv-wowza.ucsd.edu:1935/live/smil:live.smil/playlist.m3u8</streamUrl>

</media>

<synopsis>Watch UCTV from anywhere in the world. UCTV explores a broad spectrum of subjects of interest to a general audience.</synopsis>

<genres></genres>

</item>

</feed>

Any help is much appreciated!

Thanks, Melissa
0 Kudos
8 REPLIES 8
TheEndless
Channel Surfer

Re: Live m3u8 file not playing

The 800kbps stream in the variant playlist is returning a 404 (http://ucsdtv-wowza.ucsd.edu:1935/live/ ... 1855017803), which is most likely the cause of the problem.
Additionally, the variant playlist lists both the 800kbps and the 1200kbps streams as having a "BANDWIDTH" of "800000", so it's unlikely it'll ever actually switch to the higher bitrate stream.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
mkammes
Roku Guru

Re: Live m3u8 file not playing

This brings up a good point:

Does the streamBitrate even need to be defined, given that this is an HLS stream which should auto adjust?

I was under the impression changing the URL to the hosted M3U8 file, and the streamformat to "hls" was all that was needed to move from a single MP4 file to a playlist. The values bitrates defined in the M3U8 playlist are what Roku uses to "know" when to change between quality.

True?

Thanks!
0 Kudos
TheEndless
Channel Surfer

Re: Live m3u8 file not playing

"mkammes" wrote:
This brings up a good point:

Does the streamBitrate even need to be defined, given that this is an HLS stream which should auto adjust?

I was under the impression changing the URL to the hosted M3U8 file, and the streamformat to "hls" was all that was needed to move from a single MP4 file to a playlist. The values bitrates defined in the M3U8 playlist are what Roku uses to "know" when to change between quality.

True?

Thanks!

The StreamBitrate should be set to 0 for HLS. I suspect it would work with no bitrate specified as well, but I've never tested that.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
mkammes
Roku Guru

Re: Live m3u8 file not playing

Thanks for the reply.

I can certainly work with roVideoScreen, etc, but in order to troubleshoot and develop one step at at time, is there more I need to do to reference an M3U8 playlist that swap out the URL, set bitrate to 0, and change streamFormat to HLS? Thus far, I'm pretty basic, loading a server side categories.xml file which references an XML for each video. It's this XML that I'm referencing the M3U8 file.

Also, is there a line diagram / flow chart to describe the order in which files are loaded and referenced in the zip file? I'm trying to plan out logic, and having some difficulty.

Been seeing your responses all over the forum when it comes to this type of thing -thanks so much for the info gleamed thus far.
0 Kudos
TheEndless
Channel Surfer

Re: Live m3u8 file not playing

I don't think you should need to do anything beyond that. StreamFormat, Stream.Url, and Stream.StreamBitrate should be all that's necessary for HLS. You may also want to set SwitchingStrategy to "full-adaptation". There was/is a bug that will prevent it from switching if that's not set... not sure if they've ever gotten around to fixing it or not.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
mkammes
Roku Guru

Re: Live m3u8 file not playing

I added the streamingStrategy into the mix with no luck. I altered the 5 values (streamformat/quality/bitrate/url and switching strategy), and as soon as I hit play, Roku momentarily begins to retrieve, then returns to the previous menu. If I revert to the MP4 values, all is good.

I've verified the M3U8 works in VLC, and via various M3U8 testing sites. In addition, I did download a few of the CustomPlaybackScreen builds from various dev sites out there, and plugging in the M3U8 into their setups seems to work. All this tells me that are are some other settings or files I need to modify.

Suggestions welcome, or if there is a signal flow chart doc where I can reverse engineer. I'm having trouble getting a complete picture from the granular information in the SDK docs.

Thanks again.
0 Kudos
mkammes
Roku Guru

Re: Live m3u8 file not playing

This may be the issue...

I'm not defining any of this in the package via a brs file. It's all defined in a server side xml.

Methodology:
categoryFeed.brs calls categories.xml on my server. Categories.xml calls an xml file (also on the server) for each of the videos. I'm defining the hls stream in the individual video xml. I'm modifying this example: http://blog.defaultroute.com/2011/01/04 ... el-part-2/ . As mentioned, works with an MP4.
0 Kudos
mkammes
Roku Guru

Re: Live m3u8 file not playing

Solved. In the event someone else stumbles across this:

In the videoplayer I've linked to, the showfeed.brs is parsing the XML file on my server. For some reason, despite defining the stream as hls or HLS on the serverside XML, the channel is still looking for an MP4. I changed
if item.StreamFormat = "" then  'set default streamFormat to mp4 if doesn't exist in xml
item.StreamFormat = "MP4"
endif


to

if item.StreamFormat = "" then  'set default streamFormat to mp4 if doesn't exist in xml
item.StreamFormat = "HLS"
endif
If item.StreamFormat="hls"
item.SwitchingStrategy="full-adaptation"
End If

and also added the full-adaptation as a safety. Not sure why the XML file with the code
<streamFormat>HLS</streamFormat>
isn't working, but this is a workaround until i troubleshoot it.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.