Compilation of FFMpeg under Debian

One of the typical projects we have are mobile applications which contain both server and client part. Client application usually displays some stuff which is maintained via some server UI. Not long ago we’ve noticed a bug playing AMR file on iPhones. Since the files are dynamic and are sent from the client devices – the best approach to overcome this is to convert this file on the fly.

The server part is written in grails so you can call any commands from OS. The easiest command to convert file from AMR to MP3 is: ffmpeg -i test.amr test.mp3. Trivial, right?

Yes, it was trivial on my Fedora development host. After deployment to the prod server with Debian it didn’t appear trivial any more. FFMpeg is compiled without MP3 and AMR support there. The research hasn’t shown any ready to use packages for Debian Lenny.

Okay, so the next step is to compile FFMpeg with all required flags from sources. Easy? Not at all. After getting deeper and trying to understand compilation problems – an easier solution has been found: http://www.ffmpeginstaller.com

Just download, unpack and run ./install. However I’ve tried versions 6.2, 6.3, 7.0 and only 6.3 gave me some results after some script changing. The rest showed errors in the codec internals. FFMpegInstaller compiles also MPlayer in its script and the compilation process simply fails. So after commenting some mplayer.sh lines from start.sh – I was able to compile ffmpeg. Trying to run – starts complaining about libfaad.so.0 and liba52-0.7.4.so. Installed packages with the mentioned libraries and it started working.

In general all these compilations took about 1.5 days overall and 4 hours of my effective time. It’s not user-friendly at all. I wish there would be some Debian repo where you can download FFMpeg with MP3/AMR support. Does anyone knows such a repo?