RHEL5.2上mplayer的安装

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、http://nchc.dl.sourceforge.net/sourceforge/mplayerplug-in/mplayerplug-in-3.50.tar.gz
2、http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.0.4/sdk/gecko-sdk-i686-pc-linux-gnu-1.8.0.4.tar.bz2
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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/8119050/viewspace-1006219/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值