sudo apt-get install mplayer-fonts mplayer mplayer-skins mozilla-mplayer wqtLinux联盟
linux 下mplayer 中文字幕配置 wqtLinux联盟
修改 ~/.mplayer/config wqtLinux联盟
# Write your default config options here! wqtLinux联盟
# 视频输出以xv模式,启用视频加速 wqtLinux联盟
vo=xv wqtLinux联盟
# 字幕字体文件 wqtLinux联盟
font = /usr/share/fonts/zh_CN/TrueType/hei.ttf wqtLinux联盟
# 字幕编码 (使用TTF字体时使用) wqtLinux联盟
subcp = cp936 wqtLinux联盟
# 0 不自动缩放; 1 按电影高度缩放; 2 按宽度; 3 按对角线 wqtLinux联盟
subfont-autoscale = 2 wqtLinux联盟
# 字幕字体大小 wqtLinux联盟
subfont-text-scale = 4 wqtLinux联盟
# 设置OSD元素的自动绽放系数 wqtLinux联盟
subfont-osd-scale = 6 wqtLinux联盟
font=/home/simsun.ttf wqtLinux联盟
subcp=cp936 wqtLinux联盟
subfont-autoscale=1 #这是控制自动装载字幕的,2和0都是不自动 wqtLinux联盟
subfont-text-scale=7#字体大小 wqtLinux联盟
有时侯用命令行的没有字幕,可以试一试快捷键“v”,和 “b” wqtLinux联盟
用命令行时字符集别用unicode,用gb2312或者cp936都行 wqtLinux联盟
gui模式出现modoul 11 error,不知道原因。重新编译中 wqtLinux联盟
下面这篇文章是参考: wqtLinux联盟
让mplayer支持中文字幕的解决方案 wqtLinux联盟
apt-get install mplayer后,播放一些带中文字幕的电影老显示不了中文字,会出现诸如:“___Ants,_____”的玩意,看了不少文档,终于搞定,下面总结一番 wqtLinux联盟
A~命令行方式播放: wqtLinux联盟
这是我的~/.mplayer/config wqtLinux联盟
# Write your default config options here! wqtLinux联盟
font=/usr/share/fonts/truetype/hiweed/simsun.ttf wqtLinux联盟
subcp=cp936 wqtLinux联盟
subfont-autoscale=2 wqtLinux联盟
subfont-text-scale=5 wqtLinux联盟
vo=xv wqtLinux联盟
然后,命令行输入mplayer aaa.avi,(前提是同目录下有同名字幕文件)。就OK了。 wqtLinux联盟
B~至于窗口模式,我采用以下方法也解决: wqtLinux联盟
1.rm -rf /usr/share/mplayer/font/* wqtLinux联盟
2.rm -rf ~/.mplayer/font/* wqtLinux联盟
上面两步让gmplayer找不到那些英文字体,呵呵,就让它乖乖地用我们指定的字体: wqtLinux联盟
3.ln -s /YOUR/PATH/TO/CHINESEFONT.ttf subfont.ttf wqtLinux联盟
4.修改~/.mplayer/gui.conf如下项目: wqtLinux联盟
sub_auto_load = "yes" wqtLinux联盟
sub_unicode = "yes" wqtLinux联盟
sub_pos = "100" wqtLinux联盟
sub_overlap = "no" wqtLinux联盟
sub_cp = "cp936" wqtLinux联盟
font_factor = "0.750000" wqtLinux联盟
font_name = "/home/badants/.mplayer/subfont.ttf" wqtLinux联盟
font_encoding = "unicode" wqtLinux联盟
然后,打开gmplayer,试试看,能不能成功。 wqtLinux联盟