ffmpeg:video:resize:maintain_aspect_ratio
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
ffmpeg:video:resize:maintain_aspect_ratio [2025/01/29 22:16] – peter | ffmpeg:video:resize:maintain_aspect_ratio [2025/01/29 22:18] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== ffmpeg - Video - Resize - Maintain aspect ratio ====== | ====== ffmpeg - Video - Resize - Maintain aspect ratio ====== | ||
+ | |||
+ | <code bash> | ||
+ | -vf scale=1920: | ||
+ | -vf scale=-1: | ||
+ | -vf scale=1920: | ||
+ | -vf scale=-2: | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE:** | ||
+ | |||
+ | * **-1** for the width or height will keep it in ratio to the other specified dimension. | ||
+ | * **-2** will keep it in ratio to the other specified dimension, but, to ensure it is divisible by 2 (a requirement for certain encodings such as yuv420p) the width or height will be adjusted if necessary. | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Example ===== | ||
<code bash> | <code bash> |
ffmpeg/video/resize/maintain_aspect_ratio.1738188973.txt.gz · Last modified: 2025/01/29 22:16 by peter