everything.
How to change video resolution with aspect ratio with FFmpeg?
There are options http://manpages.ubuntu.com/manpages/oneiric/man1/ffmpeg.1.html
-s size Set frame size. The format is wxh (ffserver default = 160x128, ffmpeg default = same as source). The following abbreviations are recognized:
and
-aspect aspect Set the video display aspect ratio specified by aspect. aspect can be a floating point number string, or a string of the form num:den, where num and den are the numerator and denominator of the aspect ratio. For example "4:3", "16:9", "1.3333", and "1.7777" are valid argument values.
For example, I have two input videos:
- with a resolution of 200 * 400
- with a resolution of 400 * 700
I need to make an output video with a resolution of 100 * 200.
If I run ffmpeg with -s 100x200, then the second video will have a bad proportion.
How to limit the output video in width, with an automatic aspect ratio in height?
For example, I want to specify only 100 pixels wide for the output video, and ffmpeg should automatically calculate the height with the correct aspect ratio.
For the first video, it will be:
200/100 = 2
400/2 = 200
Those. 100x200
For the second video, it will be:
400/100 = 4
700/4 = 75
Those. 100x75
Is it possible?
ffmpeg video resolution aspect-ratio
Arthur
source share