Just recently I ran into a lot of problems using the standard ffmpeg package from ubuntu to convert video files. Following this thread I was able fix this annoying issue. For a deep understanding about the reasons why the standard package is so restricted, just go and check the thread, but I'm covering here the basic steps to fix it in a breeze.

Basically, due to legal reasons, the standard package won't come with the necessary libraries to do the job. So, in order to use ffmpeg to encode mp3, aac and mpeg4 files, you need to install the ffmpeg version from Medibuntu:

Adding Medibuntu repository:

$ sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get -q update && sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring && sudo apt-get -q update

Installing:

$ sudo apt-get install ffmpeg libavcodec-extra-52

If, for some reason you want to uninstall those things, just:

Uninstall:

$ sudo apt-get remove ffmpeg libavcodec-*-5*

Remove Medibuntu repository:

$ sudo apt-get autoremove ffmpeg medibuntu-keyring && sudo rm /etc/apt/sources.list.d/medibuntu.list && sudo apt-get update