This guide details how to install the development version of vlc using both 32 bit and 64 bit versions of the current Ubuntu release: Quantal Quetzal, it owes a huge debt to the vlc Slackbuild of Eric Hameleers, otherwise known as alienBOB. The guide was formerly hosted in the 'Tutorials and Tips' section of the Ubuntu Forums but was transferred to this wiki in July 2012.

This guide will work for Quantal Quetzal, and perhaps with some variation for other versions of Ubuntu, and hopefully in building the bleeding edge version of vlc we will all have great fun! Discussion is available about this wiki page on the Ubuntu Forums.

Preparation: Quantal Quetzal...

As a first step it is a good idea to remove all previous vlc packages using synaptic or the Software Centre. Next some basic tools are required for compiling and we also create the build location, the following is a single command which can simply be copied from here and pasted in a Terminal window:

sudo apt-get -y install build-essential git-core checkinstall automake yasm && \
mkdir -pv $HOME/vlc_build

A considerable volume of 'development' files is also required, the following is a single command:

sudo apt-get -y install liba52-0.7.4-dev libaa1-dev libasound2-dev libass-dev \
libavahi-client-dev libcaca-dev libcairo2-dev libcddb2-dev libcdio-dev libdca-dev \
libdirac-dev libdvbpsi-dev libdvdnav-dev libdvdread-dev libebml-dev libfaad-dev \
libflac-dev libfluidsynth-dev libfreetype6-dev libfribidi-dev libgcrypt11-dev \
libggi2-dev libgl1-mesa-dev libglib2.0-0 libgnomevfs2-dev libgnutls-dev libhal-dev \
libid3tag0-dev libjack-jackd2-dev libkate-dev liblircclient-dev liblua5.1-0-dev \
libmad0-dev libmatroska-dev libmodplug-dev libmpcdec-dev libmpeg2-4-dev libmtp-dev \
libncursesw5-dev libnotify-dev libogg-dev liboggkate-dev libpango1.0-dev libpng12-dev \
libprojectm-dev libprojectm-qt-dev libproxy-dev libpulse-dev libqt4-dev libraw1394-dev \
librsvg2-dev libschroedinger-dev libsdl-image1.2-dev libsdl1.2-dev libshout3-dev \
libsmbclient-dev libspeex-dev libsqlite3-dev libsvga1-dev libsysfs-dev libtag1-dev \
libtar-dev libgme-dev libtheora-dev libtool libtwolame-dev libudev-dev libupnp-dev \
libv4l-dev libva-dev libvcdinfo-dev libvorbis-dev libvpx-dev libx11-dev libx11-xcb-dev \
libxcb-composite0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shm0-dev \
libxcb-xv0-dev libxcb-xvmc0-dev libxcb1-dev libxext-dev libxml2-dev libxpm-dev \
libxt-dev libxv-dev libzvbi-dev lua5.1 qt4-qtconfig libspeexdsp-dev libsamplerate0-dev 

Feel free to experiment a little with these to match your needs but the ones given here will outfit you with a reasonably well equipped vlc. Next to install a local copy of FFmpeg.

FFmpeg...

One of the most important parts of the preparation for compiling vlc-git is preparing a recent version of libavcodec for vlc usage. If you wish to use hardware acceleration with vlc this is the time to also install libva-dev and either vdpau-va-driver for NVidia cards or xvba-va-driver for ATI cards. The following is a local, not system installation of FFmpeg and is again a single command:

sudo apt-get -y install libfaac-dev libmp3lame-dev \
libopencore-amrnb-dev libopencore-amrwb-dev zlib1g-dev && \
cd $HOME/vlc_build && \
wget http://ffmpeg.org/releases/ffmpeg-1.1.1.tar.bz2 && \
tar xjvf ffmpeg-1.1.1.tar.bz2 && cd ffmpeg-1.1.1 && \
if [ "$(uname -m)" = "x86_64" ]; then
  ARCHOPTS="--enable-pic"
 else
  ARCHOPTS=""
fi && \
./configure --prefix=$HOME/vlc_build/vlcdeps/usr \
              $ARCHOPTS \
              --enable-gpl \
              --enable-version3 \
              --enable-nonfree \
              --enable-postproc \
              --enable-pthreads \
              --enable-libfaac \
              --enable-libmp3lame \
              --enable-libopencore-amrnb \
              --enable-libopencore-amrwb \
              --enable-libvpx \
              --disable-ffmpeg \
              --disable-ffplay \
              --disable-ffserver \
              --disable-doc && \
make && make install-libs install-headers && make distclean

You may now safely delete the folder $HOME/vlc_build/ffmpeg-1.1.1 and its contents. It is possible to use the git FFmpeg instead of the release version but I usually stick with the most recent release version to keep the complexity level down a little! Now for x264.

x264...

