diff options
author | Lars Kiesow <lkiesow@uos.de> | 2019-08-12 15:58:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-08-13 16:48:38 +0200 |
commit | 74d4bc0fa0e0f63b89ce020893c61e6703f3f282 (patch) | |
tree | 81d69ae4982ccc3f6fea090655609dbc3764dcd7 /doc/filters.texi | |
parent | db78bc1297ebaa51cfe5c80775808ec11ed7512b (diff) | |
download | ffmpeg-74d4bc0fa0e0f63b89ce020893c61e6703f3f282.tar.gz |
libavfilter/vf_scale: Ensure scaled video is divisible by n
This patch adds a new option to the scale filter which ensures that the
output resolution is divisible by the given integer when used together
with `force_original_aspect_ratio`. This works similar to using `-n` in
the `w` and `h` options.
This option respects the value set for `force_original_aspect_ratio`,
increasing or decreasing the resolution accordingly.
The use case for this is to set a fixed target resolution using `w` and
`h`, to use the `force_original_aspect_ratio` option to make sure that
the video always fits in the defined bounding box regardless of aspect
ratio, but to also make sure that the calculated output resolution is
divisible by n so in can be encoded with certain encoders/options if
that is required.
Signed-off-by: Lars Kiesow <lkiesow@uos.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'doc/filters.texi')
-rw-r--r-- | doc/filters.texi | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi index e081cdc7bc..01262d845e 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -15369,6 +15369,18 @@ Please note that this is a different thing than specifying -1 for @option{w} or @option{h}, you still need to specify the output resolution for this option to work. +@item force_divisible_by Ensures that the output resolution is divisible by the +given integer when used together with @option{force_original_aspect_ratio}. This +works similar to using -n in the @option{w} and @option{h} options. + +This option respects the value set for @option{force_original_aspect_ratio}, +increasing or decreasing the resolution accordingly. This may slightly modify +the video's aspect ration. + +This can be handy, for example, if you want to have a video fit within a defined +resolution using the @option{force_original_aspect_ratio} option but have +encoder restrictions when it comes to width or height. + @end table The values of the @option{w} and @option{h} options are expressions |