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

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed Dec 26 13:44:36 EET 2018




> Am 26.12.2018 um 12:23 schrieb Uwe Freese <uwe.freese at gmx.de>:

> 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.

Yes.
Please provide the command line you tested together with the complete, uncut console output.

If your question was „why are there two SARs/DARs?“, the answer is that container and codec may contain different information: Although it is common to trust the container, this is just an arbitrary decision.

Carl Eugen


More information about the ffmpeg-user mailing list