分类: 技术文章 |
MPlayer is a movie player which runs on many systems (see the documentation). It plays most MPEG/VOB, AVI, Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT, NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files, supported by many native, XAnim, and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, 3ivx, DivX 3/4/5 and even WMV movies..
Another great feature of MPlayer is the wide range of supported output drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, AAlib, DirectFB, but you can use GGI, SDL (and this way all their drivers), VESA (on every VESA compatible card, even without X11!) and some low level card-specific drivers (for Matrox, 3Dfx and ATI), too! Most of them support software or hardware scaling, so you can enjoy movies in fullscreen. MPlayer supports displaying through some hardware MPEG decoder boards, such as the Siemens DVB, DXR2 and DXR3/Hollywood+.
MPlayer has an onscreen display (OSD) for status information, nice big antialiased shaded subtitles and visual feedback for keyboard controls. European/ISO 8859-1,2 (Hungarian, English, Czech, etc), Cyrillic and Korean fonts are supported along with 12 subtitle formats (MicroDVD, SubRip, OGM, SubViewer, Sami, VPlayer, RT, SSA, AQTitle, JACOsub, PJS and our own: MPsub). DVD subtitles (SPU streams, VOBsub and Closed Captions) are supported as well.
过去我安装mplayer都是用yum install的方式安装,虽然简洁,快速,但是得到的程序不是最优化的,官方也建议使用源码的方式安装,所以这次趁着重做系统的机会就实践了一下,还别说,源码编译后得到的程序确实比过去的稳定性和性能都好的多,本着好东西大家分享的原则,特把本人编译的过程记录如下:
一。mplayer的下载:
安装mplayer需要下载它的source and binaries、codes、fonts、skins,网址如下:
http://www.mplayerhq.hu/design7/dload.html
我不习惯使用D4X下载,虽然它支持多个线程,大多数情况我都用wget,wget支持多种协议,本身有很多优良特性,它的下载成功率是无可比拟的,呵呵,跑题了,具体用什么软体下载就看你的个人喜好了。
最后下载完毕后,得到的应该是如下软体:
source and binaries:MPlayer-1.0pre8.tar.bz2
Codecs:essential-20060611.tar.bz2
Fontsfont-arial-iso-8859-1.tar.bz2
Skins:随意选择一个,例如:handheld-1.0.tar.bz2
二。安装vmplayer:
现在mplayer的最新版本是MPlayer 1.0pre8,安装方式也有了变动,所以如果你编译过mplayer的早期版本,那么应该注意一下它的编码安装目录和skins的安装目录都又变动,请不要生搬硬套。
1.source and binaries的编译:
首先,应该建立codes的目录,把codes解压缩到目录中,因为在编译过程中,程序要检测codes是否安装,
命令顺序如下:
mkdir /usr/local/lib/codecs/
tar -jxvf essential-20060611.tar.bz2 /usr/local/lib/codecs/
tar -jxvf MPlayer-1.0pre8.tar.bz2
cd MPlayer-1.0pre8
./configure --enable-gui
make
make install
注意:一定要用root权限!
2.安装fonts:
解压缩skins文件,然后copy到/usr/local/share/mplayer/font/目录下或者copy到~/.mplayer/subfont.ttf.
3.安装GUI界面:
解压缩handheld-1.0.tar.bz2软体,然后把它放到/usr/local/share/mplayer/skins/default/目录下,命令如下:
tar -jxvf handheld-1.0.tar.bz2
default目录原来不存在,应该先创建它。
mkdir /usr/local/share/mplaye/skins/default
mv handheld/* /usr/local/share/mplayer/skins/default/
4.let's player!
现在你可以使用mplayer播放视频了,你可以选择在字符界面下播放,还是在GUI界面下播放。
如果你用字符界面,那么格式如下:
mplayer <moviefile>
如果你是用GUI,那么格式如下:
gmplayer <moviefile>
到这为止,你的mplayer应该能够正常使用了,如果你认为它的字体不好看,或者skins不够漂亮,那么你可以到它的官方站点下载字体和皮肤,安装方法参考上面。
研究了半天才把mplayer搞定,其实原本不应该走那么多弯路的,原因就是太浮躁,不能耐心看它的readme文档,呵呵,当我没耐心的时候,我会深深的吸口气,问自己:你浮躁了么?有点耐心好么!
开源传万世,因有我参与!!!!
附:硬件配置表
CPU:p4 1.8 GMHZ
内存:512M
硬盘:80G
主板:A-open AX4B-G2
显卡:ATI 32M
显示器:A-Open A75PF
os:winxp+fedora core 4