Ultimate Guide to Trim/Crop/Resize Videos with FFmpeg

Lynn Hu Lynn Hu
Dec 14, 2022 (Updated: Dec 14, 2022)Filed to: Video Editing

FFmpeg is a professional tool to convert videos and other multimedia files. You can also trim/crop/resize videos with FFmpeg for free. Unfortunately, it works by the command line, meaning you must understand code knowledge, so few people use it. Don’t worry! Here’re the detailed steps to use FFmpeg to trim/crop/resize videos. Just read and follow.

Part 1: What is FFmpeg

Before teaching you how to use FFmpeg to trim/crop/resize videos, let's learn what FFmpeg is. It is a popular and free command-line tool for professional users to handle video, audio, and other media files. With FFmpeg, you can transcode the format of the files and do basic editing. You can also use it as a media player to play your video or audio.

What is FFMPEG

Part 2: How to Trim/Crop/Resize Videos with FFmpeg [Step by Step]

FFmpeg is a free and open-source tool to convert and edit videos. It has many excellent functions, but few people will use it due to its difficulty in operating. This post will detail the steps from installation to how to use FFmpeg to trim/crop/resize videos.

Step 1.Take Windows as an example. Search for FFmpeg on your browser and download the software based on your system.

Install FFMPEG

Step 2.You need to unzip the folder in the ZIP archive to the root directory of the system drive. In most cases, drive C is automatically selected, and you'd better store it in drive D. Then you can rename the folder as FFmpeg. Click the "Environment Variables" button to choose this folder and click the "OK" button.

Choose Path and Install FFMPEG

Step 3.After installation, open a "command" prompt window, type "ffmpeg", and press Enter key to launch it. Now you can trim/crop/resize videos with FFmpeg.

Launch FFMPEG

Step 4.If you want to trim a video using FFmpeg, copy and paste the following command into FFmpeg

"ffmpeg -ss 00:01:00 -i input.mp4 -to 00:02:00 -c copy output.mp4"

This means starting at 00:01 and ending the video at 00:02. The output format is MP4. "−ss" is the start of the trim in the videos, and -to is the end of the trim in the videos. You can adjust the time freely according to your needs.

Cut Video with FFMPEG

Step 5.Crop and resize the video with FFmpeg. You should type the command line as follows:

ffmpeg −i input.mp4 −filter:v 'crop=w:h:x:y' output.mp4

w is the width of the output rectangle in pixels, while h is the height of the output rectangle in pixels. x and y mean the top left corner of the output rectangle, also in pixels. For example, ffmpeg −i input.mp4 −filter:v 'crop=100:100:0:0' output.mp4 means you want to crop the 100 × 100 pixels from the top right corner of input.mp4 file and save the cropped video named output.mp4.

Note

You should replace the input.mp4 with your video file name and extension while replacing output.mp4 with the output video file name and format.

Crop and Resize Videos with FFMPEG

Part 3: Best Alternative to FFmpeg to Trim/Crop/Resize Videos

If you find it troublesome to use FFmpeg to trim/crop/resize videos, you can use the AnyRec Video Converter. This excellent tool provides powerful editing features to adjust the videos, including rotating, cropping, flipping, trimming, merging, and adding watermarks. It has a straightforward interface to edit videos which is friendly to beginners. Moreover, this all-in-one converter can also convert video and audio to any format at a fast speed. Download it to easily trim/crop/resize videos instead of using FFmpeg.

AnyRec Video Converter Package
AnyRec Video Converter

Powerful editing features to trim/crop/resize your videos with simple steps.

No file size limit and convert video to any format and device.

Support improving the video quality by customizing the resolution, frame rate, and bit rate.

Convert multiple videos in a batch at a fast speed.

Free Download

100% Secure

Free Download

100% Secure

Step 1.Free download the AnyRec Video Converter from the official website and launch it immediately. Click the "Add Files" button to import videos.

Import Video

Step 2.If you want to trim your video, you can click the "Cut" button. You can set the start and end time by clicking the "Set Start" and "Set End" buttons. This tool allows you to quickly split the video into several clips by clicking the "Fast Split" button. Click the "Save" button when you have set it.

Cut Video

Step 3.Crop and resize your video by clicking the "Edit" button. In the "Rotate & Crop" section, you can set custom video cropping areas by zoom mode, aspect ratio, and crop area. Moreover, you can rotate a video in different directions.

Rotate Crop Video

Step 4.Last, you should click the "Convert All" button to complete the conversion. To convert videos to other video or audio formats, you can click the "Format" button. Later, choose the format you want to convert from the list.

Convert Video

Part 4: FAQs about Using FFmpeg to Trim/Crop/Resize Videos

Conclusion

Although it is entirely free to use FFmpeg to trim/crop/resize videos, and the process is not easy. After reading, you must get the basic command line for trimming/cropping/resizing videos with FFmpeg. If you encounter problems when using FFmpeg, AnyRec Video Converter is an alternative solution worth considering.

Related Articles: