Posts Tagged ‘mp4’

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:
http://www.adminsehow.com/2009/07/how-to-install-ffmpeg-on-debian-lenny-from-svn/
(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: http://e-mats.org/2010/01/fixing-stuttering-audio-with-ffmpeg-and-quicktime/ 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:  http://www.audiocoding.com/downloads.html (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:
http://sourceforge.net/tracker/index.php?func=detail&aid=2894310&group_id=704&atid=100704

What you need now is get mp4v2 from:
http://code.google.com/p/mp4v2/
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/
../configure
make
make install
cd ../../

Then you need to patch faac to work with this new external libmp4.  (get the patch from:
http://sources.gentoo.org/viewcvs.py/*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
aclocal
automake
autoconf

And then the well known:

cd faac-1.28
./configure
make
make install

And for some reason:

ldconfig

Done.

(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)

http://code.google.com/p/mp4v2/downloads/detail?name=mp4v2-1.9.1.tar.bz2