|
发表于 2005-11-30 20:33:16
|
显示全部楼层
Re: mplayer使用心得
[quote:957cf602cc="GGGO"]一般的,使用-subcp cp936 就能正常显示简体中文字幕。如果你发现显示的字幕中有的正常,有的不正常,这说明字幕文件确实是GB系列编码的,你可以试试把cp936换成其他的例如GBK,GB2312等等,总有一个行的。你还可以用iconv -l来显示系统中已知的字符集,来帮助你选择编码。
我的系统中GB系列有GB, GB2312, GB13000, GB18030, GBK, GB_1988-80, GB_198880
在这方面,mplayer也有一个不错的选项可以使用。
-subcp enca:<language>:<fallback codepage> (ENCA only)
You can specify your language using a two letter language code
to make ENCA detect the codepage automatically. If unsure, en-
ter anything and watch mplayer -v output for available lan-
guages. Fallback codepage specifies the codepage to use, when
the autodetection fails.
EXAMPLE:
-subcp enca:cs:latin2
Guess the encoding, assuming the subtitles are Czech,
fall back to latin 2, if the detection fails.
-subcp enca:pl:cp1250
Guess the encoding for Polish, fall back to cp1250.
但我发现这个选项工作的不太好,例如-subcp enca:zh:cp936
按照上面的说明,应该是让其自动检测中文编码,检测失败时使用cp936。
原来使用-subcp cp936能正常显示的字幕,当用-subcp enca:zh:cp936时反而成了乱码。[/quote]
这是因为 enca 还没有支持中文内码的自动识别,不过情况应该在一个月内有所改观:-) enca 的 1.8 版本将会加入对中文 GBK/Big5/UTF-8/UTF-7 的识别,大家可以同时观看多种内码的字幕了。 |
|