summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGyan Doshi <ffmpeg@gyani.pro>2019-12-02 21:11:21 +0530
committerGyan Doshi <ffmpeg@gyani.pro>2019-12-08 16:12:31 +0530
commit1b4f473d181abaa0ff4e2d63862f61763a5a6860 (patch)
tree5422676836648b8e68264bf35c236e4442363610 /doc
parentff2b75d94cee65e47db7a56f3924497016e5b420 (diff)
avfilter/scale.c: factorize ff_scale_eval_dimensions
Adjustment of evaluated values shifted to ff_adjust_scale_dimensions Shifted code for force_original_aspect_ratio and force_divisble_by from vf_scale so it is now available for scale_cuda, scale_npp and scale_vaapi as well.
Diffstat (limited to 'doc')
-rw-r--r--doc/filters.texi40
1 files changed, 40 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi
index 6c14030c8d..99da266cec 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -16210,6 +16210,46 @@ Supersampling
@item lanczos
@end table
+@item force_original_aspect_ratio
+Enable decreasing or increasing output video width or height if necessary to
+keep the original aspect ratio. Possible values:
+
+@table @samp
+@item disable
+Scale the video as specified and disable this feature.
+
+@item decrease
+The output video dimensions will automatically be decreased if needed.
+
+@item increase
+The output video dimensions will automatically be increased if needed.
+
+@end table
+
+One useful instance of this option is that when you know a specific device's
+maximum allowed resolution, you can use this to limit the output video to
+that, while retaining the aspect ratio. For example, device A allows
+1280x720 playback, and your video is 1920x800. Using this option (set it to
+decrease) and specifying 1280x720 to the command line makes the output
+1280x533.
+
+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 both the output dimensions, width and height, are divisible by the
+given integer when used together with @option{force_original_aspect_ratio}. This
+works similar to using @code{-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. The video's aspect ratio
+may be slightly modified.
+
+This option can be handy if you need to have a video fit within or exceed
+a defined resolution using @option{force_original_aspect_ratio} but also have
+encoder restrictions on width or height divisibility.
+
@end table
@section scale2ref