Browser FFmpeg recipe

Resize Video Online with FFmpeg

Resize a video to 1280 pixels wide while preserving aspect ratio.

Command

Run this FFmpeg command

ffmpeg -i input.mp4 -vf scale=1280:-2 -c:a copy resized.mp4

When to use it

  • web publishing
  • smaller previews
  • standard HD exports

How it works

  1. Upload the source video.
  2. Set the target width in the scale filter.
  3. Run FFmpeg and download the resized video.

Option reference

OptionWhat it does
scale=1280:-2Keeps aspect ratio and chooses a codec-safe even height.
-c:a copyCopies audio without re-encoding.

Practical notes

  • Use scale=1920:-2 for 1080p-style width.
  • Use scale=-2:720 when you care about height instead of width.

FAQ

Will resizing change the aspect ratio?

No, the -2 value keeps the original aspect ratio and rounds to a safe even number.

Can I resize and compress at the same time?

Yes. Combine the scale filter with H.264 CRF settings from the compression recipe.