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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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
Binge Watcher

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

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