[FFmpeg-user] Question about handling / unwanted changes of SAR in ffmpeg

Uwe Freese uwe.freese at gmx.de
Wed Dec 26 13:23:20 EET 2018


Am 26.12.18 um 02:00 schrieb Carl Eugen Hoyos:
>> I'm confused about how ffmpeg handles the SAR (sample aspect ratio) and changes it. Maybe someone can explain why this happens:
>> I've a video from TV with original size 720x576 pixels (PAL), which shall be shown as 16:9 aspect ratio.
>> The SAR of the input video is correctly shown as 64:45 (resulting in 720*64 / 576*45 = 46080 / 25920 = 16 / 9 display aspect ratio).
>> When I crop black borders
> SAR is expected to change if you crop.
> Rounding can be different for different codecs and containers.

Why? The DAR, yes. But the SAR should stay the same. And it does 
regarding the first output from ffmpeg in the brackets.

My questions remain: What does SAR (and DAR) mean in the brackets 
compared to the second SAR 172:121, which is slightly different?

     Stream #0:0: Video: h264 (High), yuv420p(progressive), 688x560 [SAR 
64:45 DAR 2752:1575], SAR 172:121 DAR 7396:4235, 50 fps, 50 tbr, 1k tbn, 
100 tbc (default)

Why isn't the second one also telling the same SAR 64:45 (which would be 
the correct one)? I don't see how 64:45 is rounded to 172:121. :)


More information about the ffmpeg-user mailing list