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: 

How to Play Video (Http Url)

I tried to play video with "roVideoScreen" and it worked well with local video (localhost url)
But it is not working with http link like "http://www.useducationtv.com/Mobile.aspx?action=video&videoId=64e7249efa8f4e7b90a3f2f63754be5e"

brs code is given below
Function Main()
showVideoScreen(CreateObject("roAssociativeArray"))
End Function


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")
episode.HDBranded = false
episode.IsHD = false
episode.Stream = { url:"http://www.useducationtv.com/Mobile.aspx?action=video&videoId=64e7249efa8f4e7b90a3f2f63754be5e",
bitrate:2000
quality:false
contentid:"mycontent-2000"
}
'episode.StreamFormat: "mp4"
screen.SetContent(episode)
screen.SetMessagePort(port)
screen.Show()
while true
msg = wait(0, port)
if type(msg) = "roVideoScreenEvent" then
print "showVideoScreen | msg = "; msg.GetMessage() " | index = "; msg.GetIndex()
if msg.isScreenClosed()
print "Screen closed"
exit while
else if msg.isStatusMessage()
print "status message: "; msg.GetMessage()
else if msg.isPlaybackPosition()
print "playback position: "; msg.GetIndex()
else if msg.isFullResult()
print "playback completed"
exit while
else if msg.isPartialResult()
print "playback interrupted"
exit while
else if msg.isRequestFailed()
print "request failed – error: "; msg.GetIndex();" – "; msg.GetMessage()
exit while
end if
end if
end while
End Function
0 Kudos
9 REPLIES 9
destruk
Streaming Star

Re: How to Play Video (Http Url)

Is there a reason you have the stream format commented out for mp4?
What displays in the debugger when it tries to play the video? The encoding should work (AVC/AAC LC CBR)
0 Kudos

Re: How to Play Video (Http Url)

I tried with un-commenting the "'episode.StreamFormat: "mp4"" , but still not working.

Debugger's message is :
showVideoScreen | msg = An unexpected problem (but not server timeout or HTTP error) has been detected. | index = -3
request failed error: -3 An unexpected problem (but not server timeout or HTTP error) has been detected.
0 Kudos

Re: How to Play Video (Http Url)

I think the problem is Redirecting of url.
This Url Redirects to some other url when we hit it and return video. So i want to know that is there any way to get response in this case.

This Url works with other Players like VLC with Network Stream option.
0 Kudos
RokuMarkn
Visitor

Re: How to Play Video (Http Url)

Redirects shouldn't cause any problem, the Roku should just follow the redirect. You could try passing the redirected URL to the player to rule out any problem with redirects.

--Mark
0 Kudos
TheEndless
Channel Surfer

Re: How to Play Video (Http Url)

"RokuMarkn" wrote:
Redirects shouldn't cause any problem, the Roku should just follow the redirect. You could try passing the redirected URL to the player to rule out any problem with redirects.

--Mark

We recently experienced issues with a stream url that lead to a 302 redirect. It would actually hang the player, and in some cases (primarily with Roku 1) cause the box to crash. Setting the StreamStickyHttpRedirects attribute to True fixed it for us. The documentation would suggest the opposite affect, but I won't complain.. 🙂
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
Kenwhit23
Visitor

Re: How to Play Video (Http Url)

I had the same problem with some local host videos on my computer. When you uploaded it is it possible it may have changed the file format??? I know that when i use roksbox on my roku and i dont have a mp4 in a roku usable format (I use different video and audio types in my mp4's for different things) I get that error. but when i reformat it making sure it fits streaming requirements the error goes away. It is possible that the site converts and streams it in a different file format to make it load faster?
0 Kudos

Re: How to Play Video (Http Url)

The problem is we haven't found a way to play *https* hosted videos on roku box yet.
Please let me know if there is some explicit configurations to play https urls.

Thanks,
-- Mitesh
0 Kudos
RokuKevin
Visitor

Re: How to Play Video (Http Url)

Please be sure you have your server's CA cert in the keystore for your app.

Here's a forum post with details on certs:
viewtopic.php?f=34&t=27562&start=0&hilit=ssl+mutual+auth

--Kevin
0 Kudos

Re: How to Play Video (Http Url)

Okey, I understand.

Case 1: If we decided to install RokuCA on our server:
The problem is we have hosted our videos on brightcove's sever.
Its a regular video streaming hosting server and I am not sure if they will agree to install our requested CA on there server.
(I am not sure about this if you recommend, we can drop a mail to there support)
...

Case 2: If brightcove suggest us to install *their CA" on Roku platform:
If i am understanding it correctly from the thread you have mention, we can not install our own client certificate on the Roku ?

Is it possible to play videos ( right now we are using "roVideoScreen" ) from https url without making *any* changes on server side ?

example
https://delve-protected.s3.amazonaws.co ... TJmzP7g%3D
[ url will expire shortly ]



Please let me know if i am missing something OR i am not getting it right.

-- Mitesh
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.