The setdar
filter sets the Display Aspect Ratio for the filter
output video.
This is done by changing the specified Sample (aka Pixel) Aspect Ratio, according to the following equation:
DAR = HORIZONTAL_RESOLUTION / VERTICAL_RESOLUTION * SAR
Keep in mind that the setdar
filter does not modify the pixel
dimensions of the video frame. Also the display aspect ratio set by
this filter may be changed by later filters in the filterchain,
e.g. in case of scaling or if another "setdar" or a "setsar" filter is
applied.
The setsar
filter sets the Sample (aka Pixel) Aspect Ratio for
the filter output video.
Note that as a consequence of the application of this filter, the output display aspect ratio will change according to the equation above.
Keep in mind that the sample aspect ratio set by the setsar
filter may be changed by later filters in the filterchain, e.g. if
another "setsar" or a "setdar" filter is applied.
The setdar
and setsar
filters accept a string in the
form num:den expressing an aspect ratio, or the following
named options, expressed as a sequence of key=value pairs,
separated by ":".
- max
-
Set the maximum integer value to use for expressing numerator and denominator when reducing the expressed aspect ratio to a rational. Default value is
100
. - r, ratio:
-
Set the aspect ratio used by the filter.
The parameter can be a floating point number string, an expression, or a string of the form num:den, where num and den are the numerator and denominator of the aspect ratio. If the parameter is not specified, it is assumed the value "0". In case the form "num:den" the
:
character should be escaped.
If the keys are omitted in the named options list, the specifed values are assumed to be ratio and max in that order.
For example to change the display aspect ratio to 16:9, specify:
setdar='16:9'
The example above is equivalent to:
setdar=1.77777
To change the sample aspect ratio to 10:11, specify:
setsar='10:11'
To set a display aspect ratio of 16:9, and specify a maximum integer value of 1000 in the aspect ratio reduction, use the command:
setdar=ratio='16:9':max=1000