当前位置:操作系统 > Unix/Linux >>

SuSE10安装Mplayer

近几天来访问此篇文章的多数是要解决Mplayer编译时gcc4版本的问题,其实只需要下载CVS版本安装就不存在这个问题了。打patch的只限于MPlayer v1.0pre7的版本。大家大可不必如此费神。


0. 首先需要安装两个开发包:gtk-1.2.10-888和glib-devel-1.2.10-595

1. 预备工作
到http://www.mplayerhq.hu/design7/dload.html下载以下安装文件:
主程序:MPlayer v1.0pre7try2 源码
解码器:all-20050412.tar.bz2
字体:font-arial-cp1250.tar.bz2,font-arial-iso-8859-1.tar.bz2,font-arial-iso-8859-2.tar.bz2,font-arial-iso-8859-7.tar.bz2
皮肤:PowerPlayer-1.1.tar.bz2(以此为例)
到http://www.chinalinuxpub.com/bbs/attachment.php?attachmentid=4380下载mplayer-1.0_pre7-gcc4-fix.patch.zip
因为suse10上的gcc版本太高,所以必须要给mplayer打补丁才能安装。

2. 安装解码器
huang:/software/mplayer # tar xvf all-20050412.tar.bz2
huang:/software/mplayer # mv all-20050412/ /usr/local/lib/codecs
huang:/software/mplayer # ln -s /usr/local/lib/codecs /usr/lib/win32

3. 安装主程序
huang:/software/mplayer # tar xvf MPlayer-1.0pre7try2
打补丁,只有 gcc-4.0 的时候才需要打补丁。
huang:/software/mplayer # unzip mplayer-1.0_pre7-gcc4-fix.patch.zip
huang:/software/mplayer # cd MPlayer-1.0pre7try2/
huang:/software/mplayer/MPlayer-1.0pre7try2 # patch -p1 < ../mplayer-1.0_pre7-gcc4-fix.patch

为了是mplayer的GUI支持UTF8中文,需要改变一个文件的编码

huang:/software/mplayer/MPlayer-1.0pre7try2 # cd help/
huang:/software/mplayer/MPlayer-1.0pre7try2/help # mv help_mp-zh_CN.h help_mp-zh_CN.h.bak
huang:/software/mplayer/MPlayer-1.0pre7try2/help # iconv -f GB2312 -t UTF-8 help_mp-zh_CN.h.bak -o help_mp-zh_CN.h

配置
huang:/software/mplayer/MPlayer-1.0pre7try2 # ./configure --enable-gui --language=zh_CN --prefix=/usr/local/mplayer/
huang:/software/mplayer/MPlayer-1.0pre7try2 # make
huang:/software/mplayer/MPlayer-1.0pre7try2 # make install

4. 安装字体
huang:/software/mplayer/MPlayer-1.0pre7try2 # cd ..
huang:/software/mplayer # tar xvf font-arial-cp1250.tar.bz2
huang:/software/mplayer # tar xvf font-arial-iso-8859-1.tar.bz2
huang:/software/mplayer # tar xvf font-arial-iso-8859-2.tar.bz2
huang:/software/mplayer # tar xvf font-arial-iso-8859-7.tar.bz2

huang:/software/mplayer # mv font-arial-cp1250/ /usr/local/mplayer/share/mplayer/font/
huang:/software/mplayer # mv font-arial-iso-8859-1/ /usr/local/mplayer/share/mplayer/font/
huang:/software/mplayer # mv font-arial-iso-8859-2/ /usr/local/mplayer/share/mplayer/font/
huang:/software/mplayer # mv font-arial-iso-8859-7/ /usr/local/mplayer/share/mplayer/font/

5. 安装皮肤
huang:/software/mplayer # tar xvf PowerPlayer-1.1.tar.bz2
huang:/software/mplayer # mv PowerPlayer default
huang:/software/mplayer # mv default/ /usr/local/mplayer/share/mplayer/Skin/

最后,字幕字体
找一个ttf字体文件,放到~/.mplayer/下面,并改名为subfont.ttf即可。


huang:/software/mplayer # ln -s /usr/local/mplayer/bin/mplayer /usr/local/bin/mplayer
huang:/software/mplayer # ln -s /usr/local/mplayer/bin/mplayer /usr/local/bin/gmplayer

使用gui则用gmplayer启动,否则使用mplayer即可
启动选项,-sub 跟字幕文件 -subcp cp936,也可以 -font 跟字体文件改变字幕字体。

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,