Advertisement

MPlayer 编译安装指南 (Fedora)

阅读量:

mplayer 是 Linux 下功能超强的电影播放器,几乎可以播放所有的视频音频文件 (至少到现在为止我没有遇到播放不了的:-)) 。

---------------------------------------------------------------------------

MPlayer-1.0pre7 编译安装指南 (在 Fedora Core 4 下通过)

1、下载安装所需文件:

(1)主程序:
http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0pre7.tar.bz2
(2)字体文件:
http://www1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
(3)Skin文件 (支持GUI,当然也可以下载其他皮肤文件) :
http://www1.mplayerhq.hu/MPlayer/Skin/plastic-1.2.tar.bz2
(4)支持avi等w32多媒体格式插件:
http://www1.mplayerhq.hu/MPlayer/releases/codecs/win32codecs-20040703.tar.bz2
(5) 支持realplay(rm,ram等)等多媒体格式插件:
http://www1.mplayerhq.hu/MPlayer/releases/codecs/essential-20050412.tar.bz2

嫌上面的网站下载的慢的话,可以自己到天网 (http://e.pku.edu.cn/) 搜索下载。
如果只是在控制台 (文本) 下运行,只用下载(1)(4)(5),如果想要图形界面并支持中文,以上 5 个都要下载。

2、把以上 5 个文件拷入主目录下 (当然,其他目录也可以 :) ) ,解压:

[root@localhost ~]# tar -jxvf MPlayer-1.0pre7.tar.bz2
[root@localhost ~]# tar -jxvf font-arial-iso-8859-1.tar.bz2
[root@localhost ~]# tar -jxvf plastic-1.2.tar.bz2
[root@localhost ~]# tar -jxvf win32codecs-20040703.tar.bz2
[root@localhost ~]# tar -jxvf essential-20050412.tar.bz2

3、拷贝 w32codec 支持库 (win32codecs-20040703) 及 realplay 支持库(essential-20050412)

一定要先执行这一步,而且拷入的目录一定要注意,如果你已安装了 realplay8 或 realplay9 也可不需拷入 realplay 的支持库,只是下面运行 configure 时要注意它所在的目录。
[root@localhost ~]# mv win32codecs-20040703 /usr/lib/win32
[root@localhost ~]# mv essential-20050412 /usr/lib/

4、进入 Mplayer-1.0pre7 目录并执行,注意参数:

[root@localhost ~]# cd MPlayer-1.0pre7
[root@localhost MPlayer-1.0pre7]# ./configure --enable-gui --cc=gcc32 --with-reallibdir=/usr/lib/essential-20050412 --language=zh_CN
(如果系统没有 gcc3.2 的话可以改用 --disable-gcc-checking 参数,但不建议这么做)

说明:--enable-gui 是用来支持图形界面的播入器,--cc=gcc32 是使用 3.2 版本的 gcc 进行编译,--with-reallibdir=/usr/lib/essential-20050412 是用来指定 realplay 支持库所在的目录。如果你已安装了 realplay 8 那这个选项应该为:--with-reallibdir=/usr/lib/RealPlay8/codecs 如果你已安装了 realplay 9 (你可根据实际修改):--with-reallibdir=/root/Real/codecs, --language=zh_CN 是用来指定 Mplayer 的字体为中文。1.0 版本已经支持 rtsp 流,所以不用 --enable-live。

5、依次执行:
[root@localhost MPlayer-1.0pre7]# make
[root@localhost MPlayer-1.0pre7]# make install

6、拷入字体:
[root@localhost MPlayer-1.0pre7]# mv font-arial-iso-8859-1/font-arial-14-iso-8859-1/* /usr/local/share/mplayer/font/

7、拷入Skin:
[root@localhost MPlayer-1.0pre7]# mv plastic /usr/local/share/mplayer/Skin/default

注意Skin的首字母要大写

8、拷入input.conf文件:
[root@localhost MPlayer-1.0pre7]# cp MPlayer-1.0pre7/etc/input.conf /usr/local/share/mplayer/

9、在 X 下运行 gmplayer 可启动图形界面播入模式,控制台下运行 mplayer 可以启动字符播放模式。 (我的文本模式可以,但图形界面不成功-_-)

安装脚本:
---------- begin, this row not inclued ----------
#!/bin/sh

