Compiling X264 on Ubuntu

I noticed that HandBrakeCLI displayed this message:

x264 [info]: using cpu capabilities: none!

I thought that, perhaps, I could gain some performance by recompiling x264 directly for my AMD dual-core, 64-bit CPU. It turned out to be quite a task.

gpac

Get gpac (check the project’s download page for the latest version):

wget http://downloads.sourceforge.net/gpac/gpac-0.4.4.tar.gz

Unpack gpac:

tar xvzf gpac-0.4.4.tar.gz
cd gpac

make configuration script executable:

chmod u+x configure

Configure:

./configure

Compile:

make

X264

Install subversion:

sudo apt-get install subversion

Install yasm:

sudo apt-get install yasm

Retrieve x264:

cd ..
svn co svn://svn.videolan.org/x264/trunk x264
cd x264

Copy in gpac headers:

cp -R ../gpac/include/gpac .

Configure x264 and build:

./configure --enable-mp4-output --enable-shared --extra-ldflags=-L../gpac/bin/gcc
make

About Jeff Fitzsimons

Jeff Fitzsimons is a software engineer in the California Bay Area. Technical specialties include C++, Win32, and multithreading. Personal interests include rock climbing, cycling, motorcycles, and photography.
This entry was posted in Technology and tagged , , , , , , , , , . Bookmark the permalink.

Leave a Reply

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