[FFmpeg-user] Two SAR/DAR pairs (codec and stream SAR/DAR)

Nikita Skalkin nikskalkin at gmail.com
Mon Nov 30 15:27:43 CET 2015

Hello everyone! In our company, we use ffmpeg to parse video info and
convert it, according parsed info. Recently we found a bug in our system.
When calling ffprobe for video, we got 2 SAR/DAR pairs.


Stream #0:0(eng): Video: mpeg2video (4:2:2) (mx3p / 0x7033786D),
yuv422p(tv, bt470bg/smpte170m/bt709), 720x608 [SAR 152:135 DAR 4:3], 30105
kb/s, SAR 35:24 DAR 525:304, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)

In our system we use first pair for detecting video aspect. But in test
video it gives us not correct aspect (for our algorithms), whilst second
pair is right.

I found commit (082491c), that explains second pair. Commits comment says
that ffmpeg prints second pair if stream SAR differs from codec SAR. But I
coundn’t find what is codec SAR, and why it differs from streams SAR. Could
you explain it for me?

Thanks for your help!

More information about the ffmpeg-user mailing list