PDA

View Full Version : Fedora Core 2 and MPlayer 0.92


wearingtux
30th May 2004, 07:42 PM
Administrative Notice: This is one method of installing Mplayer and its dependencies. It is recommended to those of you that follow this tutorial that you have some basic understanding of Linux in case problems arise. RPMs are the preffered choice for installing such a piece of software with the use of the YUM software.

Any corrections or questions are certainly welcome!!! ;)

The following are instructions for installing mplayer 0.92.1 as a "play-everything" media player for dvd's, mozilla-embedding, etc on Fedora Core 2. There are tutorials on the web for the packages individually, but I will consolidate them here based on my experiences. Feel free to correct, add, or improve upon my post. You should also read this in its entirety first before trying it. It is also suggested you back up your data before doing this.

My hardware is an HP Pavillion 9600 with a 700MHz AMD Athlon CPU, 512 MB RAM, and an ATI Radeon 9200 128 MB. I am not sure about the steps or special instructions for people using NVidia cards or other Radeon chipsets. I also do not know if the way I do it is the "officially proper" way of doing everything, but it worked for my machine.

On a side note, I tried to install XINE first because I prefer it, but had dependency and compilation issues out of the gate and decided to try and get MPlayer to work instead. I do have a colleague who got XINE to work on Core 2, so if you are interested, reply and I'll see what I can do.

First, download the following, you can place them in your home directory, which will be referred to as "homedir" from now on:

ffmpeg: (Needed for MPEG playback)
http://sourceforge.net/project/showfiles.php?group_id=16082

mplayer: (Right Click, Save Link target as)
http://ftp3.mplayerhq.hu/MPlayer/releases/MPlayer-0.92.1.tar.bz2

mplayer codecs (all-in-one): (Right Click, Save Link target as)
http://ftp3.mplayerhq.hu/MPlayer/releases/codecs/essential-20040427.tar.bz2

mplayer skin of choice: (Choose one. I will use DVDPlayer as an example but this will apply to any)
http://www.mplayerhq.hu/homepage/design7/dload.html

mplayer-plugin 2.60: (For playing some media files in mozilla)
http://sourceforge.net/project/showfiles.php?group_id=71239&package_id=70736

Plugger: (Finds appropriate plugin for mozilla when playing media files, needed for Real Media Files)
http://fredrik.hubbe.net/plugger.html

First, for dvd playback, please be sure your dvd player has dma enabled or it will be jumpy or not work.
My dvd player is on /dev/hdb. You can find out where yours is by typing in:

dmesg | grep dev

and look for your dvd drive specs.
To find out if dma is enabled:

hdparm /dev/hdwhatever

You should get:

using_dma = 1 (on)

If it is not, you can turn it on by using the hdparm command or take a look here:
http://www.yolinux.com/TUTORIALS/LinuxTutorialOptimization.html

Next, extract all packages:

cd homedir

For .gz files:

tar -zxvf pkgname.tar.gz

For .bz2 files:

bzip2 -d pkgname.tar.bz2 ; tar -xvf pkgname.tar

Then as root:

cd (youruser)homedir/ffmpeg-0.4.8
./configure
make
make install

Now, you will need to compile mplayer at least twice to make the appropriate directories for the codecs. This is even suggested in their documentation. Note also that previously I have also installed libdvdcss (DVD decryptor), libdvdread, and libdvdnav as well. Not sure if you will need these for MPlayer, but won't hurt to install them for what we are doing here. Google these packages and install them according to the ./configure, make, make install method.

cd homedir/MPlayer-0.92.1
./configure --enable-gui #enable gui support option for gmplayer command.
make
make install

Once compiled, you might be able to play DVD's with the command:
mplayer -dvd 1 -dvd-device /dev/hdwhatever

The "f" key will toggle into and from full screen mode.

You may run into 2 problems:

1. You will get permissions and/or "directory does not exist" errors, primarily the font.desc. Correct the permissions errors accordingly with chmod and/or chown in your home dir, because since it was compiled as root, those files are owned by root and not you as owner. I looked at the errors generated and corrected accordingly until it worked. I touched the file font.desc to get it to work, but I don't think this is the official fix.

