How to Crop Video with FFmpeg Command Line with Concrete Steps

Video Cropper Tools
1. Crop a Video in Adobe Premiere Pro
2. Crop a Video in iMovie
3. Crop a Video in QuickTime
4. Crop a Video in Windows Movie Maker
5. Crop Video with Ffmpeg
6. Crop a Video in Windows Media Player
7. Change Aspect Ratio in Final Cut Pro
8. Crop Video in VLC
9. Crop Video Capture in OBS

How to Crop Video with FFmpeg Command Line with Concrete Steps

Although FFmpeg is an open-source suite of tools and free to perform a wide range of tasks, from video converting to editing, few people use it. That is partly because it works by command line. It means that the users must understand technical skills. In this tutorial, you will learn one of the most basic feature, how to crop a video using FFmpeg's crop filter. Even if you are beginner and non-tech savvy, you can follow the steps to get what you want easily.

FFmpeg Crop Video

Part 1: How to Crop a Video with FFmpeg

Below we share the throughout steps to crop a video with FFmpeg, from installation. We do it on Windows 10. The installation process might be different on Mac or Linux, but video cropping is the same.

Step 1. Open your browser, visit https://www.ffmpeg.org and download the right package based on your system.

Install FFmpeg

Step 2. Extract the folder from the ZIP archive to the root of your system drive. In most cases, it is C drive. Then rename the folder to FFmpeg.

Install FFmpeg Windows10

Step 3. Search for Edit the system environment variables, and open it. Next, click Environment Variables in the Advanced tab. Choose Path, click Edit button and hit New. Input C:\ffmpeg\bin\ on the Edit environment variable dialog and click OK.

Verify FFmpeg Installation

Step 4. After installing, open the command prompt window, type ffmpeg and hit Enter key. If everything goes well, you will see FFmpeg details, like version number, configuration, etc.

Step 5. To crop a video using FFmpeg, run the command prompt as administrator and type in the command:

ffmpeg -i input.mp4 -filter:v "crop=w:h:x:y" output.mp4

Replace input.mp4 with your video file name and extension.

-filter:v means using a video filter.

There are four parameters in the crop filter, w, h, x and y. The first parameter refers to the width of the output video, the second means the height of the output, x is the horizontal opposition from where to crop, and the last one is the vertical position to begin cropping.

Replace output.mp4 with your output video file name and format.

For example, ffmpeg -i input.mp4 -filter:v "crop=100:100:0:0" output.mp4 means crop the 100 × 100 pixels from top right corner of input.mp4 and save the cropped video named output.mp4.

Step 6. Now, you can go to your computer and check whether the output video is cropped as you wish.

Note: We just share the basic crop filter. There are more parameters involved. For instance, iw is the width of the original video and ih is the height of the original video. For example, ffmpeg -i input.mp4 -filter:v "crop=iw-100" output.mp4 means cropping 100 pixels from top and bottom of the original video.

Part 2: Best Alternative to FFmpeg to Crop Video

As you can see, it is a bit complicated for beginners to master the command lines of FFmpeg. If you are confused, why not use a GUI program directly, such as AnyMP4 Video Converter Ultimate. It equips pro-level video editing features in the way that everyone can learn quickly.

Main Features of the Best Alternative to FFmpeg

Free Download For Windows

Secure Download

Free Download For macOS

Secure Download

How to Crop a Video with FFmpeg Alternative

Step 1. Import a video

Launch the best alternative to FFmpeg when you intend to crop a video or videos. It is compatible with Windows and Mac. Click the Add Files menu and choose Add Files or Add Folder to open the desired video. If you have several videos to crop, open all of them together.

Add File

Step 2. Crop video

Click the Edit button under the video title, which is labeled a magic-bar icon. That will trigger the video editor window. Choose the Rotate & Crop tab and the cropping box will appear around the image. There are several ways to crop a video. Adjust the cropping box to only crop the video with FFmpeg alternative. You can also set it in the Crop Area accurately. To change aspect ratio, set it in the Aspect ratio option. Monitor the effect in the preview window in real time.

Rotate Crop

Step 3. Save cropped video

Once you are satisfied with the cropped video, click the OK button. To apply the change to other videos, click the Apply to All button. Go back to the main interface and click the Folder button to set the destination folder. If you intend to change the video format, open the profile dialog by hitting the Convert All to option at upper right side. Finally, click on the Convert All button.

Convert All

Related:

Best Video Crop Editor

How to Crop a Video on iPhone

Part 3: FAQs about FFmpeg Crop Video

Is there a GUI for FFmpeg?

By default, FFmpeg just works by command lines. Some developers released GUI for FFmpeg. You can look for a FFmpeg GUI on the web. It is able to simplify the workflow, but you must get it from verified sources in order to avoid virus and malware.

Can I crop a video in VLC?

Yes, VLC is able to crop a video temporarily or permanently. However, the workflow is very complicated similar to other freeware. You'd better search for a guide from the internet.

How to resize a video in HandBrake?

After opening the video in HandBrake, go to the Dimensions tab at the bottom and you will see the Orientation and Cropping section. Here you can resize a video by cropping from top, bottom, left and right. You can also change the aspect ratio too.

Conclusion

Although FFmpeg is an open-source solution and absolutely free to use, it is not easy to crop video or do other editing. We have told you the basic command line of the cropping filter. If you encounter troubles when using FFmpeg, AnyMP4 Video Converter Ultimate is an alternative worth to consider. If you still have more questions, please feel free to write down a message below this post and we will reply on it as soon as possible.

What do you think of this post?

Excellent

Rating: 4.8 / 5 (based on 158 ratings)

October 21, 2021 08:37

Related Articles

CommentAdd your comments to join the discussion here