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,如需转载请自行联系原作者
目录
相关文章
|
2月前
|
Shell Linux C语言
【Shell 命令集合 磁盘管理 】Linux 控制光驱或可移动媒体设备的弹出和关闭操作 eject命令使用教程
【Shell 命令集合 磁盘管理 】Linux 控制光驱或可移动媒体设备的弹出和关闭操作 eject命令使用教程
40 1
|
2月前
|
安全 Linux 网络安全
如何在 VM 虚拟机中安装 Red Hat Enterprise Linux 9.3 操作系统保姆级教程(附链接)
如何在 VM 虚拟机中安装 Red Hat Enterprise Linux 9.3 操作系统保姆级教程(附链接)
|
1月前
|
Linux 网络安全
linux免密登录报错 Bad owner or permissions on /etc/ssh/ssh_config.d/05-redhat.conf
linux免密登录报错 Bad owner or permissions on /etc/ssh/ssh_config.d/05-redhat.conf
34 1
|
8月前
|
Linux 网络安全 Windows
linux/redhat系-006基础命令,包管理,
全程以企业正式的服务器为标准使用
68 0
|
架构师 中间件 Linux
Red Hat Enterprise Linux 8/7/6/5/4 合集下载地址
Red Hat Enterprise Linux 8/7/6/5/4 合集下载地址
|
存储 缓存 Linux
Linux RedHat7.4更换阿里云yum源(RHEL7.4)
Linux RedHat7.4更换阿里云yum源(RHEL7.4)
2401 0
|
3天前
|
存储 Linux
Redhat Enterprise Linux磁带机简单操作
Redhat Enterprise Linux磁带机简单操作
|
7月前
|
网络协议 关系型数据库 MySQL
Red Hat enterprise linux 5 -mysql安装步骤
Red Hat enterprise linux 5 -mysql安装步骤
|
8月前
|
编解码 Java Linux
linux【redhat&ubuntu】下ffmpeg-3.1安装编译及视频转码
这篇是几年前整理的老文章了,当时在调研流视频推送及播放相关技术,并在项目中应用,使用到ffmpeg,所以整理了这篇文章,但并未发布。最近又有相关的技术需求,所以整理出来,作为一个新的开始。
176 0
|
9月前
|
关系型数据库 Linux 数据库
百度搜索:蓝易云【Redhat Linux9上安装DB2【详解】】
注意事项: - 安装过程中需要注意所选的软件包版本和系统依赖。 - 在创建 DB2 用户和组时,可以使用自己的用户名和组名,但需要与后续操作一致。 - 在配置环境变量时,需要注意所填写的路径是否正确,否则会导致启动 DB2 失败。 - 在启动 DB2 时,需要以 DB2 用户身份进行操作,否则会提示权限不足。
75 0