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

1080p video vs. roScreen

I'm building custom navigation for seeking during a video. I'd like to use roScreen for performance reasons but my HLS video goes up to 1080p. Based on these threads, I believe I can't use 1080p video and roScreen at the same time:

viewtopic.php?p=324107
viewtopic.php?f=34&t=47560&p=323717

Even though I'd like to, I don't need to show the video while the user is navigating, so roVideoPlayer and roScreen don't need to occupy the screen at the same time. I was thinking of the following:
- create roVideoPlayer and play 1080p video
- when the user presses left/right/rw/ff, create a 720p roScreen with custom nav
- when the user has finished navigating, call close() on the roScreen
- resume 1080p playback in roVideoPlayer

Is it possible to do something like the above and still get 1080p playback?
0 Kudos
4 REPLIES 4
MSGreg
Visitor

Re: 1080p video vs. roScreen

I believe this is possible, but I'm not entirely sure it's supported. See this thread on intermixing roScreen and other components (especially the "See here for more background" link)

If I were to try to do it, you're on the path that I'd try first.
0 Kudos
TheEndless
Channel Surfer

Re: 1080p video vs. roScreen

You can use an roImageCanvas without the video memory/resolution limitations with the roVideoPlayer, so that might be an easier option if high fps playback of your UI isn't critical (i.e. if most of your UI elements are static).
If you have to use roScreen to get the performance you need, then you'd still need an roImageCanvas on top of the roVideoPlayer to capture the remote events. You'd might also have to close the roVideoPlayer to free up the video memory for the roScreen during pause/seek, which of course means it'd have to rebuffer on "resume". Basically, what you propose might work, but there are some pretty significant potential roadblocks you need to consider first.
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
kenbrueck
Visitor

Re: 1080p video vs. roScreen

Thanks for the help so far! I've started switching things over to roImageCanvas and the performance is pretty poor. I think I'm missing something.

My UI will have 6 or 7 128x128 images that are scaled up to 256x256 that need to animate (just reposition - no rotation or alpha). For now, I have only two images move 10px each when the user presses a button. On my Roku2 XS, the delay between button press and UI update is roughly half a second. Here's the sub that's called when the user presses a button:


Sub animateImages()
m.x = m.x + 10
list=[
{
url: "http://www.foo.com/image1.jpg",
TargetRect:{x:m.x, y:100, w:256, h:256}
},
{
url:"http://www.foo.com/image2.jpg",
TargetRect:{x:m.x + 200, y:100, w:256, h:256}
}]

m.canvas.SetLayer(0, {
Color: "#00000000",
CompositionMode: "Source" ,
})
m.canvas.SetLayer(1, list)
end Sub


1. Is there a better way to move an existing item in a roImageCanvas? Right now, I'm essentially telling the Roku box to download (or pull from the cache), decode, scale, and draw each image each time. This seems really inefficient but I haven't found anything that would let me simply move/update an existing object instead of recreating it with SetLayer().

2.When I did this with roScreen, the screen updated immediately after a button press. The 500ms I'm seeing now seems unreasonably high. Are there any other things about roImageCanvas that could account for such a delay?

3. Please poke holes in anything else you see that's weird or inefficient!
0 Kudos
TheEndless
Channel Surfer

Re: 1080p video vs. roScreen

Ahh.. nope. If you're doing anything animated, you'll need to use roScreen. The roImageCanvas performance you're seeing, while it can probably be tweaked a bit, is pretty typical. It's not meant for animation.
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