FFMPEG unsupported codec id=86018
Friday, September 28th, 2007My current major project could be described as a YouTube for music. The application allows users to upload audio and video tracks, which are converted to FLV format using FFMPEG for displaying in a Flash media player.
One problem that appeared very quickly after inviting some test users onto the site is that user want to upload their music in 2 main formats – mp3 and m4a. I noticed that m4a / AAC encoded audio tracks were failing to convert, with FFMPEG giving the “unsupported codec” message that is the title of this post. This wasn’t really too surprising as I’d only configured FFMPEG with LAME mp3 support, so after reading the doco it seemed all I needed to do was reconfigure with faac and faad2 support, recompile/install, and the jobs done:
1) Download and install the faac / faad packages (including dev packages) as needed
2) Reconfigure ffmpeg using ./configure --enable-gpl --enable-libfaac --enable-libfaad --enable-libmp3lame
3) Compile and install using make && sudo make install
Well, I did all this I was surprised to find that it didn’t work – I was still getting the same error message as before. A bit of Googling found that I wasn’t alone in the problem, and many others have had the same issue. The solution is actually rather simple, but not obvious to anyone that’s not involved in Linux / C development (like me):
Before reconfiguring, type make distclean. That’s all. It clears out any compiled object files and forces a complete recompile after configuring make (someone correct me if I’m wrong on that).
If anyone actually reads this blog entry and would find it useful, let me know and I’ll publish a noobs guide to getting ffmpeg compiled and working.