Results 1 to 10 of 477

Thread: [Howto] Successfully install the svn MPlayer under Hardy Heron

Threaded View

  1. #1
    Join Date
    Dec 2006
    Beans
    6,936

    [Howto] Successfully install the svn MPlayer under Hardy Heron

    This guide shows how to successfully compile a fully featured svn MPlayer and MEncoder with all of the codecs and with the Graphical User Interface (GUI) SMPlayer. It is designed to work with Ubuntu Hardy Heron LTS and will be supported by myself until the 'end-of-life' of Hardy in April 2011 courtesy of my new best friend VirtualBox.

    ==========================================
    Some 'External' Libraries ...
    ===========================================

    There are a few libraries that are important to have installed before compiling the svn MPlayer and I give the details here for installing x264, Live555 and libopencore-amr:

    -----------------
    x264 ...
    -----------------

    The MPlayer developers advise that current x264 sources should be used with the svn MPlayer and details follow for compiling both a of yasm newer than that found in the Ubuntu repository and the git x264. But first to assemble some compiling software and a few vital utilities:

    Code:
    $ sudo apt-get install build-essential checkinstall subversion git-core
    and then to install yasm which is required for optimising the x264 build:

    Code:
    $ cd $HOME
    $ wget http://www.tortall.net/projects/yasm/releases/yasm-0.8.0.tar.gz
    $ tar xzvf yasm-0.80.tar.gz
    $ cd yasm-0.8.0
    $ ./configure
    $ make
    $ sudo checkinstall -D --pkgname=yasm --fstrans=no --pakdir "$HOME/Desktop" \
    --maintainer "$USER" --pkgversion "0.8.0" --backup=no \
    --deldoc=yes --deldesc=yes --delspec=yes --default
    $ make distclean
    and now to install the x264 libraries from git:

    Code:
    $ sudo apt-get purge x264 libx264-dev
    $ cd $HOME
    $ git clone git://git.videolan.org/x264.git
    $ cd x264
    $ ./configure --prefix=/usr --enable-shared
    $ make
    $ sudo checkinstall -D --pkgname=x264 --fstrans=no --pakdir "$HOME/Desktop" \
    --maintainer "$USER" --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" --backup=no \
    --deldoc=yes --deldesc=yes --delspec=yes --default
    $ make distclean
    Next to install the Live555 libraries:

    -------------------
    Live555 ...
    -------------------

    Live555 is a vital library if you ever intend to access streaming radio or television broadcasts:

    Code:
    $ cd $HOME
    $ wget http://www.live555.com/liveMedia/public/live555-latest.tar.gz
    $ tar xvf live555-latest.tar.gz
    $ cd live
    $ ./genMakefiles linux
    $ make
    $ sudo cp -r $HOME/live /usr/lib
    $ make clean
    This library is updated quite frequently so you may like to return here at some stage and pick up a newer version? Next to install the libopencore-amr libraries:

    -------------------
    libopencore-amr ...
    -------------------

    These libraries are required to give the svn MPlayer the ability to playback files with amr sound:

    Code:
    $ cd $HOME
    $ wget http://transact.dl.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz
    $ tar xvf opencore-amr-0.1.2.tar.gz
    $  cd opencore-amr-0.1.2/
    $ ./configure --prefix=/usr
    $ make
    $ sudo checkinstall --fstrans=no --install=yes --pakdir "$HOME/Desktop" \
    --maintainer "$USER" --pkgname="libopencore-amr" --pkgversion="0.1.2"  \
    --backup=no --deldoc=yes --deldesc=yes --delspec=yes --gzman --default
    $ make distclean
    With this preparation complete it is time now to setup the codecs:

    ======================
    Set up the Codecs ...
    ======================

    MPlayer has the ability to use and external library of codecs to playback some media files. Conveniently Medibuntu holds these files and I would suggest that you now read over the following page to understand the implications of utilising this repository which is not part of Ubuntu:

    Medibuntu - Community Ubuntu Documentation
    https://help.ubuntu.com/community/Medibuntu

    The actual syntax to add the repository (taken directly from the page above) is as follows:

    Code:
    sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list \
     --output-document=/etc/apt/sources.list.d/medibuntu.list &&
    sudo apt-get -q update &&
    sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring &&
    sudo apt-get -q update
    Once the repository is in place users of a 32bit system will need to run the following:

    Code:
    $ sudo apt-get install w32codecs
    while users of a 64bit system will need to run the following instead:

    Code:
    $ sudo apt-get install w64codecs
    =============================
    Source a Font
    =============================

    Mplayer needs to know the location of a TrueType Font to show movie subtitles. (As you probably know this can be activated with the 'j' key.) This can be selected from the commandline but more traditionally a symlink is created to the font of your choice:

    Code:
    $ mkdir -v $HOME/.mplayer
    $ ln -sv /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf ~/.mplayer/subfont.ttf
    Feel free to choose your own font but this will certainly do to start with.

    ====================================
    Download the 'Development' Files
    ====================================

    By default Ubuntu does not offer a particularly rich development environment so we need to download the required 'dev' files plus a few extra programs. Do not be alarmed if the repository suggests other files as well, or informs you that you already have some of this impressive list. And certainly feel free to add your own!

    Code:
    $ sudo apt-get install comerr-dev ladspa-sdk libaa1-dev libarts1c2a libarts1-dev \
    libartsc0 libartsc0-dev libasound2-dev libaudio2 libaudio-dev libaudiofile-dev \
    libavahi-client-dev libavahi-common-dev libcaca-dev libcairo-directfb2 \
    libcairo-directfb2-dev libcdio-dev libcdparanoia0-dev libcucul-dev libcupsys2-dev \
    libdbus-1-dev libdirectfb-dev libdirectfb-extra libdts-dev libdv4-dev libenca0 \
    libenca-dev libesd0-dev libfaac0 libfaac-dev libfreebob0 libfribidi-dev \
    libgcrypt11-dev libggi2 libggi2-dev libggiwmh0 libggiwmh0-dev libgii1 libgii1-dev \
    libgii1-target-x libgl1-mesa-dev libglu1-mesa-dev libgnutls-dev libgnutlsxx13 \
    libgpg-error-dev libgtk2.0-dev libgtk-directfb-2.0-0 libgtk-directfb-2.0-dev \
    libjack0 libjack-dev libjpeg62-dev libkadm55 libkrb5-dev libladspa-ocaml \
    libladspa-ocaml-dev liblame0 liblame-dev liblcms1-dev libstdc++5 \
    liblzo2-dev libmad0 libmad0-dev libmng-dev libmpcdec3 libamrnb3 libamrwb3 \
    libmpcdec-dev libncurses5-dev libogg-dev libopenal-dev libopencdk10-dev \
    libpng12-dev libpopt-dev libpulse-browse0 libpulse-dev libpulse-mainloop-glib0 \
    libqt3-headers libqt3-mt libqt3-mt-dev libsdl1.2-dev libslang2-dev libsmbclient-dev \
    libsmpeg0 libsmpeg-dev libspeex-dev libsvga1 libsvga1-dev libsysfs-dev libtasn1-3-dev \
    libtheora-dev libtwolame0 libtwolame-dev libungif4-dev libungif4g libvorbis-dev \
    libx11-dev libxcb-shm0 libxcb-shm0-dev libxcb-xv0 \
    libxcb-xv0-dev libxcb-xvmc0 libxcb-xvmc0-dev libxext-dev libxi-dev libxinerama-dev \
    libxmu-dev libxmu-headers libxss-dev libxt-dev libxv-dev libxvidcore4 libxvidcore4-dev \
    libxvmc1 libxvmc-dev libxxf86dga-dev libxxf86vm-dev mesa-common-dev ocaml-base-nox \
    ocaml-findlib ocaml-interp ocaml-nox qt3-dev-tools x11proto-core-dev \
    x11proto-scrnsaver-dev x11proto-video-dev x11proto-xf86dga-dev \
    x11proto-xf86vidmode-dev zlib1g-dev zlib1g-dev
    =================================
    Download and Compile the svn mplayer
    =================================

    Finally after all of the preparation it is time to download MPlayer from the subversion repository:

    Code:
    $ cd $HOME
    $ svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
    $ cd $HOME/mplayer
    $ ./configure --confdir=/etc/mplayer
    $ make
    $ sudo checkinstall -D --install=yes --fstrans=no --pakdir "$HOME/Desktop" \
    --pkgname mplayer --backup=no --deldoc=yes --deldesc=yes --delspec=yes --default \
    --pkgversion "3:1.0~svn-`grep "#define VERSION" version.h | cut -d"-" -f2`" \
    --provides "mplayer,mencoder"
    $ make distclean
    This of course has only installed the commandline MPlayer, now to install the GUI SMPlayer:

    ===========================
    Downloading SMPlayer ...
    ===========================

    The default gui for MPlayer is known as gmplayer and it has been out of development for some time. I personally use the SMPLayer in its place and I would advise that you do the same. The versions of SMplayer in both the main repository and the repository backports are a little dated so I would suggest using a copy from a PPA generously maintained by the developer of SMPlayer. Add the following to your /etc/apt/sources.list:

    Code:
    deb http://ppa.launchpad.net/rvm/smplayer/ubuntu hardy main 
    deb-src http://ppa.launchpad.net/rvm/smplayer/ubuntu hardy main
    If you feel that you can trust rvm and his packages, as I do, you can also install the OpenPGP key for this PPA:

    Code:
    $ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E4A4F4F4
    and then simply run:

    Code:
    $ sudo apt-get update && sudo apt-get upgrade
    $ sudo apt-get install smplayer
    It is a little bit of futzing around but well worth the trouble taken and you will then be using a version of SMPlayer that will work well with the cutting edge MPlayer.

    =============================
    And in conclusion.....
    =============================

    And so you have successfully installed the svn MPlayer! You can check the options available for you with the following commands:

    1. mplayer -vo help : Video output available to mplayer
    2. mplayer -ao help : Audio output available to mplayer
    3. mplayer -vc help : Available video codecs
    4. mplayer -ac help : Available audio codecs
    5. mencoder -ovc help : Video encoding available to mencoder
    6. mencoder -oac help : Audio encoding available to mencoder


    Start both from the command line, the player with the command mplayer and the movie encoder with mencoder. The gui SMPlayer should appear on your menu. And remember: "Have fun!".

    Andrew Strong
    November 11th, 2009
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	smplayer_rammstein.png 
Views:	103 
Size:	282.0 KB 
ID:	135665  
    Last edited by andrew.46; November 11th, 2009 at 02:25 AM.

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
  •