Page 1 of 4 123 ... LastLast
Results 1 to 10 of 36

Thread: Howto: Compile the development version of vlc under the latest Ubuntu release

  1. #1

    Howto: Compile the development version of vlc under the latest Ubuntu release

    This guide details how to install the development version of vlc using both 32 bit and 64 bit versions of the latest Ubuntu release, it owes a huge debt to the vlc Slackbuild of Eric Hameleers, otherwise known as alienBOB. This guide will be periodically updated for each new Ubuntu version.

    I emphasise at the outset that this development version of vlc will be broken at times and should only ever be installed by those willing to experiment a little, people who are used to running alpha or beta version software. The preferred method to build and test vlc-git is from within a Virtual Machine dedicated to this purpose alone, this is my own model in writing and testing this guide and I recommend this method to all who follow this guide.

    Preparation: Raring Ringtail..

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

    Code:
    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:

    Code:
    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 libgii1-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 libopus-dev \
    libvdpau-dev libxpm-dev libxinerama-dev libtar-dev libgtk2.0-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.

    FFmpeg...

    Next to install a local copy of FFmpeg which will avoid disturbing system settings of either avconv or FFmpeg:

    Code:
    sudo apt-get -y install libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev zlib1g-dev && \
    cd $HOME/vlc_build && \
    wget http://www.ffmpeg.org/releases/ffmpeg-1.2.1.tar.bz2 && tar xjvf ffmpeg-1.2.1.tar.bz2 && cd ffmpeg-1.2.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-libfaac \
                --enable-libmp3lame --enable-libopencore-amrnb \
                --enable-libopencore-amrwb --enable-libvpx \
                --disable-programs --disable-doc && \
    make && make install-libs install-headers && make distclean
    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!

    x264...

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

    Code:
    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
    I would suggest perhaps updating this every month or so by running git pull instead of git clone, ask in the thread below if you are unsure about how to go about this.

    libdvdcss....

    Medibuntu's future is uncertain so now we compile our own copy of libdvdcss so that DVD playback is possible. If laws in your country do not allow you to install libdvdcss omit the following single command:

    Code:
    cd $HOME/vlc_build && \
    sudo apt-get remove libdvdcss2 && \
    wget http://download.videolan.org/pub/libdvdcss/1.2.13/libdvdcss-1.2.13.tar.bz2 && \
    tar xvf libdvdcss-1.2.13.tar.bz2 && \
    cd libdvdcss-1.2.13 && \
    ./configure --disable-doc --docdir=/usr/share/doc/libdvdcss && make && \
    mkdir -vp doc-pak && cp -v AUTHORS ChangeLog COPYING INSTALL NEWS README doc-pak && \
    sudo checkinstall --pakdir "$HOME/vlc_build" --backup=no --deldoc=yes \
                      --pkgname libdvdcss --pkgversion "1.2.13" --fstrans=no \
                      --deldesc=yes --delspec=yes --default && \
    make distclean && sudo ldconfig
    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, I have hosted this copy of live555 on my own web space as older versions disappear from the live555 site pretty quickly:

    Code:
    cd $HOME/vlc_build && \
    sudo apt-get -y remove liblivemedia-dev && \
    wget http://andrews-corner.org/downloads/live.2012.09.13.tar.gz && \
    tar xvf live.2012.09.13.tar.gz && chmod -R u+w live && 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/
    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:

    Code:
    cd $HOME/vlc_build && \
    wget ftp://ftp.videolan.org/pub/videolan/libbluray/0.3.0/libbluray-0.3.0.tar.bz2 && \
    tar xjvf libbluray-0.3.0.tar.bz2 && cd libbluray-0.3.0 && \
    ./configure && make && \
    mkdir -vp doc-pak && cp -v ChangeLog COPYING README.txt doc/HOWTO.PATCH doc-pak && \
    sudo checkinstall --pakdir "$HOME/vlc_build" --backup=no --deldoc=yes \
                      --pkgname libbluray --pkgversion "2:0.3.0" --fstrans=no \
                      --deldesc=yes --delspec=yes --default && \
    make distclean && sudo ldconfig
    Now for libaacs:

    Code:
    cd $HOME/vlc_build && \
    sudo apt-get -y install libgcrypt11-dev bison flex && \
    wget ftp://ftp.videolan.org/pub/videolan/libaacs/0.6.0/libaacs-0.6.0.tar.bz2 && \
    tar xjvf libaacs-0.6.0.tar.bz2 && cd libaacs-0.6.0 && \
    ./configure && make && \
    mkdir -vp doc-pak && cp -v ChangeLog COPYING README.txt doc-pak && \
    sudo checkinstall --pakdir "$HOME/vlc_build" --backup=no --deldoc=yes \
                      --pkgname libaacs --pkgversion "2:0.6.0" --fstrans=no \
                      --deldesc=yes --delspec=yes --default && \
    make distclean && sudo ldconfig
    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.

    Goom...

    Goom is a nice if somewhat old and perhaps dated visualisation plugin for vlc, it does not have a package in the Ubuntu Repository so we will need to compile it. Much of the following syntax comes from alienBOB's work but goom-2k4-mmxfix.diff comes from the XMBC developers. The following is a single command:

    Code:
    cd $HOME/vlc_build && \
    wget http://www.andrews-corner.org/patches/goom-2k4-mmxfix.diff && \
    wget http://www.andrews-corner.org/patches/goom2k4-xmmslibdir.patch && \
    wget http://downloads.sourceforge.net/project/goom/goom2k4/0/goom-2k4-0-src.tar.gz && \
    tar xvf goom-2k4-0-src.tar.gz && find goom2k4-0 -type d -exec chmod 755 {} \; && cd goom2k4-0 && \
    patch -p0 < ../goom-2k4-mmxfix.diff && patch -p1 < ../goom2k4-xmmslibdir.patch && \
    sed -i \
      -e "/^goom2_library_include_HEADERS =/s/goom_tools.h //g" \
      -e "/^goom2_library_include_HEADERS =/s/$/ goom_tools.h/" \
      src/Makefile.am && \
    autoreconf -vif -I m4 && ./configure && make && \
    sudo checkinstall --pakdir "$HOME/vlc_build" --backup=no --deldoc=yes \
                      --pkgname goom --pkgversion "2k4-0" --fstrans=no \
                      --deldesc=yes --delspec=yes --default && \
    make distclean && sudo ldconfig
    Seems like a lot of trouble for one old visualisation! Looks like 32bit vlc segfaults with playlists while using goom and ProjectM visualisations, anybody have a fix for this? Thanks again to alienBOB the goom work.

    Skins...

    I am not such a big fan of vlc skins but perhaps others are so I include instructions here for installing a full set. The following is a single command:

    Code:
    mkdir -pv $HOME/.local/share/vlc/skins2 && cd $HOME/vlc_build && \
    wget http://www1.videolan.org/vlc/skins2/vlc-skins.zip && \
    unzip -d $HOME/.local/share/vlc/skins2 vlc-skins.zip
    There are some nice ones in there, I personally like some of the Windows MediaPlayer clones, but I will admit that I usually stay with classic, unskinned vlc. Now finally for vlc itself.

    Building vlc-git..

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

    Code:
    cd $HOME/vlc_build && git clone git://git.videolan.org/vlc.git --depth 1 && \
    cd $HOME/vlc_build/vlc && ./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 --prefix=/usr/local --enable-realrtsp --enable-aa \
                --enable-merge-ffmpeg --enable-vcdx --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:

    Code:
    cd $HOME/vlc_build/vlc && git pull && ./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 --prefix=/usr/local --enable-realrtsp --enable-aa \
                --enable-merge-ffmpeg --enable-vcdx --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! Please use the thread attached to this guide to make any suggestions or ask any questions...

    Guide Updates:

    * May 21: Cleaned up the docs for libbluray, libaacs and libdvdcss, the final one putting up a bit of a tussle....
    * May 18: We build libdvdcss now as Medibuntu's future is uncertain. Changes to the FFmpeg ./configure syntax courtesy of FakeOutdoorsman.
    * May 17: Added instructions for building against goom.
    * May 14: Added in libgtk2.0-dev to enable building of the notify plugin.
    * May 11: Added in setup for a big 'skins' pack & fixed permissions for live555.
    * May 10: Upgraded FFmpeg to 1.2.1 "Magic".
    * May 07: Added a note recommending use of a dedicated VM to use this guide, no doubt many will ignore this .
    * May 06: Removed --enable-ncurses as this is now set to auto in vlc ./configure.
    * May 05: Added libopus-dev libvdpau-dev libxpm-dev libxinerama-dev libtar-dev to the -dev files
    * May 04: Guide returns to Tutorials! Removed the Windows Codecs section as vlc will no longer use these.

    Thumbnails...

    A couple of images below to demonstrate different aspects of vlc-git. The first shows the visualisation goom while the second shows Vovoid's vsxu visualisation. More to follow...
    Attached Images Attached Images
    Last edited by andrew.46; 5 Hours Ago at 06:09 AM.
    You think that's air you're breathing now?

  2. #2

    Re: Howto: Compile the development version of vlc under the latest Ubuntu release

    It is good to have this guide back in 'Tutorials' again, I look forward to supporting this guide comprehensively as I did in the old days!! A very interesting vlc-git development that I bumped into when I edited this guide for Raring is the loss of access to the Windows codecs that was formerly made possible with the --enable-loader option:

    Code:
    + * Removed DLL loader for non-Windows Operating Systems
    A great pity but I guess the Windows codecs were becoming less useful, similar situation with MPlayer. Latest successful compile with this guide:

    Code:
    andrew@corinth:~$ vlc --version | head -n 3
    VLC media player 2.1.0-pre1 Rincewind (revision 64a5b8a)
    VLC version 2.1.0-pre1 Rincewind (64a5b8a)
    Compiled by andrew on corinth (May  4 2013 20:18:23)
    Compiler: gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
    Last edited by andrew.46; 2 Weeks Ago at 11:36 AM.
    You think that's air you're breathing now?

  3. #3

    Re: Howto: Compile the development version of vlc under the latest Ubuntu release

    Looks like I have some substantial catching up to do . I have added the appropriate dev files to support some of vlc's new abilities:

    1. Support for OPUS via libopus.
    2. Support for VDPAU hardware video decoding acceleration on Linux


    The vdpau support is a pretty big thing, should make the upcoming release very popular. Now to hunt down the following:

    Code:
    configure: WARNING: Skins2 interface disabled due to missing dependencies.
    Edit: Looks like libxpm-dev libxinerama-dev libtar-dev solved that one...
    Last edited by andrew.46; 2 Weeks Ago at 02:48 AM.
    You think that's air you're breathing now?

  4. #4
    Join Date
    Jun 2007
    Beans
    11,744

    Re: Howto: Compile the development version of vlc under the latest Ubuntu release

    was going to say that the skins2 wasn't an issue here but see you caught the dep.
    Decided to let the build go on as per how-to go thru, built fine but during install see -
    /usr/bin/ld: /usr/local/lib/libx264.a(common.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
    Likely will be because of a still installed x264 package from typical FFmpeg build. Am currently rebuilding vlc with it removed to d. check.
    If so this isn't first occurrence a static build being used when it shouldn't
    (when I build aud plugins to /opt againt a shared, decoder only, FFmpeg that's built to /opt I have to first remove the FFmpeg build in /usr/local even with proper exports, ect.
    (options would include -
    removing x264* before build (if users only do a static x264 for a FFmpeg build then no use keeping installed
    If one has a current or so FFmpeg build with x264 package still installed then possibly? the x264 build could use --enable-pic & be usable with vlc also
    find a more 'absolute' way to export the pkgconfig/includes
    or
    fix something here?

    edit: 2nd build's install fails now on -
    /usr/bin/ld: /usr/local/lib/libvpx.a(vpx_codec.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
    Also from FFmpeg build - will give some thought ..

    Those are the only 2 here that cause an issue with as is vlc & ffmpeg guide builds, i'll probably just do all static builds out of path & inc., link ,ect as needed, could also move binaries or just run from install dir
    ( /opt/<whatever or $HOME/<whatever> , a one time set up there.
    Last edited by mc4man; 2 Weeks Ago at 05:09 AM. Reason: de not en(coder, ect.

  5. #5

    Re: Howto: Compile the development version of vlc under the latest Ubuntu release

    I have perhaps not tested adequately here in that I have a VM dedicated solely to compiling vlc for this guide and thus I have no extra applications or duplicated applications installed.
    You think that's air you're breathing now?

  6. #6
    Join Date
    Jun 2007
    Beans
    11,744

    Re: Howto: Compile the development version of vlc under the latest Ubuntu release

    Well your guide is fine & the ffmpeg guide is fine, just thinking is there a way for both to co-exist. (on 64 bit), with both guides 'as is'

    Seems to be 4 sources/packages involved, ffmpeg; libopus; libvpx; (lib)x264

    libopus - a static build to /usr/local causes build failure on 'relocation..."
    libvpx - a static build to /usr/local causes install/linking error on 'relocation ...'
    x264 - a static build to /usr/local causes install/linking error on 'relocation ...'
    ffmpeg - a static build to /usr/local causes install/linking error on 'relocation ...'

    In the 3 cases of install/linking error, removing those packages just prior to install & all is well (ie. they're not used during the build

    Edit: out of the many solutions to using both guides decided for here to -
    keep the vlc one as is

    for ffmpeg went with the guide as is except for a couple of small changes,
    All sources use a --prefix=/opt/ffmpeg-current
    For the ffmpeg build added --bindir= /--mandir= /--datadir= options to install those files to appropriate places in /usr/local/ & all is well, both stay out of each others way, ect.

    (the only thing that drove me crazy for a bit was getting ffmpeg to find the other source builds in /opt/ffmpeg-current.
    LD_LIBRARY_PATH & PKG_CONFIG_PATH exports are useless, went with this which worked fine

    export C_INCLUDE_PATH=/opt/ffmpeg-current/include
    Last edited by mc4man; 2 Weeks Ago at 12:13 AM.

  7. #7
    Join Date
    Sep 2006
    Beans
    3,211

    Re: Howto: Compile the development version of vlc under the latest Ubuntu release

    It is nice to see the return of this guide.

  8. #8

    Re: Howto: Compile the development version of vlc under the latest Ubuntu release

    Quote Originally Posted by FakeOutdoorsman View Post
    It is nice to see the return of this guide.
    It is good to be back .
    You think that's air you're breathing now?

  9. #9

    Re: Howto: Compile the development version of vlc under the latest Ubuntu release

    Quote Originally Posted by mc4man View Post

    Edit: out of the many solutions to using both guides decided for here to -
    keep the vlc one as is

    for ffmpeg went with the guide as is except for a couple of small changes.....
    And now all is well?
    You think that's air you're breathing now?

  10. #10
    Join Date
    Jun 2007
    Beans
    11,744

    Re: Howto: Compile the development version of vlc under the latest Ubuntu release

    Quote Originally Posted by andrew.46 View Post
    And now all is well?
    Yeah, if the static git versions of the mentioned sources have their includes & libs 'out of path' then when vlc is installed the linker doesn't use them.
    So the various source, .h, .pc, .a & .la files are in /opt/ffmpeg-current/*, ffmpeg binaries go to /usr/local/bin, the man, data files to /ust/local/share*, ect.
    If I was using x264 directly it could also go to /usr/local/bin.

    This is just one way to address, one could do any of several other approaches, from this guide only perspective I guess either just warn about to remove conflicting before the vlc install, (64 bit), or find a way to prevent when they do exist (I don't quite understand the install process, just can see what happens & what causes

    So just as an ex. of my 'new' ffmpeg configure - (for FO's guide
    Code:
    export C_INCLUDE_PATH=/opt/ffmpeg-current/include
    export LIBRARY_PATH=/opt/ffmpeg-current/lib
    export CPLUS_INCLUDE_PATH=/opt/ffmpeg-current/include 
    export PKG_CONFIG_PATH=/opt/ffmpeg-current/lib/pkgconfig
    
    ./configure --prefix=/opt/ffmpeg-current --bindir=/usr/local/bin --mandir=/usr/local/share/man \
    --datadir=/usr/local/share/ffmpeg  --enable-gpl --enable-libass --enable-libfaac \
    --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libspeex \
    --enable-librtmp --enable-libtheora   --enable-libvorbis  --enable-x11grab --enable-libx264 \
    --enable-nonfree --enable-version3 --enable-libvpx --enable-libopus --enable-libfdk-aac
    edit; initially I also used this prior to ffmpeg configure but I don't think it mattered
    export LIBRARY_PATH=/opt/ffmpeg-current/lib
    Last edited by mc4man; 1 Week Ago at 04:37 AM. Reason: expanded exports

Page 1 of 4 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •