Resize video to 720p

video filters

// what it does

`scale=-1:720` fixes the output height at 720 and lets ffmpeg derive the width from the source aspect ratio, giving a clean 720p downscale. The second form targets an exact 1280x720 canvas: `force_original_aspect_ratio=decrease` shrinks the frame to fit inside that box without cropping, then `pad=1280:720:-1:-1` centers it and fills the leftover space with black bars (letterboxing). Reach for the first when you only care about height, the second when a downstream tool demands fixed dimensions.

// shell

$ ffmpeg -i input.mp4 -vf "scale=-1:720" output.mp4
$ ffmpeg -i input.mp4 -vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1" output.mp4

// gotcha

`-1` can produce an odd width that yuv420p H.264 rejects with 'width not divisible by 2'; use `-2` instead to force an even result.