0

I need to compile ffmpeg with libfdk-aac on Ubuntu 13.04. I followed the following instructions to compile libfdk-aac wget http://downloads.sourceforge.net/opencore-amr/fdk-aac-0.1.0.tar.gz
tar xzvf fdk-aac-0.1.0.tar.gz
cd fdk-aac-0.1.0
./configure
make
sudo checkinstall --pkgname=fdk-aac --pkgversion="0.1.0" --backup=no --deldoc=yes \
--fstrans=no --default
ldconfig

I followed the following instructions to compile ffmpeg
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
--enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis \
--enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-libaacplus \
--enable-x11grab --enable-libfdk-aac
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(date +%Y%m%d%H%M)-git" --backup=no \
--deldoc=yes --fstrans=no --default
hash x264 ffmpeg ffplay ffprobe

Problem
While compiling FFmpeg, in the ./configure line, it fails with the error:
ERROR: libfdk_aac not found
The last lines of config.log are:

gcc -Wl,--as-needed -o /tmp/ffconf.w9wba0C3 /tmp/ffconf.Fw03YJzI.o -lfdk-aac -lfaac -laacplus -lm -pthread -lz
/usr/local/lib/libfdk-aac.so: undefined reference to `ceil'
/usr/local/lib/libfdk-aac.so: undefined reference to `atan2'
/usr/local/lib/libfdk-aac.so: undefined reference to `acos'
/usr/local/lib/libfdk-aac.so: undefined reference to `sin'
/usr/local/lib/libfdk-aac.so: undefined reference to `atan'
/usr/local/lib/libfdk-aac.so: undefined reference to `exp'
/usr/local/lib/libfdk-aac.so: undefined reference to `tan'
/usr/local/lib/libfdk-aac.so: undefined reference to `cos'
/usr/local/lib/libfdk-aac.so: undefined reference to `log'
/usr/local/lib/libfdk-aac.so: undefined reference to `pow'
/usr/local/lib/libfdk-aac.so: undefined reference to `sqrt'
/usr/local/lib/libfdk-aac.so: undefined reference to `floor'
collect2: error: ld returned 1 exit status
ERROR: libfdk_aac not found

All the other libraries were installed. It works fine without --enable-libfdk-aac flag. I just heard that fdk-aac is the best AAC encoder, so I wanted to install that with FFmpeg if possible.
PS: The exact steps I followed for the whole process is in https://gist.github.com/abhi92/5711831. I installed every library in that list.

3

That guide is a copy of the one from here & also doesn't reflect some changes that were recently made. The changes came from discussions we had about installing static libs & includes to /usr/local & the potential issues that doing so may cause.

I personally use /opt/ffmpeg_current instead of $HOME/ffmpeg_build but that is just personal choice, the theory & better install practice is the same.

So I suggest you remove all from that gisthub nonsense & follow this link, all should go fine

https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide

Note - I guess my sugges about the man pages didn't get done. I'd add this to ffmpeg ./configure (may as well add a datadir too.

--mandir=/usr/local/share/man --datadir=/usr/local/share/ffmpeg
| improve this answer | |
  • (Bump). The man pages are not working though. Minor annoyance, would be glad if it can be fixed?? man: can't resolve /usr/local/share/man/man1/ffmpeg.1.gz: No such file or directory Also, is the git master stable enough for production use? – avmohan Jun 11 '13 at 5:46
  • as far as man pages see edit/note to answer. – doug Jun 13 '13 at 9:54
  • Any way to add the man pages without rebuilding? – avmohan Jun 17 '13 at 16:16
  • Not really though it you produced them then I guess you could copy to a man1 dir in /usr/local/share/man or /usr/share/man & may work from terminal. (by copy I mean the *.1.gz files, not the .texi files in source. You may find reading them easier online then in terminal - ffmpeg.org/documentation.html ( I use the manpage scope in 13.04 & 12.04, much better than terminal – doug Jun 18 '13 at 8:39
  • Yeah it is easier to read them online. That's what I've been doing. Not a fan of unity, so no scope for me. – avmohan Jun 20 '13 at 5:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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