Wednesday, February 25, 2009

How To Install On Debian with Several Codecs

I have tested this how-to on Etch 4.0

This howto only includes codecs for win32, Quicktime, RealPlayer, and Live.com (streaming for protocols such as reaplayer)

Not up for doing all of this? There are unofficial debian packages provided by marillat: read more

Otherwise...

Files to download

Source:

MPlayer v1.0pre8 source - 7.8M - You may download directly from the Mplayer HQ Download)
(unless you have a src file of your own you wish to use)

Codecs:

essential-YYYYMMDD.tar.bz2 - Grab the latest version "essential codecs package" from Mplayer HQ Download

live555-latest.tar.gz - about 400 K (live555.com download)

User Conf:

mplayer-user-conf.tar - 690 k ( mirror2)

Since I don't know where you are downloading these to, you will just need to move them to the proper place when I ask you to unpack them.

Uninstalling Old Version

If you have an older version of mplayer on your system remove all traces of it (if you used a deb do dpkg -P mplayer then go through your system and make sure EVERYTHING for mplayer is gone, some things will not be removed with dpkg -P). This step is VERY important.

Things from apt

as root:

apt-get install libogg0 libogg-dev libvorbis0a libvorbis-dev vorbis-tools libpng12-0 libpng12-dev liblogfile-rotate-perl libconfhelper-perl debhelper fakeroot g++ libgtk1.2 libgtk1.2-dev svgalibg1 svgalibg1-dev libsdl1.2-dev libaa1 libaa1-dev x11proto-gl-dev

NOTE: Make sure your gcc and g++ versions match!

Installing the Codecs

as root:

rm -r /usr/lib/win32

(If it exists. These are the w32 codecs, don't worry, we will replace these later, you can pack them up and move them if you are really concerned about losing them)

tar -jxvf essential-YYYYMMDD.tar.bz2

mv essential-YYYYMMDD/ /usr/lib/win32

Live.com Codecs (for streaming realplayer)

cd /usr/local/lib/

rm -r live/

(If it exists. These are the old live.com codecs, don't worry, we will replace these later, you can pack them up and move them if you are really concerned about losing them)

tar -xvvzf live555-latest.tar.gz

cd live/

./genMakefiles linux

make

Setting up the ~/.mplayer directory

(you can skip this if you have your own configs and settings, and/or don't want to use gmplayer)

become your user

cd

tar -xvvf mplayer-user-conf.tar

this will create the ~/.mplayer directory including a skin (neutron), arial size 18 font, and config file

in line 27 of the ~/.mplayer/gui.conf file, change: font_name = "/home/lyz/.mplayer/font/font.desc" to reflect your username (I havent found a way around this step, ~ doesn't work).

Creating the .deb and installing mplayer

as root:

cd /usr/src/mplayer/

tar -jxvvf MPlayerVersion.tar.bz2 (where 'Version' is your version, ie -1.0pre7)

cd MPlayerVersion

DEB_BUILD_OPTIONS="--disable-runtime-cpudetection --disable-rtc --enable-live --with-livelibdir=/usr/local/lib/live" fakeroot debian/rules binary

Make sure there aren't spaces between -- and any-of-the-options

when it's finished compiling, it will create an mplayerVersion.deb file in /usr/src/mplayer

cd /usr/src/mplayer/

dpkg -i mplayerVersion.deb

when it asks about video output choose which is right for you, if unsure just use xv

The End

launch mplayer by typing mplayer moviefile (where moviefile is the name of the file you wish to use to test mplayer)

You're done! Congrats!

Some Notes:

This also includes gmplayer. gmplayer allows you to use "skins" for mplayer, I don't usually use skins because I don't need the gui control, and the skins tend to take away from speed and quailty of movie decoding.

If you're having problems using xv as a video output, try gl or gl2; mplayer -vo help will give you a listing of your options.

Sometimes you will want to watch realplayer files that are .rm; remember that a .rm can be viewed as a simple text file with the stream location of the actual .ra is in that file. mplayer will not play the .rm but it will play the .ra stream. (Apparently there is a patch out so that mplayer will play .rm but I have never used it).

FAQ

Something broke, can you help?

I might be able to, as I said, I have tested this, and if something broke it might be a conflict in versions (stable vs testing vs unstable vs mixed system) or a simple user error. It is quite possibly due to not completely uninstalling previous versions of mplayer, this is a very important step! If all else fails, you can always uninstall the deb, and reinstall what you had before.

I'm not on debian but I want to install mplayer, any pointers?

Not really, I could point you to some sites I have found for other distros, but I have never tried them, so I can't guarantee they will work.

Why don't you include more codecs?

Are there many more? I have included the ones I primarily use, so these are the only codecs I have installed and tested.

Why do you make a .deb? How do I compile it without making a .deb?

I make a .deb because it's debian's package management tool. If you just want to compile it and not bother with the deb, the "DEB_BUILD_OPTIONS" are what would normally be passed when you compile the package by hand.

What about DVD support?

I don't have a DVD-ROM, so I have no way of testing DVD support, sorry.

Links

MPlayerHQ - Main MPlayer site

Live555.com - Home of the live.com codecs

linux.coconia.net "Installing Mplayer" - Not Debian specific, but includes some codecs that I haven't bothered with

No comments: