[Libav-user] Difference between AVStream::sample_aspect_ratio and AVCodecContext::sample_aspect_ratio

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Nov 13 00:23:54 CET 2013


Anders Rein <are at ...> writes:

> When decoding IMX video from a mov file I get two different 
> values for sample_aspect_ratio whether I look in AVStram or 
> AVCodecContext. How are the two values retrieved/calculated? 

(ffmpeg -i output missing)
I would guess one SAR is written in the bitstream, the other 
in the container.

> Which one should I use?

While it is often a good idea to trust the container, only 
you can answer the question...

Carl Eugen



More information about the Libav-user mailing list