# HLS Stream crashes Roku

**URL:** <https://forums.plex.tv/t/hls-stream-crashes-roku/54699>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [January 19, 2014, 4:38pm UTC](https://forums.plex.tv/t/hls-stream-crashes-roku/54699 "2014-01-19T16:38:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwdempsey](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jwdempsey](https://forums.plex.tv/u/jwdempsey)\
**Post date:** [January 19, 2014, 4:38pm UTC](https://forums.plex.tv/t/hls-stream-crashes-roku/54699/1 "2014-01-19T16:38:53Z")

</div>

I have been working on some issues on the USTVnow plugin and I've noticed that the streams I am getting consistently crash the Roku and subsequently the Roku will need to reboot itself. The streams work perfectly on the other clients I've tested them on. Here is what my MediaObjectsForURL looks like:

```
def MediaObjectsForURL(url):	
    video_url = HTML.ElementFromURL(url).xpath('//video')[0].get('src')
    return [
  	MediaObject(			
		audio_channels = 2,
		parts = [PartObject(key=HTTPLiveStreamURL(url=video_url))]
	)
    ]
```

Here is what the m3u8 playlist looks like:

```
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2383872,CODECS="avc1.66.41,mp4a.40.2",RESOLUTION=1280x720
chunklist-b2383872.m3u8?wowzasessionid=581324366&key=RDJDNDAT652383D231B8805FB9D5B35AB9FB7583E82
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1731072,CODECS="avc1.77.31,mp4a.40.2",RESOLUTION=1280x720
chunklist-b1731072.m3u8?wowzasessionid=581324366&key=RDJDNDAT652383D231B8805FB9D5B35AB9FB7583E82
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=781072,CODECS="avc1.77.31,mp4a.40.2",RESOLUTION=640x360
chunklist-b781072.m3u8?wowzasessionid=581324366&key=RDJDNDAT652383D231B8805FB9D5B35AB9FB7583E82
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=481072,CODECS="avc1.66.21,mp4a.40.2",RESOLUTION=426x240
chunklist-b481072.m3u8?wowzasessionid=581324366&key=RDJDNDAT652383D231B8805FB9D5B35AB9FB7583E82
```

I don't see any errors in the Plex Logs on the server or on the Roku. The Roku logs are reset once the Roku reboots it looks like. Any tips on how I might be able to debug this? Thanks!

---

<div class="post-metadata">

**Author:** ![meo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/meo/32/4534_2.png) [@meo](https://forums.plex.tv/u/meo)\
**Post date:** [January 19, 2014, 5:58pm UTC](https://forums.plex.tv/t/hls-stream-crashes-roku/54699/2 "2014-01-19T17:58:56Z")

</div>

> I have been working on some issues on the USTVnow plugin and I've noticed that the streams I am getting consistently crash the Roku and subsequently the Roku will need to reboot itself. The streams work perfectly on the other clients I've tested them on. Here is what my MediaObjectsForURL looks like:
> 
> ```
> def MediaObjectsForURL(url):	
> video_url = HTML.ElementFromURL(url).xpath('//video')[0].get('src')
> return [
> MediaObject(			
> audio_channels = 2,
> parts = [PartObject(key=HTTPLiveStreamURL(url=video_url))]
> )
> ]
> ```
> 
> Here is what the m3u8 playlist looks like:
> 
> ```
> #EXTM3U
> #EXT-X-VERSION:3
> #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2383872,CODECS="avc1.66.41,mp4a.40.2",RESOLUTION=1280x720
> chunklist-b2383872.m3u8?wowzasessionid=581324366&key=RDJDNDAT652383D231B8805FB9D5B35AB9FB7583E82
> #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1731072,CODECS="avc1.77.31,mp4a.40.2",RESOLUTION=1280x720
> chunklist-b1731072.m3u8?wowzasessionid=581324366&key=RDJDNDAT652383D231B8805FB9D5B35AB9FB7583E82
> #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=781072,CODECS="avc1.77.31,mp4a.40.2",RESOLUTION=640x360
> chunklist-b781072.m3u8?wowzasessionid=581324366&key=RDJDNDAT652383D231B8805FB9D5B35AB9FB7583E82
> #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=481072,CODECS="avc1.66.21,mp4a.40.2",RESOLUTION=426x240
> chunklist-b481072.m3u8?wowzasessionid=581324366&key=RDJDNDAT652383D231B8805FB9D5B35AB9FB7583E82
> ```
> 
> I don't see any errors in the Plex Logs on the server or on the Roku. The Roku logs are reset once the Roku reboots it looks like. Any tips on how I might be able to debug this? Thanks!

Maybe the Roku can't handle relative paths?

I'd suggest you try using a callback with the @indirect decorator, that usually helps when the paths in the m3u8 list are relative.

For an example, see&nbsp;[https://github.com/plexinc-plugins/Services.bundle/blob/master/Contents/Service%20Sets/com.plexapp.plugins.svtplay/URL/SVTPlay/ServiceCode.pys#L78](https://github.com/plexinc-plugins/Services.bundle/blob/master/Contents/Service%20Sets/com.plexapp.plugins.svtplay/URL/SVTPlay/ServiceCode.pys#L78)

---

<div class="post-metadata">

**Author:** ![jwdempsey](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jwdempsey](https://forums.plex.tv/u/jwdempsey)\
**Post date:** [January 20, 2014, 12:02am UTC](https://forums.plex.tv/t/hls-stream-crashes-roku/54699/3 "2014-01-20T00:02:44Z")

</div>

> Maybe the Roku can't handle relative paths?
> 
> I'd suggest you try using a callback with the @indirect decorator, that usually helps when the paths in the m3u8 list are relative.
> 
> For an example, see&nbsp;[https://github.com/plexinc-plugins/Services.bundle/blob/master/Contents/Service%20Sets/com.plexapp.plugins.svtplay/URL/SVTPlay/ServiceCode.pys#L78](https://github.com/plexinc-plugins/Services.bundle/blob/master/Contents/Service%20Sets/com.plexapp.plugins.svtplay/URL/SVTPlay/ServiceCode.pys#L78)

I will give that a try. Thank you meo.

---

<div class="post-metadata">

**Author:** ![jwdempsey](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jwdempsey](https://forums.plex.tv/u/jwdempsey)\
**Post date:** [January 20, 2014, 6:29pm UTC](https://forums.plex.tv/t/hls-stream-crashes-roku/54699/4 "2014-01-20T18:29:27Z")

</div>

> Maybe the Roku can't handle relative paths?
> 
> I'd suggest you try using a callback with the @indirect decorator, that usually helps when the paths in the m3u8 list are relative.
> 
> For an example, see&nbsp;[https://github.com/plexinc-plugins/Services.bundle/blob/master/Contents/Service%20Sets/com.plexapp.plugins.svtplay/URL/SVTPlay/ServiceCode.pys#L78](https://github.com/plexinc-plugins/Services.bundle/blob/master/Contents/Service%20Sets/com.plexapp.plugins.svtplay/URL/SVTPlay/ServiceCode.pys#L78)

I figured out what was causing the Roku to crash. The Roku can't handle a playlist file with multiple paths (which seems really odd).

---

<div class="post-metadata">

**Author:** ![meo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/meo/32/4534_2.png) [@meo](https://forums.plex.tv/u/meo)\
**Post date:** [January 20, 2014, 8:01pm UTC](https://forums.plex.tv/t/hls-stream-crashes-roku/54699/5 "2014-01-20T20:01:12Z")

</div>

> I figured out what was causing the Roku to crash. The Roku can't handle a playlist file with multiple paths (which seems really odd).

Maybe it is this problem then:

[https://forums.plex.tv/topic/67526-examples-for-flash-over-http-live-streaming/?p=392623](https://forums.plex.tv/topic/67526-examples-for-flash-over-http-live-streaming/?p=392623)

---

<div class="post-metadata">

**Author:** ![jwdempsey](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jwdempsey](https://forums.plex.tv/u/jwdempsey)\
**Post date:** [January 20, 2014, 11:44pm UTC](https://forums.plex.tv/t/hls-stream-crashes-roku/54699/6 "2014-01-20T23:44:58Z")

</div>

> Maybe it is this problem then:
> 
> [https://forums.plex.tv/topic/67526-examples-for-flash-over-http-live-streaming/?p=392623](https://forums.plex.tv/topic/67526-examples-for-flash-over-http-live-streaming/?p=392623)

It looks like the line endings are already .

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 21, 2019, 1:05am UTC](https://forums.plex.tv/t/hls-stream-crashes-roku/54699/7 "2019-12-21T01:05:04Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
