2
votes

I try to reduce the dimensions of video:

ffmpeg -i input.mp4 -y -acodec aac -ac 2 -ab 160k -vcodec libx264 -vf "scale=-1:'min(720,ih)'" -f mp4 output.mp4

I got :

width not divisible by 2 (405x720)

I tried with:

 -vf "scale=-1:'min(720,ceil(ih/2)*2)'"

Go the same because I need to keep width propotions

Any idea ?

I already read that without success:

FFMPEG (libx264) "height not divisible by 2"

1

1 Answers

5
votes

Use

scale='bitand(oh*dar,65534)':'min(720,ih)'

This will rescale the width proportional to the output height and then reduce it an even value.