wearingtux
2004-05-30, 12:42 PM CDT
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.
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.