In order to run Handbrake on Ubuntu, you'll need to install the packages necessary to compile the source code.
sudo apt-get install subversion yasm build-essential autoconf libtool zlib1g-dev libbz2-dev \ libxml2-dev libogg-dev libtheora-dev libvorbis-dev libsamplerate-dev libfribidi-dev \ libfreetype6-dev libfontconfig1-dev libass-dev
Download HandBrake Source code
mkdir ~/src cd ~/src svn checkout svn://svn.handbrake.fr/HandBrake/trunk handbrake cd handbrake ./configure --launch --disable-gtk
The build process will begin and download more source code and libraries from the web. When it completes, you will have the HandBrakeCLI binary in the build directory.
cd build sudo make install