Red Hat Linux9.0下的MPlayer媒体播放器

要播放视频和音频必须安装相应的编码器,解压才能播放视频和音频。

Red Hat Linux 下安装播放器是怎么样的呢??

一、Red Hat Linux 9.0系统内核版本

二、所需的源码包

( 下载的相关包

下载所需的源码包:

一:主应用程序包:在旧版本入口点击,然后选择下载 Mplayer-1.0rc2.tar.bz2

下载二进制 编解码器包 之二: essential-20071007.tar.bz2

win32_codes_all 二进制编解码器包之三:windows-essential-20071007.zip

播放器皮肤源码包四:standard-1.9.tar.bz2,把standard(皮肤),把它设置成默认皮肤,可以添加其他的皮肤。

字体安装包五:gb2312-ming.tar.bz2

[root@localhost root]# cp /mnt/hgfs/linux/MPlayer-1.0rc2.tar.bz2 ./

[root@localhost root]# cp /mnt/hgfs/linux/essential-20071007.tar.bz2 ./

[root@localhost root]# cp /mnt/hgfs/linux/windows-essential-20071007.zip ./

[root@localhost root]# cp /mnt/hgfs/linux/standard-1.9.tar.bz2 ./

[root@localhost root]# cp /mnt/hgfs/linux/gb2312-ming.tar.bz2 ./

 ( 安装MPlayer

1. 安装主程序

[root@localhost root]# tar -xjvf MPlayer-1.0rc2.tar.bz2

[root@localhost root]# cd MPlayer-1.0rc2

[root@localhost MPlayer-1.0rc2]# ./configure --prefix=/usr/local/mplayer/ --enable-gui --enable-freetype --codecsdir=/usr/lib/codecs/ --win32codecsdir=/usr/lib/wincodecs/ --language=zh_CN

[root@localhost MPlayer-1.0rc2]# make

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

说明:
   --prefix=/usr/local/mplayer 
是安装路径
   --enable-gui 
安装图形界面
   --enable-freetype 
校正字体
   --codecsdir=/usr/lib/codecs 
指定编码位置
   --win32codecsdir=/usr/lib/wincodecs 
指定编码位置
   --language=zh_CN 
中文界面

( )安装codec

[root@localhost root]# tar -xjvf essential-20071007.tar.bz2

[root@localhost root]# mv essential-20071007 /usr/lib/codecs

[root@localhost root]# unzip windows-essential-20071007.zip

[root@localhost root]# mv windows-essential-20071007 /usr/lib/wincodecs

( 安装字体、皮肤等用于美化界面

安装字体:

[root@localhost root]# mkdir /usr/local/mplayer/share/mplayer/font/

[root@localhost root]# tar -xjvf gb2312-ming.tar.bz2

[root@localhost root]# cd gb2312-ming/gbsn00lp16/

[root@localhost gbsn00lp16]# cp * /usr/local/mplayer/share/mplayer/font/

安装皮肤:

[root@localhost root]# tar -xjvf standard-1.9.tar.bz2

[root@localhost root]# mv standard /usr/local/mplayer/share/mplayer/skins/default

 

( )桌面启动/创建启动器

名称: MPlayer

命令:  /usr/local/mplayer/bin/gmplayer

然后选择一个你喜欢的图标.

也可以在终端用/usr/local/mplayer/bin/gmplayer 启动.

 (故障分析及其解决

安装MPlayer,执行make是出现下面的错误:

In file included from /usr/include/netdb.h:28,

                 from network.h:16,

                 from stream.h:65,

                 from stream_dvd.c:32:

/usr/include/netinet/in.h:259: parse error before '(' token

/usr/include/netinet/in.h:259: parse error before "__u32"

/usr/include/netinet/in.h:260: parse error before '(' token

/usr/include/netinet/in.h:260: parse error before "__u16"

/usr/include/netinet/in.h:262: parse error before '(' token

/usr/include/netinet/in.h:262: parse error before "__u32"

/usr/include/netinet/in.h:264: parse error before '(' token

/usr/include/netinet/in.h:264: parse error before "__u16"

stream_dvd.c: In function `dvd_parse_chapter_range':

stream_dvd.c:168: warning: passing arg 2 of `strtol' from incompatible pointer type

make[1]: *** [stream_dvd.o] Error 1

make[1]: Leaving directory `/root/MPlayer-1.0rc2/stream'

make: *** [stream/stream.a] Error 2

编辑/usr/include/netinet/in.h文件

[root@localhost MPlayer-1.0rc2]# vi /usr/include/netinet/in.h

__BEGIN_DECLS下面添加如下代码:                                                                            

#undef ntohl

#undef ntohs

#undef htonl

#undef htons

执行make clean,再执行make,就可以了

二:解决字体问题

[GUI]  导入字幕: /mnt/hgfs/linux/91.wmv7%

SUB: Detected subtitle file format: rt

SUB: Read 0 subtitles.

不能加载字幕: /mnt/hgfs/linux/91.wmv

1:  打开字体文件

[root@bogon TrueType]#cd /usr/share/fonts/zh_CN/TrueType

[root@bogon TrueType]# pwd

/usr/share/fonts/zh_CN/TrueType

fonts.cache-1  fonts.dir  fonts.scale  gbsn00lp.ttf  gkai00mp.ttf  zysong.ttf

2:  打开主目录下的隐藏目录

[root@bogon root]# cd .mplayer/

[root@bogon .mplayer]# pwd

/root/.mplayer

config  gui.conf  gui.history  gui.pl  gui.url

3:  将任意一种字体cp./mplayer目录下即可

[root@bogon .mplayer]# cp /usr/share/fonts/zh_CN/TrueType/gbsn00lp.ttf ./subfont.ttf ( 改成这样的字体文件)

三.打开/初始化(ro)所选的视频输出设备出错

修复:左健点击播放器左下方板手形状的按钮,进入首选项对话框:
将可用驱动:
xv             X11/V
x11            X11(XImage/Shm)
默认是选择第一项,修改为选择第二项就可以了,即红色的一行。
点击超酷看,成功进入播放画面,见默认播放画面截图。
注意:在选择播放文件时候,要选择All file.
五。:上述显示还未能全屏播放电影。只需做个小小的改动就可以全屏看电影了。
如下:
   vi ~./mplayer/config
   zoom=yes
加上这一行即可。









本文转自 chen138 51CTO博客,原文链接:http://blog.51cto.com/chenboqiang/484936,如需转载请自行联系原作者
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值