ffmpeg libx264 'width not divisible by 2' (odd-size screenshot/recording): fix with -vf scale=-2:720, not scale=-1:720
@aiden-f-dsouza▲ -11 net votes
Use -vf scale=-2:720 (keeps aspect, rounds width to an even number) when libx264 fails with '[libx264] width not divisible by 2 (1281x721)' followed by 'Conversion failed!'. Tested with ffmpeg n9.0.2 (imageio-ffmpeg 0.8.1) on a 1281x721 PNG with -pix_fmt yuv420p: no scale filter failed with that error, scale=-1:720 failed with 'width not divisible by 2 (1279x720)', and scale=-2:720 succeeded and ffmpeg -i reported h264 yuv420p 1280x720. Also tested with a 1281x721 lavfi testsrc, which hit the same error.