Discussion:
[Libav-user] Correct way to get the actual display resolution
Info || Non-Lethal Applications
2018-11-26 20:19:26 UTC
Permalink
Hi guys!

I was wondering if there is one correct solution to get a movie’s display resolution?

There’s AVCodecContext width/height and coded_width/coded_height and then there’s also AVStream's sample_aspect_ratio and display_aspect_ratio.
For some movies, some have bogus values and it’s hard to determine programmatically which value to use.

Is there one solution that is always correct? Taking cropping and scaling into account?
It has been a lot of trial and error so far and I’m wondering if I’m doing it the right way.

Thanks for your help!

Loading...