I am using ffmpeg to scale video files to fit within a size of 1280:720, maintaining aspect ratio, using the below commands. This works most of the time, but every now and then a video with a weird aspect ratio comes out to a scale that is not a multiple of 2 in one of the dimensions, which throws an error when encoding to h.264. Is there a way I can keep the same scaling logic but round off that dimension to a multiple of 2?
By way of example I am currently erroring on a video which is 4:3 720:486 - which scales to 1067:720.
-i input.mov -c:v libx264 -vf scale=w=1280:h=720:force_original_aspect_ration=decrease output.mov