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

HLS only playing audio

                <streamFormat>hls</streamFormat>
<media>
<streamQuality>SD</streamQuality>
<streamBitrate>1500</streamBitrate>
<streamURL>http://xx/channel/content/MommieD/Season1/01x01/01x01-7.m3u8</streamURL>
</media>
<media>
<streamBitrate></streamBitrate>
<streamURL>http://xx/channel/content/MommieD/Season1/01x01/01x01-12.m3u8</streamURL>
</media>
<media>
<streamBitrate></streamBitrate>
<streamURL>http://xx/channel/content/MommieD/Season1/01x01/01x01-17.m3u8</streamURL>
</media>
<media>
<streamBitrate></streamBitrate>
<streamURL>http://xx/channel/content/MommieD/Season1/01x01/01x01-22.m3u8</streamURL>
</media>


There's what my xml looks like, for whatever reason it will only play the audio, and not the video. Obviously these urls won't work, as I edited some of my information out of it, because it's currently hosted at my home. However, I can open VLC, and open it as a network stream, and it streams just fine.

Has anyone had the issue where the Roku will only play the correct audio, in such a case as this?
0 Kudos
6 REPLIES 6
b14d3
Visitor

Re: HLS only playing audio

I've dug around in the code as much as I could, and haven't been able to find any reasoning for this. Does anyone else have any ideas?
0 Kudos
RokuJoel
Binge Watcher

Re: HLS only playing audio

Without a playlist file to look at, and an up and running stream to analyse, and a peek at the code in your video playback function, pretty hard for anyone to help you out here. Also useful information would be the encoding or transcoding settings and method you are using, along with the model and firmware of your Roku.

- Joel
0 Kudos
b14d3
Visitor

Re: HLS only playing audio

At least now I know what information is needed. I'll include as much as I can.

Playlist file:http://99.58.184.42/channel/content/MommieD/Season1/01x01/01x01-7.m3u8
Video Playback Function, as I understand it, is in here:
'**********************************************************
'** Video Player Example Application - Video Playback
'** November 2009
'** Copyright (c) 2009 Roku Inc. All Rights Reserved.
'**********************************************************

'***********************************************************
'** Create and show the video screen. The video screen is
'** a special full screen video playback component. It
'** handles most of the keypresses automatically and our
'** job is primarily to make sure it has the correct data
'** at startup. We will receive event back on progress and
'** error conditions so it's important to monitor these to
'** understand what's going on, especially in the case of errors
'***********************************************************
Function showVideoScreen(episode As Object)

if type(episode) <> "roAssociativeArray" then
print "invalid data passed to showVideoScreen"
return -1
endif

port = CreateObject("roMessagePort")
screen = CreateObject("roVideoScreen")
screen.SetMessagePort(port)

screen.SetPositionNotificationPeriod(30)
screen.SetContent(episode)
screen.Show()

'Uncomment his line to dump the contents of the episode to be played
PrintAA(episode)

while true
msg = wait(0, port)

if type(msg) = "roVideoScreenEvent" then
print "showHomeScreen | msg = "; msg.getMessage() " | index = "; msg.GetIndex()
if msg.isScreenClosed()
print "Screen closed"
exit while
elseif msg.isRequestFailed()
print "Video request failure: "; msg.GetIndex(); " " msg.GetData()
elseif msg.isStatusMessage()
print "Video status: "; msg.GetIndex(); " " msg.GetData()
elseif msg.isButtonPressed()
print "Button pressed: "; msg.GetIndex(); " " msg.GetData()
elseif msg.isPlaybackPosition() then
nowpos = msg.GetIndex()
RegWrite(episode.ContentId, nowpos.toStr())
else
print "Unexpected event type: "; msg.GetType()
end if
else
print "Unexpected message class: "; type(msg)
end if
end while

End Function


The encoding settings should be right, because it works if I use a single video file (and update the related xml entries of course), but it is m4v/aac.
I'm not sure of my Roku information off the top of my head because I am not currently at home, but can provide that later if it is still needed.
Let me know if I missed anything.
0 Kudos
RokuJoel
Binge Watcher

Re: HLS only playing audio

Ok, I think what you are doing wrong is including multiple m3u8 files in your xml. For HLS streams you only need one. If there are multiple bitrate streams then that information should be in one master .m3u8 file, not in your xml. You only need multiple files for progressive download mp4 files, not for HLS streaming.

- Joel
0 Kudos
renojim
Community Streaming Expert

Re: HLS only playing audio

I think there's something strange with your segments. The first segment is only 8.9 seconds long, but maybe that doesn't mean anything. Also, Media Player Classic seems to think the bit rate is "104857Kbps". Clearly that's wrong, but something's strange.

-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
b14d3
Visitor

Re: HLS only playing audio

Sorry for the long delay.

I have since combined everything into a single m3u8 file, and it appears to be working better. But I think that I've run into a problem that was noticed on another forum thread but was never fully explained. The bitrates that I'm getting seem to be really high, even though it's not a high quality video, and after some down-coding. The four bitrates that I'm getting are :
1832000
1201000
989000
897000

And you can see that that is what is listed in the m3u8 file here
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1001, BANDWIDTH=1832000
http://99.58.184.42/channel/content/MommieD/Season1/01x01/01x01-7.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1001, BANDWIDTH=1201000
http://99.58.184.42/channel/content/MommieD/Season1/01x01/01x01-12.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1001, BANDWIDTH=989000
http://99.58.184.42/channel/content/MommieD/Season1/01x01/01x01-17.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1001, BANDWIDTH=897000
http://99.58.184.42/channel/content/MommieD/Season1/01x01/01x01-22.m3u8


I still feel like I'm missing something, or not fully grasping it. So any help would be great. The way that I'm figuring the bandwidth tag is (Video bitrate + Audio Bitrate), using tovid id in Ubuntu to determine each bitrate. Let me know if I can explain anything further.
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.