Decompress.

if [ ! -e MPlayer-1.0pre7 ]; then
tar -jxf MPlayer-1.0pre7.tar.bz2
fi
if [ ! -e win32codecs-20040703 ]; then
tar -jxf win32codecs-20040703.tar.bz2
fi
if [ ! -e essential-20050412 ]; then
tar -jxf essential-20050412.tar.bz2
fi
if [ ! -e font-arial-iso-8859-1 ]; then
tar -jxf font-arial-iso-8859-1.tar.bz2
fi
if [ ! -e plastic ]; then
tar -jxf plastic-1.2.tar.bz2
fi

Configure, make and install.

cd MPlayer-1.0pre7
if [ ./configure --enable-gui --cc=gcc32 --with-reallibdir=/usr/lib/essential-20050412 --language=zh_CN ]; then
make && make install
cd ..
else
exit
fi

Copy codecs, fonts, skins and default configuration.

cp -r win32codecs-20040703 /usr/lib/win32
cp -r essential-20050412 /usr/lib/
cp -r font-arial-iso-8859-1/font-arial-14-iso-8859-1/* /usr/local/share/mplayer/font/
cp -r plastic /usr/local/share/mplayer/Skin/default
cp MPlayer-1.0pre7/etc/input.conf /usr/local/share/mplayer/

Do some clearance.

rm -rf MPlayer-1.0pre7
rm -rf win32codecs-20040703
rm -rf essential-20050412
rm -rf font-arial-iso-8859-1
rm -rf plastic
---------- end, this row not inclued ----------

---------------------------------------------------------------------------

mplayer-1.0-rc1 编译安装指南 (在 Fedora 7 下通过)

所需文件:(由于 rc1 带图形界面支持编译时有问题,因此这里是无图形界面支持的安装,字体和皮肤包也就不需要了)
mplayer-1.0-rc1svn20070618.orig.tar.gz
windows-all-20060611.zip
rp9codecs-20050115.tar.bz2

安装脚本:
---------- begin, this row not inclued ----------
#!/bin/sh

Since there is something wrong with the compilation with gui support, we

don't need to include the skins and fonts here. Just comment them.

Decompress.

if [ ! -e mplayer-1.0-rc1svn20070618 ]; then
tar -jxf mplayer-1.0-rc1svn20070618.orig.tar.gz
fi
if [ ! -e win32codecs-20040703 ]; then
tar -jxf win32codecs-20040703.tar.bz2
fi
if [ ! -e rp9codecs-20050115 ]; then
tar -jxf rp9codecs-20050115.tar.bz2
fi
#if [ ! -e font-arial-iso-8859-1 ]; then

tar -jxf font-arial-iso-8859-1.tar.bz2

#fi
#if [ ! -e plastic ]; then

tar -jxf plastic-1.2.tar.bz2

#fi

Configure, make and install.

cd mplayer-1.0-rc1svn20070618
if [ ./configure --realcodecsdir=/usr/lib/rp9codecs-20050115 --language=zh_CN ]; then
make && make install
cd ..
else
exit
fi

Copy codecs, fonts, skins and default configuration.

cp -r win32codecs-20040703 /usr/lib/win32
cp -r rp9codecs-20050115 /usr/lib/
#cp -r font-arial-iso-8859-1/font-arial-14-iso-8859-1/* /usr/local/share/mplayer/font/
#cp -r plastic /usr/local/share/mplayer/Skin/default
cp mplayer-1.0-rc1svn20070618/etc/input.conf /usr/local/share/mplayer/

Do some clearance.

rm -rf MPlayer-1.0pre7
rm -rf win32codecs-20040703
rm -rf rp9codecs-20050115
#rm -rf font-arial-iso-8859-1
#rm -rf plastic
---------- end, this row not inclued ----------

---------------------------------------------------------------------------

网上参考文档:
1.http://jiangli1984.blogchina.com/3811048.html (本文基本上是在该文的基础上改的)
2.http://mp.dev.hu/DOCS/HTML/zh/documentation.html (MPlayer 的详细中文文档)
3.http://www.mplayerhq.hu/homepage/design7/dload.html (MPlayer 主页的下载页面,提供许多编码包、字体及皮肤下载)

全部评论 (0)

还没有任何评论哟~