[FFmpeg-user] Aspect Ratios: DAR, SAR and Frame Size

James Darnley james.darnley at gmail.com
Mon Jan 13 15:36:37 CET 2014

On 2014-01-13 15:28, Adi Shavit wrote:
> Hi,
>   I have a video for which ffmpeg -i prints: Stream #0:0: Video: vp8,
> yuv420p, 352x240, SAR 10:11 DAR 4:3, 15 fps, 15 tbr, 1k tbn, 1k tbc
> (default)
> As can be seen:
>    - The reported frame size is 352x240. This is an aspect ratio (AR) of
>    22:15
>    - SAR = 10:11
>    - DAR = 4:3
> I have a few questions about these AR values:
>    1. Obviously, the frame size is the decoded size of the frame.
>    However, what do DAR and SAR mean in this context when they are both not
>    1:1?

Display Aspect Ratio and Sample Aspect Ratio.  The latter is also known
as Pixel Aspect Ratio in some places.  This refers at the shape of the

>    2. How many pixels are *actually* stored in each frame before any
>    stretching and/or padding occurs?

You answered that yourself.  The frame is 352 pixels wide and 240 pixels

>    3. Does ffmpeg only stretch or does it also pad the frame to fit the
>    output?

ffmpeg will not change the shape of the video unless you tell it to.
Then it does what you told it to.

>    4. My usage does not care about the displayed video aspect-ratio, but I
>    would *really *like to avoid any padding and also reduce any unnecessary
>    processing (like stretching/scaling).
>    Is it possible to tell ffmpeg to do decode the frames/pixels while
>    keeping their internal AR and avoiding any padding and/or stretching?

It does this.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 683 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20140113/2e29746e/attachment.asc>

More information about the ffmpeg-user mailing list