You can reduce video size, change aspect ratio or resolution using command line with FFmpeg tool in Windows 11/10. In this article, I am going to show you how to resize the dimensions of a video through the command-line interface in Windows.
FFmpeg is a free and open-source video and audio processing software for Windows. It is a command-based utility that consists of various libraries and programs to play, stream, record, and convert video and audio files. Each of its functionalities can be used with respective commands. It also lets you change the dimensions of a video and for that, a specific video resizing command is required. Let’s see what that command is and what steps you need to follow to resize a video using the command in Windows 10.
How to resize a video using Command-line through FFmpeg
The steps to resize videos using the command are as follows:
- Download the latest version of FFmpeg
- Unzip the downloaded folder.
- Run Command Prompt.
- Enter the Video Resizing Command.
Let us discuss these steps in detail now.
First and foremost, you need to download FFmpeg from ffmpeg.org and then extract the executable files from the folder. After that, go to the sub-folder where the FFmpeg.exe file is present. It is usually found in the bin folder of the main folder.
Now, in the address bar, type “CMD” and then press Enter button. It will open up the Command Prompt.
In the CMD, enter a command with the following syntax which is used to resize a video in FFmpeg:
ffmpeg -i <source video> -vf scale=<width>:<height> <output video>
In the above command, replace <source video> and <output video> with the full path of your input and output video files, respectively. And, enter new video dimensions in place of <width>:<height>.
An example of one such command is:
ffmpeg -i C:\twc-video.avi -vf scale=640:360 C:\twc-video.mp4
Press the Enter button to execute the video resizing above command. It will resize your video in a few seconds or minutes, depending upon the length of your video.
More Video Resizing Commands for FFmpeg:
There are multiple other video resizing commands that you can use, such as:
- If you want to resize a video to half of its original size, then use:
scale=w=iw/2:h=ih/2
- To resize a video to double of its original dimensions, use this syntax:
scale=w=2*iw:h=2*ih
- In case you want to increase the width to a maximum of 500 pixels while keeping the aspect ratio the same as the input, use:
scale=w='min(500\, iw*3/2):h=-1'
You can download the tool and read more about its commands and syntaxes on ffmpeg.org.
FFmpeg is a great tool to process audio and video through Command Line Interface. Its resizing and other commands are pretty easy to use. So, try FFmpeg to change video dimensions using command prompt on Windows 11/10.