If you feel like this example could be improved, you may edit this example here.
Downscale a video to 720p width without stretching or squashing it — handy before uploading to size- or resolution-limited platforms. -vf "scale=1280:-2" sets the width to 1280 pixels and computes the height automatically; the -2 preserves the aspect ratio while rounding to an even pixel count, which encoders like libx264 require. Swap in 1920:-2 for 1080p.