Hi,

V0id wrote:
> Hi.
>   I have several streams that are detected like this:
> Video: mpeg2video, yuv420p, 352x576 [PAR 24:11 DAR 4:3], 1225 kb/s,
> 25 tbr, 90k tbn, 50 tbc
> 
>   Where the PAR value is taken from AVStream.sample_aspect_ratio field,
> but SAR and PAR, AFAIK is a different things. I want to ask what data
> exactly is stored in this field and how should I calculate resulting
> resolution to resize to display picture correctly?

SAR == PAR basically and in FFmpeg semantics.

You have two values, one in AVCodecContext and one in AVFormatContext,
they might differ if for whatever reason the container decided to write
something different than what's stored in the codec, or
AVCodecContext value might not be set if not available or codec does not
support it, in the latter you need AVFormatContext value.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to