We now install a local copy of the latest x264 which vlc will use for transcoding to h.264, the following is a single command:

if [ "$(uname -m)" = "x86_64" ]; then
  ARCHOPTS="--enable-pic"
 else
  ARCHOPTS=""
fi && \
cd $HOME/vlc_build && \
git clone git://git.videolan.org/x264.git --depth 1 && \
cd x264 && \
./configure --prefix=$HOME/vlc_build/vlcdeps/usr \
            --enable-static --disable-cli $ARCHOPTS && \
make && make install

Save the folder $HOME/vlc_build/x264 for future updates, and I would suggest perhaps updating this every month or so. Now for the windows codecs.

Codecs...

The MPlayer binary codecs are of no use to 64bit users unfortunately so those with 64bit installations can safely skip this section. 32bit users can use the following single single command:

if [ "$(uname -m)" = "x86_64" ]; then
  echo 'This section is for 32bit installations only!!'
else
 cd $HOME/vlc_build
 sudo mkdir -pv /usr/local/lib/codecs
 wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20110131.tar.bz2
 tar xjvf all-20110131.tar.bz2
 sudo cp -v all-20110131/* /usr/local/lib/codecs
fi

You may now safely delete the folder $HOME/vlc_build/all-20110131 and its contents. Now for the libdvdcss library.

libdvdcss....

We need install a copy of libdvdcss to allow vlc-git to read encrypted DVDs. If laws in your country do not allow you to install libdvdcss omit the following single command:

sudo /usr/share/doc/libdvdread4/install-css.sh

Now to install the often problematical live555 libraries.

live555...

vlc uses live555 for reading some streams and the following single command sets up a local copy following alienBOB's syntax very closely:

cd $HOME/vlc_build && \
sudo apt-get -y remove liblivemedia-dev && \
wget http://www.live555.com/liveMedia/public/live.2014.01.24.tar.gz && \
tar xvf live.2014.01.24.tar.gz && cd live && \
if [ "$(uname -m)" = "x86_64" ]; then
  ./genMakefiles linux-64bit && make
else 
  ./genMakefiles linux && make
 fi && \
cp -v \
groupsock/libgroupsock.a liveMedia/libliveMedia.a \
UsageEnvironment/libUsageEnvironment.a \
BasicUsageEnvironment/libBasicUsageEnvironment.a \
$HOME/vlc_build/vlcdeps/usr/lib/ && \
cp -v \
groupsock/include/*.hh groupsock/include/*.h \
liveMedia/include/*.hh UsageEnvironment/include/*.hh \
BasicUsageEnvironment/include/*.hh \
$HOME/vlc_build/vlcdeps/usr/include/

You can now safely delete the folder $HOME/vlc_build/live and its contents. This syntax may seem a little overly complex but live555 + vlc can be a little tricky and at the moment the syntax given here works well enough. Now for bluray playback.

Bluray Playback...

To enable playback of bluray disks we will need both libbluray and libaacs and the easiest way is to compile the latest release versions of both from source. First libbluray:

cd $HOME/vlc_build && \
wget ftp://ftp.videolan.org/pub/videolan/libbluray/0.2.3/libbluray-0.2.3.tar.bz2 && \
tar xjvf libbluray-0.2.3.tar.bz2 && cd libbluray-0.2.3 && \
./configure && make && \
sudo checkinstall --pakdir "$HOME/vlc_build" --backup=no --deldoc=yes \
                  --pkgname libbluray --pkgversion "2:0.2.3" --fstrans=no \
                  --deldesc=yes --delspec=yes --default && \
make distclean

You can now safely delete the folder $HOME/vlc_build/libbluray-0.2.3 and its contents. Now for libaacs:

cd $HOME/vlc_build && \
sudo apt-get -y install libgcrypt11-dev bison flex && \
wget ftp://ftp.videolan.org/pub/videolan/libaacs/0.5.0/libaacs-0.5.0.tar.bz2 && \
tar xjvf libaacs-0.5.0.tar.bz2 && cd libaacs-0.5.0 && \
./configure && make && \
sudo checkinstall --pakdir "$HOME/vlc_build" --backup=no --deldoc=yes \
                  --pkgname libaacs --pkgversion "2:0.5.0" --fstrans=no \
                  --deldesc=yes --delspec=yes --default && \
make distclean

You can now safely delete the folder $HOME/vlc_build/libaacs-0.5.0 and its contents. My own bluray drive works well with most disks using the KEYDB.cfg file from this site while some bd+ disks require makemkv which has a great streaming option that works well with vlc. Read further on bluray and Linux on this great Arch wiki article and be aware that this is still legally a difficult area. Now for vlc itself.

Building vlc-git..

Now we finally download the vlc-git source code and build it. The following is a single command:

cd $HOME/vlc_build && \
git clone git://git.videolan.org/vlc.git --depth 1 && \
cd $HOME/vlc_build/vlc && \
if [ ! "$(uname -m)" = "x86_64" ]; then
 ARCHOPTS="--enable-loader"
else
  ARCHOPTS=""
fi && \
./bootstrap && \
CPPFLAGS="-I$HOME/vlc_build/vlcdeps/usr/include " \
LDFLAGS="-L$HOME/vlc_build/vlcdeps/usr/lib" \
PKG_CONFIG_PATH="$HOME/vlc_build/vlcdeps/usr/lib/pkgconfig" \
./configure $ARCHOPTS \
            --prefix=/usr/local \
            --enable-realrtsp \
            --enable-aa \
            --enable-merge-ffmpeg \
            --enable-vcdx \
            --enable-ncurses \
            --disable-speex && \
make -j 2 && \
mkdir -vp doc-pak && \
cp -v AUTHORS COPYING INSTALL NEWS README THANKS doc-pak && \
sudo checkinstall --pakdir "$HOME/vlc_build" --backup=no --deldoc=yes --pkgname vlc \
                  --pkgversion "2.1.0-git-$(date +%Y%m%d)-$(git show --abbrev-commit \
                  | grep '^commit' | cut -f2 -d " ")" --fstrans=no \
                  --deldesc=yes --delspec=yes --default && \
make distclean && sudo ldconfig

And this should give you a working copy of vlc-git!

Updating vlc-git...

You should return from time to time to update your copy of vlc-git, the following single command will accomplish this:

cd $HOME/vlc_build/vlc && git pull && \
if [ ! "$(uname -m)" = "x86_64" ]; then
 ARCHOPTS="--enable-loader"
else
  ARCHOPTS=""
fi && \
./bootstrap && \
CPPFLAGS="-I$HOME/vlc_build/vlcdeps/usr/include " \
LDFLAGS="-L$HOME/vlc_build/vlcdeps/usr/lib" \
PKG_CONFIG_PATH="$HOME/vlc_build/vlcdeps/usr/lib/pkgconfig" \
./configure $ARCHOPTS \
            --prefix=/usr/local \
            --enable-realrtsp \
            --enable-aa \
            --enable-merge-ffmpeg \
            --enable-vcdx \
            --enable-ncurses \
            --disable-speex && \
make -j 2 && \
mkdir -vp doc-pak && \
cp -v AUTHORS COPYING INSTALL NEWS README THANKS doc-pak && \
sudo checkinstall --pakdir "$HOME/vlc_build" --backup=no --deldoc=yes --pkgname vlc \
                  --pkgversion "2.1.0-git-$(date +%Y%m%d)-$(git show --abbrev-commit \
                  | grep '^commit' | cut -f2 -d " ")" --fstrans=no \
                  --deldesc=yes --delspec=yes --default && \
make distclean && sudo ldconfig

This completes the setup of vlc-git for this guide and I wish you all the best with your continued exploration of the development version of this great media player!

Compiling the release version...

This guide is really aimed at building the development version of vlc but it is usually easy enough to use the same setup as described in this guide to build the release version instead. First ensure that you have performed all the steps outlined in the 'Preparation: Quantal Quetzal...' section, then remove all your vlc packages and finally run the following single command to install vlc 2.0.5:

cd $HOME/vlc_build && \
wget http://download.videolan.org/pub/videolan/vlc/2.0.5/vlc-2.0.5.tar.xz && \
tar xvf vlc-2.0.5.tar.xz && cd vlc-2.0.5 && \
if [ ! "$(uname -m)" = "x86_64" ]; then
 ARCHOPTS="--enable-loader"
else
  ARCHOPTS=""
fi && \
CPPFLAGS="-I$HOME/vlc_build/vlcdeps/usr/include " \
LDFLAGS="-L$HOME/vlc_build/vlcdeps/usr/lib" \
PKG_CONFIG_PATH="$HOME/vlc_build/vlcdeps/usr/lib/pkgconfig" \
./configure $ARCHOPTS \
            --prefix=/usr/local \
            --enable-realrtsp \
            --enable-aa \
            --enable-merge-ffmpeg \
            --enable-vcdx \
            --enable-ncurses \
            --disable-speex && \
make -j 2 && \
mkdir -vp doc-pak && \
cp -v AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS doc-pak && \
sudo checkinstall --pakdir "$HOME/vlc_build" --backup=no --deldoc=yes \
                  --pkgname vlc --pkgversion "2.0.5" --fstrans=no \
                  --deldesc=yes --delspec=yes --default && \
make distclean && sudo ldconfig

This is a newer section for this guide, which really concentrates on the develpment version, so feel free to let me know of any errors you have found or improvements you would like to see!


CategorySoftware

CompileVLC (last edited 2014-01-26 22:52:03 by 123-243-191-198)