Reposted from old site – original date: Saturday 21 July 2012
I wanted to encode some footage that I had shot from .avi to h.264 to play on an Android tablet device, but it seems that Android cannot play avi natively without additional app installations.
After some research, I found out that avconv, which is the replacement for good old ffmpeg in Ubuntu these days, does not work with x.264 either. The solution was to download and compile in x.264 support from source. Steps taken below.
In retrospect, I am not sure this is a great way to approach this, and probably grabbing an app is way better. That being said, this may be useful elsewhere too though.
2.) Download and install the x264 library
Grab yasm from Ubuntu
apt-get install yasm cd ~/avconv-source sudo git clone git://git.videolan.org/x264.git x264/ sudo ./configure --enable-static sudo make sudo make install
3.) Download the avconv source
cd ~/avconv-source sudo git clone git://git.libav.org/libav.git avconv/ sudo ./configure --enable-gpl --enable-libx264 sudo make sudo make install
and you can now execute
avconv -i test.mov -c:v libx264 -c:a copy test.mp4