Page 1 of 33 12311 ... LastLast
Results 1 to 10 of 328

Thread: Howto: Utilise the svn MPlayer to Improve Karmic Koala's 'mplayer-nogui' Package

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

    Howto: Utilise the svn MPlayer to Improve Karmic Koala's 'mplayer-nogui' Package

    Over the last few years I have written several guides for the installation of the development version of MPlayer under Ubuntu. This particular version of that long series of guides is intended to bring the benefits of the cutting edge svn MPlayer to users of Karmic Koala by concentrating on upgrading the mplayer-nogui package. I should mention at this time that the mplayer-nogui package from the Karmic Repository is an improvement over packages seen in previous versions of Ubuntu and if the information below looks a little too much you will still be reasonably well served by simply installing the repository package. This guide is perhaps for those who want a little more...

    ============================
    Some requirements...
    ============================

    There is a little preparation work required before we actually lay hands on the MPlayer application and this will probably take about 30 minutes and involve a download of about 100 megabytes of extra software. First then for some necessary software:

    ------------------------
    Required tools:
    ------------------------

    Some compiling will be required for this guide so we will be downloading some compiling sotware as well as software to access subversion and git repositories and finally the utility checkinstall which will be used to keep the installation within the Ubuntu package management system. Copy the following and paste into a Terminal window, exclude the '$' marks which among other things demonstrates a new line of commands in this guide:

    Code:
    $ sudo apt-get install build-essential gcc-4.3 g++-4.3 subversion checkinstall
    Next to collect some development files:

    ---------------------------
    Development files:
    ---------------------------

    MPlayer works by automatically gathering functionality from various development files installed on your computer. The following list of files has been winnowed out from the standard sudo apt-get build-dep mplayer-nogui command in the interests of maintaining a cleaner system.

    Special note concerning vdpau support: As of r29823 the svn MPlayer requires Version 190.32 (or later) of the NVidia drivers to enable vdpau output, which effectively renders the Karmic NVidia drivers and libvdpau package obsolete. To obtain vdpau output you will now need to obtain the latest drivers from NVidia and compile MPlayer against them, no extra options are needed as MPlayer will detect the drivers/libraries and enable vdpau support automagically.

    The following is a single command:

    Code:
    sudo apt-get install ladspa-sdk libaa1-dev libasound2-dev libatk1.0-dev \
    libaudio-dev libaudio2 libaudiofile-dev libavahi-client-dev libavahi-common-dev \
    libcaca-dev libcairo2-dev libcdparanoia-dev libcelt0 libdbus-1-dev libdc1394-22 \
    libdca-dev libdca0 libdirectfb-dev libdirectfb-extra libdts-dev libesd0-dev \
    libexpat1-dev  libffado1 libfontconfig1-dev libfreebob0 libfreetype6-dev \
    libfribidi-dev libgif-dev libgl1-mesa-dev libglib2.0-dev libglu1-mesa-dev \
    libgsm1 libgtk2.0-dev libice-dev libjack-dev libjack0 libjpeg62-dev liblzo2-2 \
    liblzo2-dev libmail-sendmail-perl libncurses5-dev libogg-dev liboil0.3-dev \
    libopenal-dev libopenal1 libpango1.0-dev libpixman-1-dev libpng12-dev \
    libpthread-stubs0 libpthread-stubs0-dev libpulse-dev libruby1.8 \
    libschroedinger-dev libsdl1.2-dev libslang2-dev libsm-dev libsmbclient-dev \
    libspeex-dev libsvga1 libsvga1-dev libsys-hostname-long-perl libsysfs-dev \
    libtheora-dev libvorbis-dev libvorbisidec-dev libvorbisidec1 libx11-dev libxau-dev \
    libxcb-render-util0-dev libxcb-render0-dev libxcb1-dev libxcomposite-dev \
    libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev \
    libxi-dev libxinerama-dev libxml++2.6-2 libxrandr-dev libxrender-dev libxt-dev \
    libxv-dev libxvidcore4 libxvidcore4-dev libxvmc-dev libxxf86dga-dev libxxf86vm-dev \
    mesa-common-dev vstream-client-dev x11proto-composite-dev x11proto-core-dev \
    x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev \
    x11proto-randr-dev x11proto-render-dev x11proto-video-dev x11proto-xext-dev \
    x11proto-xf86dga-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev xtrans-dev \
    zlib1g-dev libopencore-amrwb-dev libopencore-amrnb-dev libopenjpeg-dev
    We will also add another useful packages here, a current set of Live555 libraries to enable playback of some streaming audio, although you have no interest in streaming audio simply omit this step, many streams will be processed natively by MPlayer anyway:

    Code:
    $ sudo apt-get remove liblivemedia-dev
    $ 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
    These libraries are in constant development so come back here from time to time to repeat the process and pick up the updated libraries.

    Next however to install a codec package:

    -------------
    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, this a single command:

    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 the following should download the appropriate codecs, it is a single command:

    Code:
    if [ "$(uname -m)" = "x86_64" ]; then
     sudo apt-get install w64codecs
    else
     sudo apt-get install w32codecs
    fi
    Now that all of this is done it is time to actually lay hands on the MPlayer files themselves:

    ==============================
    Downloading & Compiling
    ==============================

    The development version of MPlayer is held in a subversion repository that allows read access by users, which is to say that you can download files from the repository but not alter files in this repository. To download our copy of the MPlayer files the following commands are required:

    Code:
    $ cd $HOME
    $ svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
    Now to compile and install the source code, especially note the use of gcc-4.3 in this command. The MPlayer developers believe that there are a few issues compiling under gcc-4.4.1 which is the default under Karmic. If you wish to use gcc-4.4.1 anyway simply omit --cc=gcc-4.3 and cross your fingers while compiling:

    Code:
    $ cd $HOME/mplayer
    $ ./configure --cc=gcc-4.3 --confdir=/etc/mplayer --disable-mencoder --disable-x264
    $ make
    $ sudo checkinstall -D --install=yes --fstrans=no --pakdir "$HOME/Desktop" \
       --pkgname mplayer-nogui --backup=no --deldoc=yes --deldesc=yes --delspec=yes --default \
       --pkgversion "3:1.0~svn-`grep "#define VERSION" version.h | cut -d"-" -f2`"
    $ make distclean
    It is best to now leave $HOME/mplayer undisturbed as you can return at a later date to run the command svn up to download the latest changes in the MPlayer source code, and then recompile. But now to complete the setup:

    ===========================
    Completing the setup...
    ===========================

    There are a couple of other small steps that I would recommend you attend to before launching your brand new copy of mplayer-nogui. The first step is to copy the user configuration file to the appropriate location. The following will accomplish that and also backup any existing configuration file:

    Code:
    $ mv -v $HOME/.mplayer/config $HOME/.mplayer/config_bak
    $ cp -v $HOME/mplayer/etc/example.conf $HOME/.mplayer/config
    Open the file $HOME/.mplayer/config in your favourite text editor and alter the settings as you see fit. In particular have a look at the settings for video out and audio out, on my own system these are vo=x11 and ao=pulse respectively. Next we will set MPlayer to play media from within Firefox by installing the gecko-mediaplayer. I also include instructions for the removal of the Totem plugin as on my system this prevents a few conflicts:

    Code:
    $ sudo apt-get remove totem-mozilla
    $ sudo apt-get install gecko-mediaplayer
    You would be best to add a good quality gui for the commandline MPlayer as well and the best of these is SMPlayer. (I should mention in passing that when you installed the gecko-mediaplayer you also installed another gui: GNOME Mediaplayer, well worth a look at as well.) To get the very best copy of SMPlayer add rvm's PPA as follows:

    Code:
    $ sudo add-apt-repository ppa:rvm/smplayer
    and then install SMPlayer itself:

    Code:
    $ sudo apt-get update && sudo apt-get install smplayer
    This completes the setup for this guide and I wish you all the best with your improved copy of Karmic Koala's mplayer-nogui!

    ===========================
    Some Resources...
    ===========================

    • MPlayer-users MPlayer mailing list for usage questions, feature requests, bug reports. I would advise lurking for while on this list before posting, breaches of posting etiquette are dealt with harshly at times.
    • MPlayer - The Movie Player The html documentation for MPlayer. Usually kept up to date and well worth reading if problems arise and certainly will need to be read before requesting help on MPlayer-users.
    • MPlayer FAQs This page attempts to list all of the frequent questions from the #mplayer irc channel on irc.freenode.net.
    • Top 10 Tricks and Tips for the svn MPlayer A guide on the Ubuntu Forums that demonstrates some of the magic that can be accomplished with the commandline MPlayer. Written by the author of this guide.
    • MPlayer/MEncoder Tips and Tricks A very nicely done guide from the Debian world that is still for the most part relevant to Ubuntu, some great tips for both MPlayer and MEncoder.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	mplayer-nogui_amr.png 
