RHEL5.2上mplayer的安裝

football2006發表於2008-06-29

Mplayer的安裝
最重要的一步,先安裝compat-gcc-34,否則使用預設的gcc 4.1.2編譯,到時候會欲哭無淚,說什麼過度使用編譯器最佳化之類的警告而罷工。安裝完成確認一下:

[root@superman tmp]# rpm -aq | grep gcc
gcc-c++-4.1.2-42.el5
compat-gcc-34-g77-3.4.6-4
compat-libgcc-296-2.96-138
compat-gcc-34-3.4.6-4
libgcc-4.1.2-42.el5
gcc-4.1.2-42.el5
gcc-gfortran-4.1.2-42.el5
compat-gcc-34-c++-3.4.6-4


OK,沒有問題!
下一步,下載原始碼和相關庫、skin檔案,列表在這:

[root@]# ls
all-20071007.tar.bz2 MPlayer-1.0rc2.tar.bz2
essential-20071007.tar.bz2 standard-1.9.tar.bz2


一共下了4個包
MPlayer-1.0rc2.tar.bz2
essential-20071007.tar.bz2
Blue-1.7.tar.bz2
font-arial-iso-8859-1.tar.bz2

分清楚all-20071007.tar.bz2和essential-20071007.tar.bz2這兩個檔案中所帶的解碼器有何不同,先安裝解碼器

[root@superman tmp]#tar -jxvf all-20071007.tar.bz2
[root@superman tmp]#mv all-20071007 /usr/lib/win32
[root@superman tmp]# chmod 755 /usr/lib/win32/*
[root@superman tmp]# tar -jxvf essential-20071007.tar.bz2
[root@superman tmp]# mv essential-20071007 /usr/lib/codecs
[root@superman tmp]# chmod 755 /usr/lib/codecs/*


進入config、make、make install 三步走:
先檢視一下配置說明,很重要的


[root@superman MPlayer-1.0rc2]# ./configure --help
Usage: ./configure [OPTIONS]...

Configuration:
-h, --help display this help and exit

Installation directories:
--prefix=DIR prefix directory for installation [/usr/local]
--bindir=DIR directory for installing binaries [PREFIX/bin]
--datadir=DIR directory for installing machine independent
data files (skins, etc) [PREFIX/share/mplayer]
--mandir=DIR directory for installing man pages [PREFIX/share/man]
--confdir=DIR directory for installing configuration files
[PREFIX/etc/mplayer]
--libdir=DIR directory for object code libraries [PREFIX/lib]
--codecsdir=DIR directory for binary codecs [LIBDIR/codecs]
--win32codecsdir=DIR directory for Windows DLLs [LIBDIR/codecs]
--xanimcodecsdir=DIR directory for XAnim codecs [LIBDIR/codecs]
--realcodecsdir=DIR directory for RealPlayer codecs [LIBDIR/codecs]

Optional features:
--disable-mencoder disable MEncoder (A/V encoder) compilation [enable]
--disable-mplayer disable MPlayer compilation [enable]
--enable-gui enable GMPlayer compilation (GTK+ GUI) [disable]
--enable-gtk1 force using GTK 1.2 for the GUI [disable]
--enable-largefiles enable support for files > 2GB [disable]
--enable-linux-devfs set default devices to devfs [disable]
--enable-termcap use termcap database for key codes [autodetect]
--enable-termios use termios database for key codes [autodetect]
--disable-iconv disable iconv for encoding conversion [autodetect]
--disable-langinfo do not use langinfo [autodetect]
--enable-lirc enable LIRC (remote control) support [autodetect]
--enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
--enable-joystick enable joystick support [disable]
--enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
--disable-vm disable X video mode extensions [autodetect]
--disable-xf86keysym disable support for multimedia keys [autodetect]
--enable-radio enable radio interface [disable]
--enable-radio-capture enable radio capture (through PCI/line-in) [disable]
--disable-radio-v4l2 disable Video4Linux2 radio interface [autodetect]
--disable-radio-bsdbt848 disable BSD BT848 radio interface [autodetect]
--disable-tv disable TV interface (TV/DVB grabbers) [enable]
--disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
--disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
--disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
--disable-tv-teletext disable TV teletext interface


有了上面這個,一目瞭然!

[root@superman MPlayer-1.0rc2]# ./configure --codecsdir=/usr/lib/codecs/ --win32codecsdir=/usr/lib/win32/ --enable-gui --enable-largefiles --cc=/usr/bin/gcc34 --language=zh_CN
[root@superman MPlayer-1.0rc2]# make

[root@superman MPlayer-1.0rc2]# make install


安裝skin

[root@superman tmp]# tar -jxvf standard-1.9.tar.bz2
[root@superman tmp]# mv standard /usr/local/share/mplayer/skins/default

大功告成!再慢慢微調吧!

順便把flash的外掛也安上 (這一步可以不管)

[root@superman tmp]# tar -xvf install_flash_player_9_linux.tar.gz
[root@superman tmp]# cp ./install_flash_player_9_linux/libflashplayer.so /usr/lib/firefox/
plugins/

有可能出現的問題New_Face failed.Maybe the font path is wrong.
Please supply the text font file(~/.mplayer/subfont.ttf).

解決方法是
cd /usr/share/fonts/chinese/TrueType/
cp ukai.ttf ~/.mplayer/subfont.ttf
或者下載一個字型(font-arial-iso-8859-1.tar.bz2),解壓後,cp到
/usr/local/share/mplayer/font目錄下即可。

MPlayer用法:

用法: mplayer [options] [url|path/]filename 基本選項: (包括所有選項的詳細列表參見manpage!) -vo

例如以下命令播放~movies/hyj.rmvb檔案:

/opt/feiy/player/MPlayer1.0/bin$mplayer ~movies/hyj.rmvb

安裝mplayplugins外掛需要下載的檔案:
1、
2、
3、

[root@superman mplayerplug-in]# tar -xzvf mplayerplug-in-3.50.tar.gz
[root@superman mplayerplug-in]# cd mplayerplug-in
[root@superman mplayerplug-in]# tar -jzvf gecko-sdk-i686-pc-linux-gnu-1.8.0.4.tar.bz2
[root@superman mplayerplug-in]# ./configure --with-gecko-sdk=../gecko-sdk
[root@superman mplayerplug-in]# make
[root@superman mplayerplug-in]# cp mplayerplug-in.so /usr/lib/firefox/plugins/
[root@superman mplayerplug-in]# cp mplayerplug-in.xpt /usr/lib/firefox/components/

成功![@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8119050/viewspace-1006219/,如需轉載,請註明出處,否則將追究法律責任。

相關文章