How to convert MP3 to AAC using FFmpeg

MP3 is one of the most popular audio format for a decade and now it has a new competiter called AAC. Many recent audio players are supporting both formats. Who's know one or both of them may lose in this competition. Anyway, some players only support AAC right now. That's why I have to post this howto.

FFmpeg will be our hero today. Anyway, the one comes with Ubuntu Edgy don't know about AAC you have to recompile it yourself to make it works. Enabled this feature is so easy.

  1. Get the source.

    mkdir ffmpeg
    cd ffmpeg
    apt-get source ffmpeg
    
  2. Change current working directory.

    cd ffmpeg-0.cvs20050918
    
  3. Build it.

    DEB_BUILD_OPTIONS=risky dpkg-buildpackage -uc -us -rfakeroot
    
  4. Now install it.

    cd ..
    dpkg -i *.deb
    

So now you are ready for conversion.

ffmpeg \
       -i input.mp3 \
       -acodec aac \
       -ab 128 \
       output.aac

For more example, please try FAQ.

Tags: ,

thank you, good posts.

thank you, good posts. useful to me.

just a question, how to

just a question, how to enable the libfaac0 in ffmpeg so you can use the -acodec aac option?

Post new comment