FFmpeg is an open-source command line tool that was designed for processing multimedia files and streams. It supports a vast number of audio and video codecs and can be used to change video type to another. In this article, we’ll explore how to let FFmpeg convert AVI to MP4 format on Windows, Mac, and Linux.
Though beginners need to go through a learning curve and easily make mistakes when using FFmpeg for the first time, it still makes one of the most popular media processing tools, not only for its endless capabilities but also for its great compatibility. Hence, you can perform FFmpeg AVI to MP4 conversion on various platforms.
(I’m assuming you already get the latest FFmpeg installed on your device. If not, you can go to https://ffmpeg.org/download.html to download and install it.)
First, we’ll guide you through how to use FFmpeg command to convert AVI to MP4 on Windows:
Step 1. To bring up the command window, open the folder where your AVI video is. Then click to select the full file path and type in CMD instead. Press Enter to open the FFmpeg command window.
Step 2. Now you can enter the commands to start the format conversion. Enter the following commands line to use FFmpeg to convert AVI to MP4:
ffmpeg -i input_filename.avi output_filename.mp4
This is a typical command used in FFmpeg for video format conversion.
FFmpeg: refer to the FFmpeg software.
i: indicate the input file.
input_filename: replace it with the .avi file name that you want to convert.
output_filename: replace with the exported file name.
By default, FFmpeg re-encodes your video during conversion. But if you just want to let FFmpeg change container AVI to MP4, you can add the “copy” codec to make a copy of your file, thus you can make FFmpeg convert AVI to MP4 without losing quality. Here is the command line:
ffmpeg -i input_filename.avi -c:v copy -c:a copy output_filename.mp4
Step 3. Make sure you enter the right command line and press the Enter key on your keyboard to start the conversion at once. You’ll find the output video file in the same folder as the input file.
Here is how can you perform AVI-to-MP4 conversion using FFmpeg on Mac.
Step 1. The easiest way to install FFmpeg on Mac is by using Homebrew. If you haven’t installed it, open the Terminal app and run the following commands:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Step 2. Be patient and wait for the download to complete. Then continue with these two commands to install and update FFmpeg:
brew install ffmpeg
brew update ffmpeg
Step 3. If you want to convert AVI to an MP4 file encoded with H.264 on Mac, use the below command:
ffmpeg -i input_filename.avi -c:v libx264 output_filename.mp4
Have a bunch of AVI videos for conversion? Then execute this command:
for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done
For Linux users who want to change the video format container only, run this command:
Ffmpeg -i input_filename.avi output_filename.mp4
If you have specific parameter needs for the output, you just need to add the corresponding FFmpeg option to the command. For example, run this command to export the MP4 video encoded with MPEG-4 codec, 128kbps audio bitrate, and 1,200kbps video stream.
ffmpeg -i input_filename.avi -ab 128 -b 1200 -vcodec mpeg4 output_filename.mp4
Once you corner the learning curve, you can take advantage of these command lines to do various audio, video transcoding, editing, and conversion operations.
Also, an FFmpeg alternative is prepared below if you are working with Windows devices and prefer an easier solution. Without suffering from a deep learning curve, WonderFox Free HD Video Converter Factory enables even first-time users to convert video and audio within 3 steps!
More are described in detail below.
Convert AVI to MP4, MOV, AVI, MP3, WAV, etc.
Compress video size with minimum quality loss;
Download videos from YouTube, Facebook, Twitter, etc.
Save YouTube playlists and channels for free;
Trim, crop, rotate, add watermark and video effects.
Import, convert, and export! WonderFox Free HD Video Converter Factory converter allows you to convert AVI and virtually all types of video and audio formats to 500+ output presets within 3 steps. Besides, you can adjust the output settings to change the AVI container to MP4 only.
In addition to format conversion, it supports editing and downloading as well. All are easy to use. Download and give it a bash!
Launch the Free HD Video Converter Factory and enter the Converter module. Press the + Add Files button to load the source .avi video file or straightly drag it into the program.
Hit the format image on the right side to open the full list of 500+ output profiles. Click on the Video tab and select MP4.
This program provides beginners with optimal presets. But it also enables you to customize the parameters if neeeded. Go to Parameter settings to modify settings like codec, resolution, bitrate, frame rate, etc.
Finally, hit the triangle button at the bottom to set a new output folder. You can also just leave it as default. Click Run to start the conversion at once.
Which converter will you go for in the end after learning how to convert AVI to MP4 with FFmpeg and the easiest alternative. For novices, WonderFox Free HD Video Converter Factory is the better way to go. Simple yet professional! It’s worth a shot. Free download and install it here:
WonderFox DVD Ripper Pro
1. Rip DVD to 300+ presets with GPU acceleration.
2. Remove all sorts of DRM from DVD.
3. Compress an 8GB DVD to 1-2 GB digital video file.
4. 5-minutes to fast digitize DVD in MPEG-2 MPG.
5. Make a 1:1 intact digital copy (ISO or VIDEO_TS).
6. Multiple audio tracks, hard/soft and forced subs.
7. Support homemade/commercial DVD & ISO & Video_TS folder.
Privacy Policy | Copyright © 2009-2024 WonderFox Soft, Inc.All Rights Reserved