Step-by-Step Guide on FFmpeg Convert AVI to H264 MP4
No matter which digital player you own, you will find 4Media MP4 Converter for Mac is made just for you. The Mac MP4 converter can convert AVI to MP4, MP4 to AVI, AVI to M4V, MP4 to MP3 music on Mac OS X for playing on iPod, iPod touch, iPhone 3G, iPhone 3GS, iPhone 4, PSP, Apple TV, Archos, iRiver, Creative Zen, PS3 and other portable MP4 players. With two-pass video processing, Handbrake has proven to be one of the best AVI to MP4 converter software that is available for free download on both Windows PC and Mac platform. The user interface may look scary for the first time but once you are familiar with it, navigation becomes very easy.
FFmpeg is available for Windows, Linux and Mac operating systems. Below we will show you how to free convert avi files to mp4 using FFmpeg on Windows. The steps on other platforms are basically the same.
Download FFmpeg on Computer
Go to FFmpeg official site and navigate to the download page. There are builds for three different OS in 32-bit and 64-bit. Download the version based on the operating system of your computer.
Launch iSkysoft AVI to MP4 converter on your Mac and click on Add Files button from the Convert section to add the local AVI videos. Then you'd see the information and thumbnail images of the added AVI files appear on the primary interface. Aiseesoft Free Video Converter – Free MP4 to AVI Converter with One Click. Aiseesoft Free Video.
Extract FFmpeg Files
After the package is downloaded, you will get a zip file. The zip file won't do any avi to mp4 conversion and now you need to extract FFmpeg from the folder. First download a free zip extractor named 7-Zip.
Use the extractor to extract the file, and create a new folder in C drive named FFMPEG. Copy and paste the contents of the extracted folder into the created folder in C drive.
Enable FFmpeg in Command Line
Convert Avi To Mp4 Mac Free
To allow us to use FFmpeg command to transcode avi format to mp4, we need to enable the tool in the command line first to allow FFmpeg avi to mp4 converter to be recognized by the system.
Click the Start Menu > right click on Computer and select Properties > click on Advanced system settings in the system windows > open Environment Variables > now click Edit button and enter ;cffmppegbin (note the semi-colon) in the Variable value field and then click OK.
Run FFmpeg Command Tool
The FFmpeg is installed and enabled for converting avi videos to mp4 and you only need to open it and enter the command line. To open FFmpeg, click Run and type cmd and press the Enter button > Then enter cd and press Enter > enter cd FFmpeg and the tool will open > enter cd bin and press Enter > now enter ffmpeg.exe and press Enter. And this means that the tool is open and ready to convert avi to mp4 using FFmpeg command line.
Start Free FFmpeg AVI to MP4 Conversion
Now comes to the step to let FFmpeg convert avi to h264 mp4. For this purpose, simply input the command line as the picture below:
ffmpeg -i input.avi -cvodec libx264 -acodec libfaac output.mp4
ffmpeg -i input.avi -cvodec libx264 -acodec libfaac output.mp4
More tips on converting avi videos to mp4 with FFmpeg:
To enable avi to mp4 command line in FFmpeg lossless without transcoding, enter the command line:
ffmpeg -i infile.avi -acodec copy -vcodec copy outfile.mp4
To enable avi to mp4 command line in FFmpeg lossless without transcoding, enter the command line:
ffmpeg -i infile.avi -acodec copy -vcodec copy outfile.mp4
To batch convert avi files to mp4 with FFmpeg command line, enter:
for %%a in ('*.avi') do ffmpeg -i '%%a' -c:v libx264 -preset slow -crf 20 -c:a libvo_aacenc -b:a 128k 'newfiles%%~na.mp4'
pause
for %%a in ('*.avi') do ffmpeg -i '%%a' -c:v libx264 -preset slow -crf 20 -c:a libvo_aacenc -b:a 128k 'newfiles%%~na.mp4'
pause
To compress avi video, enter the command line below:
ffmpeg -i input.avi -vcodec msmpeg4v2 -acodec copy output.avi
ffmpeg -i input.avi -vcodec msmpeg4v2 -acodec copy output.avi
To adjust the output quality of free avi to mp4 conversion with ffmpeg, you can set the bit rate:
e.g.: ffmpeg -i input.avi -c:v libx264 -b:v 500K -c:a copy out.mp4
e.g.: ffmpeg -i input.avi -c:v libx264 -b:v 500K -c:a copy out.mp4
Convert Avi To Mp4 On A Mac
To cut certain part of the video, using -t (output duration) and -ss (starting point) options:
e.g.: ffmpeg -ss 00:01:30 -i input.avi -c:v copy -c:a copy -t 5 output.mp4
e.g.: ffmpeg -ss 00:01:30 -i input.avi -c:v copy -c:a copy -t 5 output.mp4
Convert Avi To Mp4 For Mac
To resize the output mp4 for iPhone, iPad other mobiles, using -s option:
e.g.: ffmpeg -i movie.avi -c:v libx264 -s:v 854x480 -c:a copy out.mp4
e.g.: ffmpeg -i movie.avi -c:v libx264 -s:v 854x480 -c:a copy out.mp4