How to Compile ffmpeg with libfdk_aac

Run the following as root (use the "su" command and type your password to switch to root):
apt-get install libfdk-aac-dev libx264-dev pkg-config autoconf automake libtool build-essential git-core yasm
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
./configure --enable-gpl --enable-libx264 --enable-nonfree --enable-libfdk-aac
make
make install
ldconfig

I had copied some presets from WinFF, but they used libvo_aacenc, so I've updated the presets here:
"MPEG-4 H.264 video (high quality)" preset: ./ffmpeg -i "input.avi" -crf 35.0 -vcodec libx264 -preset slow -acodec libfdk_aac -ar 48000 -b:a 128k -coder 1 -flags +loop -cmp chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0 output.mp4
"MPEG-4 H.264 video (very high quality)" preset (recommended): ./ffmpeg -i "input.avi" -crf 25.0 -vcodec libx264 -preset slower -acodec libfdk_aac -ar 48000 -b:a 160k -coder 1 -flags +loop -cmp chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0 output.mp4
"MPEG-4 H.264 video (super high quality)" preset: ./ffmpeg -i "input.avi" -crf 15.0 -vcodec libx264 -preset veryslow -acodec libfdk_aac -ar 48000 -b:a 192k -coder 1 -flags +loop -cmp chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0 output.mp4
CategoriesIT

Leave a Reply

Your email address will not be published. Required fields are marked *