okt 102014

This HowTo describes how to install the transcoding tools under Ubuntu 14.04
For Open Source Transcoding  you have to install the transcoding tools (MPlayer, mencoder, ffmpeg, flvtool2, faststart). As the Ubuntu packages do not support all required formats, we have to compile the required tools.

In most cases please just copy & paste the code into your shell and execute the commands as root.

First we do some maintenance and remove some packages (if existing):

cd /usr/src
apt-get update
apt-get upgrade
apt-get remove x264 ffmpeg mplayer mencoder

We install the easy to use editor joe and some tools:

apt-get install joe make automake g++ bzip2 unzip patch subversion yasm

We install the win codecs of the MPlayer vendor:

NOTE: on 32 bit systems install the codecs as follows:

wget http://www2.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2 tar xvjf essential-20071007.tar.bz2 mkdir /usr/local/lib/codecs cp -Rvp essential-20071007/* /usr/local/lib/codecs/

NOTE: on 64 bit systems install the codecs as follows:

wget http://www2.mplayerhq.hu/MPlayer/releases/codecs/essential-amd64-20071007.tar.bz2
tar xvjf essential-amd64-20071007.tar.bz2
mkdir /usr/local/lib/codecs
cp -Rvp essential-amd64-20071007/* /usr/local/lib/codecs/

Next, on both systems we have to extend the search path in /etc/ld.so.conf:

joe /etc/ld.so.conf

… and check, if the following lines exist within the file. If not, please add:


then please execute

# ldconfig

We install some codecs:

apt-get install libsdl1.2-dev zlib1g-dev libfaad-dev libfaac-dev libgsm1-dev libtheora-dev libvorbis-dev libspeex-dev libopencore-amrwb-dev libopencore-amrnb-dev libxvidcore-dev libxvidcore4 libmp3lame-dev libjpeg62 libjpeg62-dev

We install x264:

wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/last_stable_x264.tar.bz2
tar xvjf last_stable_x264.tar.bz2
# VORSICHT: Pfad im nächsten Befehl bitte ersetzen:
cd x264-snapshot-XXXXXXXX-XXXX-stable/
./configure --enable-shared --enable-pic
make && make install
cd ..

We install libvpx:

wget http://webm.googlecode.com/files/libvpx-v1.2.0.tar.bz2
tar xvjf libvpx-v1.2.0.tar.bz2
cd libvpx-v1.2.0
./configure --enable-shared --enable-pic
make install
cd ..

We install MPlayer/mencoder :

wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.1.tar.gz
tar xvzf MPlayer-1.1.tar.gz
cd MPlayer-1.1/
make && make install
cd ..

…and ffmpeg:

wget http://ffmpeg.org/releases/ffmpeg-2.2.1.tar.bz2
tar xvjf ffmpeg-2.2.1.tar.bz2
cd ffmpeg-2.2.1/
./configure --enable-gpl --enable-version3 --enable-shared --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid
make install

We install qt-faststart

qt-faststart is part of ffmpeg. We´re still in the ffmpeg-2.2.1/ directory and change into the tools/ folder. Here we make qt-faststart and copy it to /usr/local/bin/:

cd tools
make qt-faststart
cp qt-faststart /usr/local/bin/
cd /usr/src

We install flvtool2:

flvtool2 is not part of the Ubuntu 14.04 repositories. And flvtool2 has to be compiled with ruby-1.8.6 that is not part of Ubuntu 14.04, too. To make it even more complicate we have to solve an error in the ruby package, before we compile. So please stay attentive with the next steps:

cd /usr/src
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.bz2
tar xvjf ruby-1.8.6.tar.bz2
cd ruby-1.8.6

There´s a typo in the math.c file. Open the file with your preferred editor (we use joe here):

joe math.c

Edit line 37 in math.c and change it like this:
old: #elif define(ERANGE)
new: #elif defined(ERANGE)

…and save it.

Now we can compile and install ruby 1.8.6:

make install
cd ..

Now we get and install flvtool2:

wget https://github.com/unnu/flvtool2/archive/master.zip 
unzip master.zip 
cd flvtool2-master/
/usr/local/bin/ruby setup.rb config
/usr/local/bin/ruby setup.rb setup
/usr/local/bin/ruby setup.rb install
cd ..

The pathes to the transcoding-tools are now:

Mplayer: /usr/local/bin/mplayer
mencoder: /usr/local/bin/mencoder
ffmpeg: /usr/local/bin/ffmpeg
flvtool2: /usr/local/bin/flvtool2
faststart: /usr/local/bin/qt-faststart

 Leave a Reply

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=""> <s> <strike> <strong>