Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

Video Screen Size based on Conditions


Is there a way to set the video screen dimensions based on the video file (mp4) dimensions properties using the functions below?

SetDestinationRect(x as Integer, y as Integer, w as Integer, h as Integer)
SetMaxVideoDecodeResolution(Integer width, Integer height) as Void

There are some cases where the top and bottom black bars are too much and would like to reduce them by resizing the video screen based on video file properties.

0 Kudos
2 Replies
Roku Employee
Roku Employee

Re: Video Screen Size based on Conditions

You would have to determine the dimensions on your server (with ffmpeg or mediainfo or something similar, or by hand) and pass those dimensions to your brightscript program with XML or JSON metadata, and then see if you can adjust SetDestinationRect to compensate.

Best would be to encode your content in the desired aspect ratio to eliminate that, or to use source content that is of the desired aspect ratio.

- Joel
0 Kudos
Level 7

Re: Video Screen Size based on Conditions

Also if you know all this beforehand and the data is essentially static you can overlay attractive borders or a rectangle
Border the same color as the screen below. If fullscreen you can still overlay
Something more appealing. If using image canvas set your border layer above
The video. If roscreen set the sprite z order above the video
My Channels: 2D API Framework Presentation:
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos