10/16/2025

Resize and scale videos effortlessly with FFmpeg. This guide provides the simple command to change a video's resolution while showing you how to maintain the aspect ratio.

How to Change Video Resolution with FFmpeg (Resizing & Scaling)

Do you need to scale down a high-definition video to send it over the web, or perhaps upscale a low-resolution clip to match your project's sequence? Adjusting video resolution is one of the most fundamental tasks in video processing. With FFmpeg, you can precisely control a video's dimensions using a simple filter.

🚀 Quick Path: The FFmpeg Command

To change the resolution of a video file (e.g., input.mp4) to 1280x720 pixels, use the following command:

ffmpeg -i input.mp4 -vf "scale=1280:720" output.mp4

FFmpeg will process the input and generate a new video with the specified dimensions.

🧠 The Breakdown: What Each Parameter Means

The core of this operation is the scale filter. Let's break down each part:

Parameter Explanation Example
ffmpeg The command that starts the FFmpeg program. ffmpeg
-i input.mp4 -i stands for "input," followed by your source video file. -i my_4k_video.mp4
-vf Short for "video filter," this tells FFmpeg you are about to apply one or more filters. -vf
"scale=w:h" This is the filter used for resizing the video. "scale=1280:720"
↳ w width for the new desired output video. 1280
↳ h height for the new desired output video. 720
output.mp4 The filename for your new, resized video. resized_video.mp4

FAQ & Variations

Q: I only want to specify the width. How do I make FFmpeg calculate the height automatically to maintain the original aspect ratio?

A: This is a crucial question to avoid a stretched or squashed video. You can set the dimension you don't want to calculate to -1. FFmpeg will automatically compute the correct value based on the other dimension and the original aspect ratio.

For example, to scale the video width to 640 pixels while preserving the aspect ratio:

ffmpeg -i input.mp4 -vf "scale=640:-1" output_aspect_ratio.mp4

Likewise, you could specify the height and have the width calculated automatically: "scale=-1:480".

Q: Is there an easier way to just make the video half its original size?

A: Yes, there is! The FFmpeg filter system supports mathematical expressions based on the input's properties. You can use iw (input width) and ih (input height) as variables.

To scale a video to exactly half of its original resolution:

ffmpeg -i input.mp4 -vf "scale=iw/2:ih/2" output_half_size.mp4

This method is perfect for batch processing, as you don't need to know the specific resolution of each video beforehand.