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: 
jbrave
Channel Surfer

video player format question

What is the minimal amount of data I need to send to the video player to get it to play?

I've got an mp4 video, h.264 (according to Quicktime) but when I try to play it I'm getting

showVideoScreen | msg = The format is not supported or the media is corrupt. | index = -5
request failed error: -5 The format is not supported or the media is corrupt.

I threw the vid player together from an example in the Object reference. Here's the tiny bit of data I send to it:


port = CreateObject("roMessagePort")
screen = CreateObject("roVideoScreen")
episode.HDBranded = false
episode.IsHD = false

episode.Stream = { url:playurl
quality:false
}

episode.StreamFormat="mp4"

screen.SetContent(episode)
screen.SetMessagePort(port)
screen.Show()
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
2 REPLIES 2
RokuChris
Roku Employee
Roku Employee

Re: video player format question

All you absolutely have to provide is the URL. Roku assumes mp4 if you omit the format. As an example, this works fine...

Sub Main()
vid = {
stream: {
url: "http://msnbcpod.rd.llnwd.net/e1/video/podcast/pdv_countdown_netcast_m4v-10-25-2010-195641.m4v"
}
}

screen = CreateObject("roVideoScreen")
screen.SetMessagePort(CreateObject("roMessagePort"))
screen.SetContent(vid)
screen.Show()

while true
msg = wait(0, screen.GetMessagePort())

if msg <> invalid then
if msg.isScreenClosed()
exit while
end if
end if
end while
end sub
0 Kudos
jbrave
Channel Surfer

Re: video player format question

as it turns out, that was exactly what I did wrong: I use "playurl" as the variable name but used "url" when I called the play sub!
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
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.