LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2007|回复: 7

MPlayer 中文字幕

[复制链接]
发表于 2003-12-13 22:42:21 | 显示全部楼层 |阅读模式
MPlayer 1.0pre3. 自己编译的。装了freetype2.1.7.
用MPlayer放电影时用-font SimSun但中文字幕都是乱码。加了-subfont-encoding GBK/GB2312 也没用。

$ fc-list | grep -i sim
NSimSun:style=Regular
SimSun:style=Regular

:help
发表于 2003-12-14 00:43:13 | 显示全部楼层
顺便问一下。 Mplayer 是不是无法加载 .idx .sub 格式的目录?
发表于 2003-12-14 09:33:02 | 显示全部楼层
最初由 greenforce 发表
顺便问一下。 Mplayer 是不是无法加载 .idx .sub 格式的目录?
mplayr从来就没有不支持这种格式的字幕过
发表于 2003-12-14 10:30:29 | 显示全部楼层
unicode =1
 楼主| 发表于 2003-12-16 10:33:25 | 显示全部楼层
Figured it out.

MPlayer Chinese Subtitle
------------------------
Tried some command line options. Found the following can make my MPlayer display Chinese subtitles correctly:
-subcp        codepage of the subtitle
-font         TTF font to use. Requires freetype
-subfont-autoscale        autoscale mode
-subfont-text-scale        autoscale coefficient (% of screensize)
Check its man page for details of these options.

Example:
mplayer -vo sdl -ao sdl -cache 8192 -sub <file.srt> <file.avi> -subcp cp936 -font 'SimSun' -subfont-autoscale 1 -subfont-text-scale 8

MPlayer GUI Chinese Subtitle
----------------------------
Set the following in Preferences:
Subtitle & OSD: Check 'Unicode subtitle'.
Font: Set appropriate autoscale mode and text scale. Set Encoding to 'Simplified Chinese charset (CP936)'.

A note: Good to Check 'Stop XScreenSaver' option in Preference->Misc, as I experienced problems (application crashes) when XScreenSaver runs while MPlayer is active.
发表于 2003-12-17 18:12:00 | 显示全部楼层

up

简单:

把simsun.ttf复制为/user/share/mplayer/subfont.ttf

执行:$mplayer -fs -unicode xxx.avi (字幕文件需要为xxx.sub和avi文件名一致)

这样应该出来了,其他的慢慢调
 楼主| 发表于 2003-12-17 18:47:32 | 显示全部楼层

回复: up

最初由 million 发表
简单:

把simsun.ttf复制为/user/share/mplayer/subfont.ttf

执行:$mplayer -fs -unicode xxx.avi (字幕文件需要为xxx.sub和avi文件名一致)

这样应该出来了,其他的慢慢调


我记得我试过-unicode的。好像不行。回去再试试。
subfont.ttf的方法不行的。我的MPlayer用fontconfig.所以我用-font 'FontName'.
 楼主| 发表于 2003-12-18 09:19:21 | 显示全部楼层

回复: up

最初由 million 发表
简单:

把simsun.ttf复制为/user/share/mplayer/subfont.ttf

执行:$mplayer -fs -unicode xxx.avi (字幕文件需要为xxx.sub和avi文件名一致)

这样应该出来了,其他的慢慢调


试了-unicode. 可以显示中文。是我记错了。上回我用的是-utf8.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表