Cheatsheet Pages / FFmpeg Cheatsheet

How to resize a video by width and keep the aspect ratio — ffmpeg

You know the width you want; the height should follow the original aspect ratio automatically.

ffmpeg -i input.mp4 -vf "scale=640:-2" output.mp4

Good to know

-2 auto-computes the height and rounds it to an even number — H.264 requires even dimensions.

FFmpeg Cheatsheet one-page card — 28 commands that actually work
The full one-page card — FFmpeg Cheatsheet. Get the complete cheatsheet on GitHub