Page 1 of 48 12311 ... LastLast
Results 1 to 10 of 477

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

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

    [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:	258 
Size:	282.0 KB 
ID:	135665  
    Last edited by andrew.46; November 11th, 2009 at 02:25 AM.

  2. #2
    Join Date
    Jan 2007
    Beans
    126
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: [Howto] Successfully install the svn mplayer + gmplayer + all the codecs.

    Thanks for the guide!

    When installing all the dev's I had to change the 0.9-22 to 0.9-25 in all cases. Also it didn't like me doing libglu-dev because it's part of the libglu-mesa-dev metapackage or something.

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

    Re: [Howto] Successfully install the svn mplayer + gmplayer + all the codecs.

    Hi,

    Thanks for the message:

    Quote Originally Posted by tribble222 View Post
    Thanks for the guide!

    When installing all the dev's I had to change the 0.9-22 to 0.9-25 in all cases. Also it didn't like me doing libglu-dev because it's part of the libglu-mesa-dev metapackage or something.
    There is a slight problem with specifying all these dev packages: they vary from one version of ubuntu to another. I am planning on setting up a Gutsy set of dev files and then labelling the walkthough: "Gutsy Gibbon: svn + etc etc"

    Everything else worked out ok though?

    Andrew
    You think that's air you're breathing now?

  4. #4
    Join Date
    Jan 2007
    Beans
    126
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: [Howto] Successfully install the svn mplayer + gmplayer + all the codecs.

    Quote Originally Posted by andrew.46 View Post
    Hi,

    Everything else worked out ok though?
    Actually, I'm having a problem compiling it now. I seem to have some problem with libavformat.

    I get:

    libavformat/libavformat.a(allformats.o): In function `av_register_all':
    allformats.c.text+0xf3): undefined reference to `avisynth_demuxer'
    collect2: ld returned 1 exit status
    make: *** [mplayer] Error 1


    Edit: I compiled ffmpeg from source and now mplayer compiles great with your instructions

    Edit2: But I don't get any video, just greenish stuff...

    Edit3: I just had to specify -vo. Now everything works perfectly!
    Last edited by tribble222; September 27th, 2007 at 02:08 AM.

  5. #5
    Join Date
    Sep 2007
    Beans
    74

    Re: [Howto] Successfully install the svn mplayer + gmplayer + all the codecs.

    Does Not Work With Ubuntu Fiesty Fawn 7

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

    Re: [Howto] Successfully install the svn mplayer + gmplayer + all the codecs.

    Hi,

    Sorry you had so much trouble,

    Quote Originally Posted by tribble222 View Post
    Actually, I'm having a problem compiling it now. I seem to have some problem with libavformat.

    I get:

    libavformat/libavformat.a(allformats.o): In function `av_register_all':
    allformats.c.text+0xf3): undefined reference to `avisynth_demuxer'
    collect2: ld returned 1 exit status
    make: *** [mplayer] Error 1


    Edit: I compiled ffmpeg from source and now mplayer compiles great with your instructions

    Edit2: But I don't get any video, just greenish stuff...

    Edit3: I just had to specify -vo. Now everything works perfectly!
    Oddly enough you should not have to compile ffmpeg apart from the svn package, but if it has worked for you ....

    You should have a choice of -vo. Run the following in a terminal:

    Code:
     mplayer -vo help
    and all available options will be seen. If you want a default one start up a ~/ .mplayer/config and place it in there.

    ALl the best,

    Andrew

    PS I have mplayer running on gutsy, but reasonably extensive changes in the required dev files. I shall change everything when Gutsy is officially released
    You think that's air you're breathing now?

  7. #7
    Join Date
    Jan 2007
    Beans
    126
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: [Howto] Successfully install the svn mplayer + gmplayer + all the codecs.

    Quote Originally Posted by andrew.46 View Post
    Hi,

    Sorry you had so much trouble,



    Oddly enough you should not have to compile ffmpeg apart from the svn package, but if it has worked for you ....
    Yes, I found out later that ffmpeg compiles with mplayer so I'm not sure how installing ffmpeg helped.

    Thanks for the tip with the config file!

  8. #8
    Join Date
    Dec 2006
    Beans
    7,349

    Re: [Howto] Successfully install the svn mplayer + gmplayer + all the codecs.

    Hi,

    Good to see a satisfied customer:

    Quote Originally Posted by tribble222 View Post
    Yes, I found out later that ffmpeg compiles with mplayer so I'm not sure how installing ffmpeg helped.

    Thanks for the tip with the config file!
    There is a system one somewhere as well. Search for mplayer.conf which should get you started. I probably should add that to the guide but you really have to stop somewhere

    Beta of the Gutsy version is here:

    http://people.aapt.net.au/~adjlstrong/ftgws.html

    I have left out checkinstall, jazzed up the directory selection and changed all the devs. The radio business won't be appearing on the forums though

    Andrew
    You think that's air you're breathing now?

  9. #9
    Join Date
    Aug 2007
    Beans
    245
    Distro
    Ubuntu

    Re: [Howto] Successfully install the svn mplayer + gmplayer + all the codecs.

    how do I know if my computer has GTK or not ?

    Checking for GTK+ version ... GTK-2 devel packages were not found, trying GTK 1.2
    Checking for GTK version ...
    Error: The GUI requires GTK devel packages (which were not found).

    Check "configure.log" if you do not understand why it failed.



    how can I install that one ?

  10. #10
    Join Date
    Dec 2006
    Beans
    7,349

    Re: [Howto] Successfully install the svn mplayer + gmplayer + all the codecs.

    Hi,

    Saw your message:

    Quote Originally Posted by xieu90 View Post
    how do I know if my computer has GTK or not ?
    Checking for GTK+ version ... GTK-2 devel packages were not found, trying GTK 1.2
    Checking for GTK version ...
    Error: The GUI requires GTK devel packages (which were not found).
    Check "configure.log" if you do not understand why it failed.
    how can I install that one ?
    Looks like you are missing libgtk2.0-dev which you can install with apt-get.

    A broader issue is a miscalculation that I have made in the differences between versions of Ubuntu. What I am working on is a small rewrite of this guide that will target only one version: Gutsy Gibbon, This will make installation and troubleshooting easier.

    Really the major difference will be the dev packages. The use of svn, setting up of skins etc will remain unchanged.

    Andrew
    You think that's air you're breathing now?

Page 1 of 48 12311 ... 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
  •