[FFmpeg-user] ffmpeg keep aspect ratio when scaling, keep dimensions divisable by n

mail-login+ffmpeg at protonmail.com mail-login+ffmpeg at protonmail.com
Thu Apr 9 17:58:22 EEST 2020


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, April 9, 2020 1:00 PM, Peter van den Houten <petervdh at gmail.com> wrote:
> 

> Try:
> 

> ffmpeg -i video.MTS -vf scale=720:-2 -c:v libx264 -crf 20 -c:a copy -y padded.MTS
> 

> Change -crf 20 up or down to suit quality and/or file size.
> 

> Regards
> Peter

Yes I noticed that, the problem with this is that I want my script to be as general as possible so I don't know in advance which dimension has to be scaled.

Cheers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: publickey - mail-login+ffmpeg at protonmail.com - 0xF3A8BCD0.asc
Type: application/pgp-keys
Size: 3216 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20200409/d76af55c/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 823 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20200409/d76af55c/attachment.sig>


More information about the ffmpeg-user mailing list