In FFmpeg, if you want to scale a video while retaining its aspect ratio, you need to set either one of the height or width parameter and set the other parameter to -1. 4. [libx264 @ 0x2f08120] height not divisible by 2 (640x853). important, pixel aspect ratio. However, this do... If you want to change the aspect ratio, you need to change the command again. works great until you will encounter error. If you have a file that should be wide-screen (16:9), but displays at. However, I've now run into a case that it does not work correctly, and I suspect it has something to do with SAR and DAR. ffmpeg change resolution Code Example - codegrepper.com $ ffmpeg -i