How to install or compile avconv with libfdk_aac on Ubuntu 14.04 ? I am also ok with comparable aac codecs e.g. http://wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC

Currently I am trying this but with avconv: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

I let you know how it works out.

share|improve this question

Here's how I do it. But I must warn you, this requires a little courage as you must build libav (This will give you the avconv executable among other tools) yourself. But have no fear, I have done it many times and I'll show you how to to build and install everything without messing your system up. If you don't want your custom libav build anymore, all you have to do is delete a directory.

First I remove the avconv installed buy default with:

apt-get remove --purge libav-tools

Then make sure you have the required tools for building software in general:

apt-get install build-essential

To get the fastest avconv possible you'll need an assembly compiler. That's easy:

apt-get install yasm

Now get into a scrap directory to build in, I'll do:

mkdir ~/src
cd ~/src

Now clone the libav git repo (you'll need git installed for this):

git clone git://git.libav.org/libav.git

This will give you the the latest and greatest libav source, I have found the bleeding edge code stable enough for my needs and haven't run into any code related bugs during building.

Let the repo clone and then install libfdk-aac through the package manager:

apt-get install libfdk-aac-dev

To make things simple lets just install the libx264 library for avconv to use:

apt-get install libx264-dev

Create a home for the binaries and other files that will be built in a moment (This will make things easy to uninstall as well):

mkdir ~/apps    

Once installed, the avconv executable will be located in ~/apps/bin/ To run avconv from the command line simply add ~/apps/bin to you $PATH

Now you, need to configure the libav source to use your newly install fdk-aac library. Simply enter this in the command line:

./configure \
--prefix=~/apps \
--enable-nonfree \
--enable-gpl \
--disable-shared \
--enable-static \
--enable-libx264 \
--enable-libfdk-aac

This command will give you all of libav default encoding and decoding libraries plus libx264 and libfdk_aac Note: should you want more encoding functionality try ./configure --help to see all the external libraries you can enable.

Now all thats left to do is build the thing! This should only take a few minutes on a decent machine.

make && make install

If you added ~/apps/bin to you $PATH you should be able to run 'avconv' now.

To update your custom libav build, just run:

git pull origin

In ~/src/libav/ up pull the latest code. Then reconifgure with the command above, make and make install.

Should you every want to get rid of you custom build and reinstall ubuntu's default libav-tools packages run:

rm -rf ~/apps/
apt-get install libav-tools

And remove ~/apps/bin from your $PATH

Sorry if the task you want to achieve seems daunting, but it makes me proud to use a custom built, bleeding edge version of avconv :) I think the extra work pays off. Hope this helps :)

share|improve this answer
1  
I find it better to create a ~/bin directory and keep everything there (my installed software, my written shell scripts, etc). I then place it at the beginning of $PATH, allowing me to keep the installed packages, but yet work with the bleeding edge stuff as well. – v010dya Nov 9 '14 at 23:02
    
It's more convenient to include --enable-libmp3lame as the parameter of ./configure as well if you foresee a need to output MP3. – Kenneth L Nov 1 '16 at 2:17

Don't. Isn't worth the hassle. Install via

sudo apt-get install libav-tools

Then instead of using the Fraunhofer use these switches:

-acodec aac -strict experimental or -acodec libvo_aacenc

Audio Quality may vary.

share|improve this answer
    
Why not just follow the guide you linked to and use ffmpeg with libfdk_aac? If you're doing a significant amount of encoding you should reconsider using libfdk_aac since aac (the native AAC encoder), and libvo_aacenc are poor comparatively. See FFmpeg AAC Audio Encoding Guide (some info within will not apply to avconv). – LordNeckbeard Nov 2 '14 at 18:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.