Mplayer的安装、字幕等相关问题

安装:

1. Tarball安装:

1.1 先把解码器放下列文件夹:
/usr/local/lib/codes
/usr/local/lib/wincodecs    (all-20061022.tar.bz2)
/usr/local/lib/rp9codecs    (rp9codecs-20050115.tar.bz2)

1.2 # ./configure --prefix=/usr/local/mplayer --enable-gui --enable-freetype --with-codecsdir=/usr/local/lib/codes --with-win32libdir=/usr/local/lib/wincodecs --with-reallibdir=/usr/local/lib/rp9codecs --cc=gcc32


2. yum安装:

2.1 yum install mplayer

2.2 RPM解码器:
mplayer-codecs-20061022-1.i386.rpm
mplayer-codecs-extra-20061022-1.i386.rpm
mplayer-codecs-win32-20040704-1.i386.rpm
mplayer-codecs-win32-qt-6.0-1.i386.rpm



---------------------------
文档:
mplayer的文档很详细而且有中文:MPlayer-1.0pre2/DOCS/zh/documentation.html#subtitles_osd 或 man /usr/share/man/zh_CN/man1/mplayer.1.gz



---------------------------
如何配置支持中文字幕:

mplayer支持两种osd的字体:一种是的arialXXX的包的格式,一种是ttf。如果你在编译时有freetype2(--enable-freetype)支持,就可以使用ttf。你可以在~/.mplayer/config文件中指定ttf的文件名。

版本:mplayer-1.0-0.91.20080531svn.lvn8

已经编译好TrueType支持:

1. 系统先安装中文字体

2. 通过gmplayer(MPlayer GUI)的图形化配置对话框更改:
"Subtitles & OSD > Encoding" 为 "cp936" 并勾上 "Unicode subtitle"
"Font -> Encoding" 为 "unicode",Font 填入 SimSun 或 /usr/share/fonts/zh_CN/TrueType/simsun.ttc

*检查/etc/mplayer/mplayer.conf,若fontconfig = yes,则Font填 SimSun,否则填入字体文件完整路径 /usr/share/fonts/zh_CN/TrueType/simsun.ttc。

也可以手工编辑它的配置文件 (注意:gmplayer的配置文件是$HOME/.mplayer/gui.conf,而mplayer的配置文件是$HOME/.mplayer/config)。

   ## 使用fontconfig
   fontconfig = yes
   font = "SimSun"
  
   或者
   ## 不使用fontconfig
   fontconfig = no
   font = "/usr/share/fonts/zh_CN/TrueType/simsun.ttc"


   然后在加上:
   subcp=cp936
   zoom=yes
   unicode=yes
   subfont-encoding=unicode



---------------------------
遇到过的问题:

Q: 出错信息 Mplayer - alsa-control:unable to find simple control 'PCM',0

A: enabling "Enable Software Mixer" under the audio tab in Mplayer preferences.


Q:New_Face Failed.Maybe the font pass is wrong.
Please supply the text font file(~/.mplayer/subfont.ttf).
这是出错信息,不过 mplayer 可以正常使用

A:随便把一个字体(最好是中文字体)复制或链接到~/.mplayer下,并改名为subfont.ttf就可以了.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值