Page 1 of 5 123 ... LastLast
Results 1 to 10 of 66

Thread: Howto: Build the svn MPlayer under the latest release version of Ubuntu

Hybrid View

  1. #1
    Join Date
    Dec 2006
    Beans
    7,317

    Howto: Build the svn MPlayer under the latest release version of Ubuntu

    This guide details how to install the development version of MPlayer on the latest release version of Ubuntu Linux. It will be periodically updated to cover the latest Ubuntu version in a 'rolling release' fashion. I hope you enjoy this guide and profit by it, feel free to post any problems or discussion in the thread that follows.

    Preparation: 14.04 LTS (Trusty Tahr)...

    To start with some basic tools are required, and we will also setup our build directory:

    Code:
    sudo apt-get -y install build-essential subversion checkinstall yasm \
    git docbook-xml docbook-xsl xsltproc libxml2-utils && \
    mkdir -pv $HOME/mplayer_build
    Next a considerable volume of interlinked development files are required, the following is a single command:

    Code:
    sudo apt-get -y install libaa1-dev libasound2-dev libcaca-dev libcdparanoia-dev libdca-dev \
    libdirectfb-dev libenca-dev libesd0-dev libfontconfig1-dev libfreetype6-dev \
    libfribidi-dev libgif-dev libgl1-mesa-dev libjack-jackd2-dev libopenal-dev libpulse-dev \
    libsdl1.2-dev libsvga1-dev libvdpau-dev libxinerama-dev libxv-dev libxvmc-dev libxxf86dga-dev \
    libxxf86vm-dev librtmp-dev libsctp-dev libass-dev libfaac-dev libsmbclient-dev libtheora-dev \
    libogg-dev libxvidcore-dev libspeex-dev libvpx-dev libschroedinger-dev libdirac-dev libdv4-dev \
    libopencore-amrnb-dev libopencore-amrwb-dev libmp3lame-dev libtwolame-dev \
    libmad0-dev libgsm1-dev libbs2b-dev liblzo2-dev ladspa-sdk libopenjpeg-dev libfaad-dev \
    libmpg123-dev libopus-dev libbluray-dev libaacs-dev libgtk2.0-dev
    Be a little wary of omitting any of these files as often a single file given here pulls in several more that are essential to a good MPlayer installation but feel free to add a few if required. With the basics done now we download some files external to the Ubuntu repositories:

    Codecs...

    MPlayer benefits from the use of some external codecs and these can be downloaded directly from the MPlayer website. The following is a single command:

    Code:
    cd $HOME/mplayer_build && \
    sudo mkdir -pv /usr/local/lib/codecs && \
    if [ "$(uname -m)" = "x86_64" ]; then
     wget http://www.mplayerhq.hu/MPlayer/releases/codecs/essential-amd64-20071007.tar.bz2
     tar xjvf essential-amd64-20071007.tar.bz2
     sudo cp -v essential-amd64-20071007/* /usr/local/lib/codecs
    else
     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
    Bear in mind that codecs for 64 bit users are pretty minimal, the real benefits here are for the 32 bit users. There is a continuing drive to bring access to these file formats under the libavcodec umbrella so hopefully one day these codecs will no longer be necessary.

    DVD Playback...

    The various libraries involved in DVD playback have all moved beyond repository versions and the newest libdvdcss requires newer libdvdread at least, I will throw in the newest libdvdnav for free . First remove all of the older libraries:

    Code:
    sudo apt-get remove libdvdcss2 libdvdnav-dev libdvdnav4 libdvdread-dev libdvdread4
    and now install the newer libraries:

    libdvdcss...

    Install the latest libdvdcss with the following single command:

    Code:
    cd $HOME/mplayer_build && \
    wget http://download.videolan.org/pub/libdvdcss/1.3.0/libdvdcss-1.3.0.tar.bz2 && \
    tar xvf libdvdcss-1.3.0.tar.bz2 && \
    cd libdvdcss-1.3.0 && \
    ./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/mplayer_build" --backup=no --deldoc=yes \
                      --pkgname libdvdcss2 --pkgversion "1.3.0" --fstrans=no \
                      --deldesc=yes --delspec=yes --default && \
    make distclean && sudo ldconfig
    libdvdread...

    Install the latest libdvdread with the following single command:

    Code:
    cd $HOME/mplayer_build && \
    wget http://www.videolan.org/pub/videolan/libdvdread/5.0.0/libdvdread-5.0.0.tar.bz2 && \
    tar xvf libdvdread-5.0.0.tar.bz2 && \
    cd libdvdread-5.0.0 && \
    ./configure && make && \
    mkdir -vp doc-pak && cp -v AUTHORS ChangeLog COPYING NEWS README doc-pak && \
    sudo checkinstall --pakdir "$HOME/mplayer_build" --backup=no --deldoc=yes \
                      --pkgname libdvdread --pkgversion "5.0.0" --fstrans=no \
                      --deldesc=yes --delspec=yes --default && \
    make distclean && sudo ldconfig
    libdvdnav...


    Install the latest libdvdnav with the following single command:

    Code:
    cd $HOME/mplayer_build && \
    wget http://www.videolan.org/pub/videolan/libdvdnav/5.0.1/libdvdnav-5.0.1.tar.bz2 && \
    tar xvf libdvdnav-5.0.1.tar.bz2 && \
    cd libdvdnav-5.0.1 && \
    ./configure  && make && \
    mkdir -vp doc-pak && cp -v AUTHORS ChangeLog COPYING README TODO doc-pak && \
    sudo checkinstall --pakdir "$HOME/mplayer_build" --backup=no --deldoc=yes \
                      --pkgname libdvdnav --pkgversion "5.0.1" --fstrans=no \
                      --deldesc=yes --delspec=yes --default && \
    make distclean && sudo ldconfig
    And now to compile the MPlayer code:

    Compiling MPlayer...

    Now to finally download and compile the svn MPlayer, bear in mind that you will be asked to also download the FFmpeg git source during this process which you should allow by pressing 'enter' when directed. The following is a single command:

    Code:
    cd $HOME/mplayer_build && \
    svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer && cd mplayer && \
    ./configure --disable-mencoder --codecsdir=/usr/local/lib/codecs && \
    make -j 2 && make html-chunked && \
    mkdir -vp doc-pak && \
    cp -v DOCS/HTML/*/* AUTHORS Changelog LICENSE README doc-pak && \
    sudo checkinstall -D --install=yes --fstrans=no --pakdir "$HOME/mplayer_build" \
       --pkgname mplayer --backup=no --deldoc=yes --deldesc=yes --delspec=yes --default \
       --pkgversion "3:1.0~svn$(LC_ALL=C svn info 2> /dev/null | \
         grep Revision | cut -d' ' -f2)" && \
    make distclean && sudo ldconfig
    And this is enough to get you a working copy of the great MPlayer! But it is a good idea to return from time to time and update your installation:

    Updating MPlayer...

    When you wish to update the svn MPlayer, as you definitely should do from time to time, the following single command will suffice:

    Code:
    cd $HOME/mplayer_build/mplayer && svn up && \
    ./configure --disable-mencoder --codecsdir=/usr/local/lib/codecs && \
    make -j 2 && make html-chunked && \
    mkdir -vp doc-pak && \
    cp -v DOCS/HTML/*/* AUTHORS Changelog LICENSE README doc-pak && \
    sudo checkinstall -D --install=yes --fstrans=no --pakdir "$HOME/mplayer_build" \
       --pkgname mplayer --backup=no --deldoc=yes --deldesc=yes --delspec=yes --default \
       --pkgversion "3:1.0~svn$(LC_ALL=C svn info 2> /dev/null | \
         grep Revision | cut -d' ' -f2)" && \
    make distclean && sudo ldconfig
    Using a gui...

    Many will want a gui to use with MPlayer and still the best is SMPlayer, although there is competition around these days! I conquer my usual misgivings about PPAs and give the directions for RVM's PPA:

    Code:
    sudo add-apt-repository ppa:rvm/smplayer && \
    sudo apt-get update && \
    sudo apt-get install smplayer smtube smplayer-themes smplayer-skins
    This completes the setup for this guide and I wish you all the best with your continued exploration of this great media player!

    And in conclusion...

    Guide updates:

    * Dec 02: Added compile instructions for DVD libraries to sort out some incompatibilites.
    * Dec 01: Added the required libraries (libdvdread & libdvdnav) to allow dvd reading post MPlayer source changes.
    * Oct 11: Update for Trusty Tahr, removed MEncoder and GMPlayer, added SMPlayer.
    Last edited by andrew.46; December 2nd, 2014 at 09:21 AM.
    You think that's air you're breathing now?

  2. #2
    Join Date
    Dec 2006
    Beans
    7,317

    Re: Howto: Build the svn MPlayer under the latest release version of Ubuntu

    This guide has returned to the Forums, feels good to be back again! I have placed a 301 redirect from its temporary home on my website so there will be no duplication...
    You think that's air you're breathing now?

  3. #3
    Join Date
    Dec 2006
    Beans
    7,317

    Re: Howto: Build the svn MPlayer under the latest release version of Ubuntu

    This guide no longer includes instructions for SMPlayer but if you are interested perhaps use the developer's PPA:

    Code:
    sudo add-apt-repository ppa:rvm/smplayer
    sudo apt-get update
    sudo apt-get install smplayer smtube smplayer-themes smplayer-skins
    Most recent MPlayer successful compile:

    Code:
    andrew@ithaca:~$ mplayer | head -n 1
    MPlayer SVN-r36298-4.7 (C) 2000-2013 MPlayer Team
    You think that's air you're breathing now?

  4. #4
    Join Date
    Dec 2006
    Beans
    7,317

    Re: Howto: Build the svn MPlayer under the latest release version of Ubuntu

    I have added an optional section for the (now) open source speech codec iLBC. I have also placed a sample file:

    Code:
    wget http://www.andrews-corner.org/samples/luckynight.lbc
    I have to thank a certain bat for the inspiration for this one . MPlayer cannot find the shared library at the moment so this section remains a little broken until I can sort this out...
    You think that's air you're breathing now?

  5. #5
    Join Date
    Jun 2007
    Beans
    16,721

    Re: Howto: Build the svn MPlayer under the latest release version of Ubuntu

    Quote Originally Posted by andrew.46 View Post
    I have added an optional section for the (now) open source speech codec iLBC. I have also placed a sample file:

    Code:
    wget http://www.andrews-corner.org/samples/luckynight.lbc
    I have to thank a certain bat for the inspiration for this one . MPlayer cannot find the shared library at the moment so this section remains a little broken until I can sort this out...
    Where iLBC installs it's libs & what it defines in it's .pc aren't the same, maybe try adjusting one or the other

    mplayer would play if started with an env but's that's no 'solution'
    ex.
    Code:
    :~$ env LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu   mplayer  /home/doug/luckynight.lbc
    Creating config file: /home/doug/.mplayer/config
    MPlayer SVN-r36305-4.7 (C) 2000-2013 MPlayer Team
    mplayer: could not connect to socket
    mplayer: No such file or directory
    Failed to open LIRC support. You will not be able to use your remote control.
    
    Playing /home/doug/luckynight.lbc.
    libavformat version 55.8.102 (internal)
    libavformat file format detected.
    [ilbc @ 0x7f7e59624c60]max_analyze_duration 5000000 reached at 5000000 microseconds
    [ilbc @ 0x7f7e59624c60]Estimating duration from bitrate, this may be inaccurate
    [lavf] stream 0: audio (libilbc), -aid 0
    Load subtitles in /home/doug/
    ==========================================================================
    Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
    libavcodec version 55.15.100 (internal)
    AUDIO: 8000 Hz, 1 ch, s16le, 15.2 kbit/11.87% (ratio: 1900->16000)
    Selected audio codec: [libilbc] afm: ffmpeg (FFmpeg libilbc)
    ...ect.
    A symlink shows -

    Code:
     
    $ ldd /usr/local/bin/mplayer |grep ilbc
    	libilbc.so.1 => not found
    $ sudo ln -s /usr/local/lib/x86_64-linux-gnu/libilbc.so.1.1.1   /usr/local/lib/libilbc.so.1
    $ sudo ldconfig
    $ ldd /usr/local/bin/mplayer |grep ilbc
    	libilbc.so.1 => /usr/local/lib/libilbc.so.1 (0x00007f4196fc0000)
    Last edited by mc4man; June 9th, 2013 at 03:48 AM. Reason: linking

  6. #6
    Join Date
    Dec 2006
    Beans
    7,317

    Re: Howto: Build the svn MPlayer under the latest release version of Ubuntu

    Thanks again mc4man for looking at this! I have carved a little piece of the CMakeLists.txt away which I did not particularly like anyway:

    Code:
    cd $HOME/mplayer_build && git clone git://github.com/dekkers/libilbc.git --depth 1 && \
    cd $HOME/mplayer_build/libilbc && mkdir build && cd build && \
    sed -i_bak 's#/${CMAKE_LIBRARY_ARCHITECTURE}##g' ../CMakeLists.txt && \
    cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. && make && \
    mkdir -vp doc-pak && cp -v ../README doc-pak && \
    sudo checkinstall --pakdir "$HOME/mplayer_build" --backup=no --deldoc=yes \
                      --pkgname libilbc --pkgversion "1.1.1-git-$(date +%Y%m%d)" --fstrans=no \
                      --deldesc=yes --delspec=yes --default && \
    sudo ldconfig && cd .. && rm -rf $HOME/mplayer_build/libilbc/build && \
    mv CMakeLists.txt_bak CMakeLists.txt
    and restored it at the end for the sake of completion. It may not be the most elegant solution but it works well enough on this 32bit VM and I hope also on a 64bit system (I do not have a 64bit VM for MPlayer atm). I will probably revisit this over the next week and neaten things up a little. This is not the greatest CMakeLists.txt file, gave a few issues with 64bit/multilib slackware as well, but it could be that I am not the greatest user of cmake in the Linux world .

    Thanks again for taking the trouble...
    Last edited by andrew.46; June 9th, 2013 at 11:22 AM.
    You think that's air you're breathing now?

  7. #7
    Join Date
    Dec 2006
    Beans
    7,317

    Re: Howto: Build the svn MPlayer under the latest release version of Ubuntu

    Compile has been fixed with r36330:

    http://lists.mplayerhq.hu/pipermail/...ne/086312.html
    You think that's air you're breathing now?

  8. #8
    Join Date
    Jun 2007
    Beans
    16,721

    Re: file type of svn mplayer

    Not sure when started but at least here in all recent svn mplayer builds mplayer & mencoder, if built, are seen as -
    shared library (application/x-sharedlib) ( ELF 64-bit LSB shared object
    screen 1, in this case used yesterdays export to d. check

    Doesn't seem to affect use but seems bothersome.

    on the other hand releases show as normal -
    executable (application/x-executable) (ELF 64-bit LSB executable
    screen 2, using recent 1.1.1 release as source

    edit; see the same with fedora rpm's, release versions are executable, svn are shared object, so seems par for course though curious
    Attached Images Attached Images
    Last edited by mc4man; June 12th, 2013 at 07:30 PM.

  9. #9
    Join Date
    Dec 2006
    Beans
    7,317

    Re: Howto: Build the svn MPlayer under the latest release version of Ubuntu

    Same for Ubuntu and Slackware here. Seen on Ubuntu:

    Code:
    andrew@ithaca:/usr/local/bin$ file --mime-type -b mplayer 
    application/x-sharedlib
    and Slackware:

    Code:
    andrew@skamandros/usr/bin$ file --mime-type -b mplayer
    application/x-sharedlib
    whereas of course it should be:

    Code:
    andrew@skamandros/usr/bin$ file --mime-type -b slrn
    application/x-executable
    In absence of any deliberate change that I can see in the MPlayer svn log I suspect the problem can be at least bypassed with the autoprops setting of svn, but I have no experience with this so some tinkering might be in order. Something odd has happened at the svn repository though...

    Edit: My brain is a little full after this:

    http://svnbook.red-bean.com/nightly/...ced.props.auto
    Last edited by andrew.46; June 13th, 2013 at 12:21 AM.
    You think that's air you're breathing now?

  10. #10
    Join Date
    Jun 2007
    Beans
    16,721

    Re: Howto: Build the svn MPlayer under the latest release version of Ubuntu

    Ultimately don't know if this mimetype business matters as mplayer works fine... & while there aren't that many packages using svn mplayer sources to look in did see the same in fedora which appears to use svn for some builds (fusion
    (fedora 17 & 18 svns are as expected, 19-dev shows what we see, the motu dailies stopped some time ago so nothing there, ect.

    Does though seem to not be 'our', (client?) issue though a test of that isn't quite straightforward.

    Did manage without wasting much time to checkout an older svn -r & supply with an ffmpeg version that it could build from, when done it had the mplayer binary as -
    ~/mplayer$ file ./mplayer
    ./mplayer: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24
    (r35000 with ffmpeg-0.11 source files inserted in mplayer folder

Page 1 of 5 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
  •