Android video footage encoding on Ubuntu

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.

mkdir avconv-source

2.) Download and install the x264 library

Grab yasm from Ubuntu

apt-get install yasm
cd ~/avconv-source
sudo git clone git:// x264/
sudo ./configure --enable-static
sudo make
sudo make install

3.) Download the avconv source

cd ~/avconv-source
sudo git clone git:// avconv/
sudo ./configure --enable-gpl --enable-libx264
sudo make
sudo make install

and you can now execute

avconv -i -c:v libx264 -c:a copy test.mp4
Author Rating
Software Name
Operating System

One thought on “Android video footage encoding on Ubuntu

  1. article directory

    I don’t even know how I stopped up here, but I thought this put up used to be great. I do not understand who you might be however definitely you’re going to a well-known blogger when you are not already. Cheers!


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>