Posts Tagged ‘compile’

Fixing ffmpeg aac hiccups

Thursday, November 18th, 2010

First thing you probably want is a recent version of  ffmpeg.  For me it was on debian lenny, for which there is this excellent and clean guide:
(just remove the  -with-libfaad  option, because it no longer exists)

However, this left us with stuttering audio, hiccups and noise for some videos encoded as MP4. Fortunately, there is almost no problem that has not been solved before, so I found: It comes down to updating libfaac, because the version you’ve got is most likely very outdated.

That’s all good, but not that easy if you don’t know exactly what you are doing (I didn’t)

First: get your  FAAC 1.28 source code from here: (I assume you extract it using tar -xf to a dir named faac-1.28)

You probably will not be able to compile this,  again the problem has been encountered before:

What you need now is get mp4v2 from:
get the latest version and extract it. Then build it like the instructions on the site tell you:

cd mp4v2-trunk-r355/
rm -fr build/
mkdir build/
cd build/
make install
cd ../../

Then you need to patch faac to work with this new external libmp4.  (get the patch from:*checkout*/gentoo-x86/media-libs/faac/files/faac-1.28-external-libmp4v2.patch?rev=1.1 )

$ patch -p0 < faac-1.28-external-libmp4v2.patch

Before you can recompile faac you need a few additional steps:

apt-get install automake autoconf libtool

And then the well known:

cd faac-1.28
make install

And for some reason:



(On one of my systems, somehow  libtools could not be found properly and the make file  supposed it was in “../libtool”  which I fixed by using a symlink instead of finding out the actual problem)