2. There is no Skin for it, but that will be fixed by:

cd homedir/.mplayer
mkdir Skin ; mkdir Skin/SkinName
cp homedir/SkinName/* homedir/.mplayer/Skin/SkinName

Now try:

gmplayer -skin SkinName -dvd-device /dev/hdwhatever -dvd 1

To make Quicktime, MPEG, Real, and Windows formats available:

mkdir /usr/lib/win32
cp homedir/extralite/* /usr/lib/win32/

The extralite directory was made earlier by extracting the all-in-one codecs package. MPlayer looks in /usr/lib/win32 for the codecs for Quicktime.

I also have "QuicktimeEssentials.qtx", "QuickTimeInternetExtras.qtx", and "QuickTime.qts" in the following directories. Locate them with find and it won't hurt to copy them into:

/usr/lib
/usr/local/lib/mplayer

After switching back to the MPlayer installation directory, recompile MPlayer with:
./configure --enable-gui

Before you "make" verify this output, noting the output in bold:

Config files successfully generated by ./configure !

Install prefix: /usr/local
Data directory: /usr/local/share/mplayer
Config direct.: /usr/local/etc/mplayer

Byte order: Little Endian
Optimizing for: athlon mmx mmx2 3dnow 3dnowex mtrr

Enabled optional drivers:
Input: streaming tv-v4l edl tv cdda mpdvdkit2 vcd
Codecs: qtx libavcodec real dshow/dmo win32 libvorbis gif
Audio output: esd arts oss sdl mpegpes(file)
Video output: xvidix sdl vesa gif89a jpeg png mpegpes(file) fbdev opengl dga xv x11
Disabled optional drivers:
Input: tv-bsdbt848 dvdnav dvdread dvdcss smb
Codecs: opendivx xvid libdv xanim libmad liblzo
Audio output: sgi sun alsa dxr2 nas win32
Video output: bl zr dxr3 dxr2 directx svga aa ggi xmga mga directfb tdfxfb 3dfx

'config.h' and 'config.mak' contain your configuration options.
Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
compile *** DO NOT REPORT BUGS if you tweak these files ***

'make' will now compile MPlayer and 'make install' will install it.
Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.

Please check mtrr settings at /proc/mtrr (see DOCS/video.html#mtrr)


Check configure.log if you wonder why an autodetection failed (check whether
the development headers/packages are installed).

If you suspect a bug, please read DOCS/bugreports.html.

If you did not get your wanted codecs, re-check this tutorial or google others, cause that's all i have my friends!!! ;)

Then recompile with:
make
make install

Here is mplayer's official docs on this:
http://web.njit.edu/all_topics/Prog_Lang_Docs/html/mplayer/codecs.html

Install mplayerplug-in for Mozilla support:
cd homedir
rpm -ivh mplayerplug-in-2.60-fc1.i386.rpm

Install "Plugger" for Real Media Support:
cd homedir/plugger-5.1.2
./configure
make
make install

Use the "Plugger Testing Grounds" to test the installation:
http://fredrik.hubbe.net/plugger/test.html

Note: Do NOT use the ibm Linux Commercials to test this, the IBM website uses headers to identify that you are using the "official" media players. This caused a lot of headaches for me. The only one I can get to work is the "Real" version. The others do not at this point, but will make changes if needed. Mpegs, wma, avi, and quicktime files work on every other site I have tried.

gabolander
30th May 2004, 07:47 PM
Thank you, wearingtux! I find your document very interesting.. :cool:
Bye Bye

yusuf_gr8
3rd July 2004, 08:34 AM

Hi Wearing tux!

Your article was very helpful... i tried to install mplayer b4 following instrucions on another site but it did not work... i find that the mplayer is very unstable... maybe i am wrong but it does not seem to have very gr8 features...

cud u post instructions on installing Xine... it'll be a gr8 help

Thanks,

Yusuf

cathal
3rd July 2004, 12:44 PM
I think mplayer is been completly redesigned!

tux2furious
3rd July 2004, 09:25 PM
nice howto, for your reference:

(yum way)
http://fedoraguide.org/fc2/fc2beginnersguide.html#yummplayer
http://fedoraguide.org/fc2/fc2beginnersguide.html#yummplayermozilla

(rpm way)
http://fedoraguide.org/fc2/fc2beginnersguide.html#rpmmplayer
http://fedoraguide.org/fc2/fc2beginnersguide.html#rpmmplayermozilla

imdeemvp
3rd July 2004, 10:05 PM
tux2furious....thanks for posting an easier solution!

not only that it took me 2-3 mins max to install and run ogle dvd player! :eek:

wearingtux
4th July 2004, 01:33 AM
I am glad to see that this works for many of you.

I think the links that tux2furious may be better than my solution posted here, so maybe those of you who had issues with my solution should try that. My only question, tux2furios, is when were those howto's posted? If they were posted before mine, how did you find them? I ask becuase I absolutely scoured the web for a good howto. Kudos then on your googling skills. ;)

yusuf_gr8,

I will get with my colleague about Xine, but I have become a much bigger fan of MPlayer. You should also see if it may indeed be your video card or your hard drive DMA settings that causes this instability before attempting another media player. It will ba a waste of time for you to go with Xine, only to find out that it is a more general issue.

tonytiger
4th July 2004, 03:16 AM
I tried the rpm-quide link you gave tux2furious. Everything went fine until the line: rpm -ivh *.rpm. The responce I received was:
error: Failed dependencies:
libglut.so.3 is needed by xine-lib-1.0.0-0.14.rc5.1.fc2.fr

So what should I do next? Thank you.

EDIT: This post is little off topic since I tried to install Xine from the quide - it's just under ther Mplayer :)

tony

imdeemvp
4th July 2004, 07:10 AM
this is the download link for the file you need for fc2....btw try ogle all the files needed are listed there!

http://rpm.pbone.net/index.php3/stat/4/idpl/1209365/com/freeglut-2.2.0-11.i386.rpm.html

or you can do a www.google.com/linux <- search

tonytiger
4th July 2004, 07:52 AM
Thank you imdeemvp. All works fine now.

tony

tux2furious
4th July 2004, 07:54 AM
I am glad to see that this works for many of you.

I think the links that tux2furious may be better than my solution posted here, so maybe those of you who had issues with my solution should try that. My only question, tux2furios, is when were those howto's posted? If they were posted before mine, how did you find them? I ask becuase I absolutely scoured the web for a good howto. Kudos then on your googling skills. ;)

yusuf_gr8,

I will get with my colleague about Xine, but I have become a much bigger fan of MPlayer. You should also see if it may indeed be your video card or your hard drive DMA settings that causes this instability before attempting another media player. It will ba a waste of time for you to go with Xine, only to find out that it is a more general issue.

The how to is posted before 13th June 2004. I didn't find it, cause I wrote it :)

Anyway the xine is already there, for your reference:
http://fedoraguide.org/fc2/fc2beginnersguide.html#yumxine
http://fedoraguide.org/fc2/fc2beginnersguide.html#rpmxine

Me too a mplayer fan, though hope one day mplayer will have dvd menu

tux2furious
4th July 2004, 07:56 AM
I tried the rpm-quide link you gave tux2furious. Everything went fine until the line: rpm -ivh *.rpm. The responce I received was:
error: Failed dependencies:
libglut.so.3 is needed by xine-lib-1.0.0-0.14.rc5.1.fc2.fr

So what should I do next? Thank you.

EDIT: This post is little off topic since I tried to install Xine from the quide - it's just under ther Mplayer :)

tony

weird... i don't seem to have that problem? What version of fedora are you using? Did you install a full custom fedora?

by default i have freeglut-2.2.0-11 preinstalled

imdeemvp
5th July 2004, 10:33 PM
i am glad it works now! :D

imdeemvp
5th July 2004, 10:35 PM
btw....tonytiger.....back in my younger years i used to have a nick like this tonytiger6n9... :p

tonytiger
6th July 2004, 09:05 AM
If you mean full custom fedora by choosing the packages individually when running the grafical setup program then yes I did. Obviously I had no glue ... :) I'm using Fedora 2 details about the vesion I don't remember.

tony

Ug
6th July 2004, 11:35 AM
I've added an administrative health warning.