Browser FFmpeg recipe

Change Video Resolution Online with FFmpeg

Create a 720p-height video with a valid width and copied audio.

Command

Run this FFmpeg command

ffmpeg -i input.mp4 -vf scale=-2:720 -c:v libx264 -crf 24 -c:a copy 720p.mp4

When to use it

  • 720p exports
  • standardized uploads
  • smaller preview files

How it works

  1. Upload a video file.
  2. Change the target height in the scale filter if needed.
  3. Run the command and download the resized output.

Option reference

OptionWhat it does
scale=-2:720Sets height to 720px while preserving aspect ratio.
-crf 24Uses a balanced H.264 quality level.
-c:a copyKeeps the original audio stream.

Practical notes

  • For 1080p output, use scale=-2:1080.
  • Upscaling a low-resolution source will not add real detail.

FAQ

Should I resize by width or height?

Use width when the platform specifies width, and height when the platform asks for 720p or 1080p.

Why not use 1280:720 directly?

A fixed size can stretch the image. The -2 value keeps the original shape.