Views:	276 
Size:	334.2 KB 
ID:	134033   Click image for larger version. 

Name:	mplayer-nogui_smplayer.png 
Views:	206 
Size:	366.0 KB 
ID:	136085   Click image for larger version. 

Name:	mplayer-nogui_gecko-mediaplayer.png 
Views:	221 
Size:	476.9 KB 
ID:	136086  
    Last edited by andrew.46; March 10th, 2010 at 08:40 AM.
    You think that's air you're breathing now?

  2. #2
    Join Date
    Aug 2007
    Location
    Manchester, UK
    Beans
    10,278
    Distro
    Ubuntu

    Re: Howto: Utilise the svn MPlayer to Improve Karmic Koala's 'mplayer-nogui' Package

    Though I probably won't use it, this looks like a pretty comprehensive guide Thanks andrew.46

  3. #3
    Join Date
    Apr 2005
    Beans
    432
    Distro
    Ubuntu

    Re: Howto: Utilise the svn MPlayer to Improve Karmic Koala's 'mplayer-nogui' Package

    What are the benefits of the nogui version? A cursory look at the links you posted and a Google search doesn't give me much. I mainly use mplayer with MythTV.

  4. #4
    Join Date
    Dec 2006
    Beans
    6,931

    Re: Howto: Utilise the svn MPlayer to Improve Karmic Koala's 'mplayer-nogui' Package

    Hi NTolerance,

    Quote Originally Posted by NTolerance View Post
    What are the benefits of the nogui version? A cursory look at the links you posted and a Google search doesn't give me much. I mainly use mplayer with MythTV.
    'mplayer-nogui' is a Debian/Ubuntu repackaging of the original MPlayer source code and is the commandline MPlayer only. Other packages created from this source code are include a packaging called simply 'mplayer' which includes the gui gmplayer, another one for the encoder MEncoder and another for the html documentation. I am afraid that I am not familiar with MythTV so I cannot comment on whether it will be of use there. But the benefits of using the svn MPlayer for the mplayer-nogui package include:

    1. If kept up to date you can obtain support from the MPlayer developers
    2. Playback of amr sound is possible, as this guide compiles against the new libopencore-amr libraries.
    3. Playback of wmapro is possible using the native ffwmapro. This is a huge plus for 64bit users.
    4. Integrates beautifully with the gecko-mediaplayer package to give wide media coverage when browsing with Firefox.
    5. Integrates nicely with the best frontend available for MPlayer: SMPlayer.
    6. You can produce your own version of MPlayer shaped to it your needs.


    Plus the benefits and perils of using up to date code that is for the most part updated each and every day. But for MythTV I am not sure of the actual benefits, perhaps another MythTV user could comment here?

    All the best,

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

  5. #5
    Join Date
    Apr 2006
    Location
    Minnesota
    Beans
    748
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Howto: Utilise the svn MPlayer to Improve Karmic Koala's 'mplayer-nogui' Package

    For Mythtv you would certainly want to build mplayer-nogui with the vdpau dev files if you have an Nvidia card series 8 or above.You probably would also want to make sure you have support for x264.

  6. #6
    Join Date
    Dec 2006
    Beans
    6,931

    Re: Howto: Utilise the svn MPlayer to Improve Karmic Koala's 'mplayer-nogui' Package

    Hi fenian,

    Quote Originally Posted by fenian View Post
    For Mythtv you would certainly want to build mplayer-nogui with the vdpau dev files if you have an Nvidia card series 8 or above.You probably would also want to make sure you have support for x264.
    Thanks for that . I have left out vdpau from the guide except to mention briefly that those fortunate enough to have such cards would benefit from the appropriate dev files which will then automagically be picked up by the MPlayer ./configure process.

    Edit: I have finally bowed to a bit of pressure and added in nvidia-185-libvdpau-dev.

    But h264 playback is well covered with the svn MPlayer with the native ffh264. x264 support is of course only required for encoding with MEncoder, which is not covered in this guide.

    All the best,

    Andrew
    Last edited by andrew.46; November 1st, 2009 at 07:10 AM.
    You think that's air you're breathing now?

  7. #7
    Join Date
    Feb 2008
    Beans
    234
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Howto: Utilise the svn MPlayer to Improve Karmic Koala's 'mplayer-nogui' Package

    Firstly, Andrew thanks a lot for this guide.

    Although it seems that I must have made a mistake somewhere because whereas the normal SMplayer build would play all my media files except 3gp/amr this SVN build doesn't seem to want to play any of my files and keeps throwing up the following error:

    Code:
    mplayer -noquiet -nofs -nomouseinput -sub-fuzziness 1 -identify -slave -vo xv -ao alsa, -nokeepaspect -framedrop -nodr -double -input conf=/usr/share/smplayer/input.conf -stop-xscreensaver -wid 81788943 -monitorpixelaspect 1 -*** -embeddedfonts -***-line-spacing 0 -***-font-scale 1 -***-styles /home/peter/.config/smplayer/styles.*** -fontconfig -font Arial -subfont-autoscale 0 -subfont-osd-scale 20 -subfont-text-scale 20 -subcp ISO-8859-1 -subpos 100 -volume 40 -cache 2000 -osdlevel 0 -vf-add screenshot -slices -af scaletempo,equalizer=0:0:0:0:0:0:0:0:0:0 -softvol -softvol-max 110 /home/<insert path to file here>
    
    Warning unknown option stop-xscreensaver at line 87
    Unknown option on the command line: -stop-xscreensaver
    Error parsing option on the command line: -stop-xscreensaver
    MPlayer SVN-r29809-4.3.4 (C) 2000-2009 MPlayer Team
    ID_EXIT=NONE
    I would like to give this another go, this time without distractions from the outside world, but I just thought I would post the outcome before retrying in case something very obvious was missed out.

    And just a thought you mention about the Live555 streaming tools and then mention "These libraries are in constant development so come back here from time to time to repeat the process and pick up the updated libraries. Or if you have no interest in streaming audio simply omit this step, many streams will be processed natively by MPlayer anyway."

    I would say to move this part above the actual code for the Live555 download so people can see that part first and determine whether or not they want Live555 or not.

    Apart from that, great guide and very easy to follow, now I just have to sort out my little issue

  8. #8
    Join Date
    Oct 2008
    Beans
    24

    Re: Howto: Utilise the svn MPlayer to Improve Karmic Koala's 'mplayer-nogui' Package

    Greetings--

    First of all, thanks, andrew.46, for contributing these great how-to's.

    I've just had a go with this one, but caught a snag in the "Downloading and Compiling" section, specifically with the "sudo checkinstall..." command. Everything had gone swimmingly before that. This command stops with the following error:

    (Reading database ... 252465 files and directories currently installed.)
    Unpacking mplayer-nogui (from .../mplayer-nogui_3:1.0~svn-r29810-1_i386.deb) ...
    dpkg: error processing /home/tobias/mplayer/mplayer-nogui_3:1.0~svn-r29810-1_i386.deb (--install):
    trying to overwrite '/usr/local/bin/mplayer', which is also in package mplayer 3:1.0~svn-r29746-1
    dpkg-deb: subprocess paste killed by signal (Broken pipe)
    Errors were encountered while processing:
    /home/tobias/mplayer/mplayer-nogui_3:1.0~svn-r29810-1_i386.deb
    /var/tmp/tmp.80jd1hPXTq/dpkginstall.log (END)
    Perhaps this has to do with the previous version of mplayer that I had? This was the svn version that I'd installed with your Hardy Heron guide. When I upgraded to Karmic, mplayer would not work. (It complained of a missing library--libdirectfb-1.0.so.0. I decided to start from scratch when I find this how-to.) Before starting this how-to, I did a "sudo make uninstall" from within the (old) mplayer directory. When I got this error, I went looking for and deleted /usr/local/bin/mplayer. I tried again, but this error still comes up.

    Any ideas?

    Thanks!

  9. #9
    Join Date
    Dec 2006
    Beans
    6,931

    Re: Howto: Utilise the svn MPlayer to Improve Karmic Koala's 'mplayer-nogui' Package

    Hi 5nak3,

    Quote Originally Posted by 5nak3 View Post

    Code:
    Warning unknown option stop-xscreensaver at line 87
    Hmmm.... something must have been missed during compilation as this option works on my own system which was a bare Karmic installation. The easiest way around this is to remove the option from SMPlayer, I attach a screenshot to demonstrate to location of this option.

    I would say to move this part above the actual code for the Live555 download so people can see that part first and determine whether or not they want Live555 or not.
    Good point, I have altered the guide as you have suggested, thanks .

    Andrew
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	screensaver.png 
Views:	111 
Size:	219.3 KB 
ID:	134291  
    You think that's air you're breathing now?

  10. #10
    Join Date
    Dec 2006
    Beans
    6,931

    Re: Howto: Utilise the svn MPlayer to Improve Karmic Koala's 'mplayer-nogui' Package

    Hi tlee,

    Quote Originally Posted by tlee View Post
    This command stops with the following error:

    Code:
    dpkg: error processing /home/tobias/mplayer/mplayer-nogui_3:1.0~svn-r29810-1_i386.deb (--install):
    trying to overwrite '/usr/local/bin/mplayer', which is also in package mplayer 3:1.0~svn-r29746-1
    Normally what should happen is that dpkg removes the older version and then installs the newer version, which is where the beauty of the naming convention I have suggested comes in (each new revision of MPlayer is a newer version). But this is obviously not happening in your case as instead dpkg is attempting to overwrite your previous file and failing. It is possible to get dpkg to force the installation but I suspect a better option is to look in Synaptic and remove all instances of mplayer-nogui and then reinstall mplayer-nogui. (I would be interested to hear if it removes cleanly, or if there are several instances of MPlayer installed.) With any luck this will get you out of trouble .

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

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