Roku Developer Program

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

how to get stream video resolution?

Hi All

Is it possible in screen graph to get native stream resolution? or at least its aspect ratio?

Thank you in advance for your feedback.
0 Kudos
4 Replies
Roku Employee
Roku Employee

Re: how to get stream video resolution?

The width and height are set in the XML of the Video node — your StackOverflow question about padding, it'd also be good just to verify that the video streams themselves do not have any padding.
0 Kudos
destruk
Level 10

Re: how to get stream video resolution?

I think what he's looking for the is width and height of the source video itself that is streaming, rather than the specified size of the video player window playing the video stream.
I don't know of a way to get that info on the roku side unless it has been pre-specified in the content feed and parsed into the content node before display (ie running ffmpeg or mediainfo on the server, having the source resolution in a database, or manually specified in the xml or json feed for the channel).
There isn't a corresponding roVideoMetaData to correspond or accompany the roAudioMetaData component.
0 Kudos
kszadkow
Level 7

Re: how to get stream video resolution?

Destruk is right I am after the stream resolution not the Video component size. I need to accurately align some graphical elements with the video.
0 Kudos
adrianc1982
Level 7

Re: how to get stream video resolution?

i would also love to have this function to get the resolution that way i can make a proper zoom on 4:3 content if the user decides to... (stretch)
0 Kudos