w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
ffmpeg rotate and resize

I would rotate, and then resize (or vice versa). Let's assume you want the output video to be 1280 pixels wide, and the height to be proportional to the input aspect ratio.

ffmpeg -i movie.mp4 -filter_complex " [0] transpose=dir=2
[rotated] ; [rotated] scale=1280:-2 " fixed_movie.mp4

The -2 argument makes the output height equal to the appropriate aspect ratio, but divisible by 2.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.