LinuxSir.cn,穿越时空的Linuxsir!

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

快被逼疯了!按照这篇文章调整mplayer中文字幕,还是有问题“!

[复制链接]
发表于 2006-8-24 23:04:20 | 显示全部楼层 |阅读模式
======================================
B~至于窗口模式,我采用以下方法也解决:
1.rm -rf /usr/share/mplayer/font/*
2.rm -rf ~/.mplayer/font/*
上面两步让gmplayer找不到那些英文字体,呵呵,就让它乖乖地用我们指定的字体:
3.ln -s /YOUR/PATH/TO/CHINESEFONT.ttf subfont.ttf
4.修改~/.mplayer/gui.conf如下项目:

  1. sub_auto_load = "yes"
  2. sub_unicode = "yes"
  3. sub_pos = "100"
  4. sub_overlap = "no"
  5. sub_cp = "cp936"
  6. font_factor = "0.750000"
  7. font_name = "/home/badants/.mplayer/subfont.ttf"
  8. font_encoding = "unicode"
复制代码

然后,打开gmplayer,试试看,能不能成功。

---
结果成功了一半!字幕的前半句是乱码,后半句却成功显示中文!
当然有时候是全部乱码,没有一次是全部成功显示!
我的字体是这样设置的。。。

subfont.ttf -> /usr/X11R6/lib/X11/fonts/truetype/FZSongTi.ttf

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2006-8-24 23:15:17 | 显示全部楼层
我的这个影音文件是mkv的,其中包含了两条字幕,一条是中文,一条是英文的。跟这个有关系?
回复 支持 反对

使用道具 举报

发表于 2006-8-25 00:09:08 | 显示全部楼层
把sub_cp那行删掉试试。
回复 支持 反对

使用道具 举报

发表于 2006-8-25 08:21:40 | 显示全部楼层
有这么复杂吗?我用的是archlinux,只是做了一个subfont.ttf的链接,什么问题都没有

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-25 09:19:04 | 显示全部楼层
楼上的也是mkv版本的老友记?终于见到同好了。。。哈

能不能麻烦一下,把 gui.conf贴出来看看?

另外,如果能把mplayer的设置画面也帮忙贴一下就太感激不尽了。。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-25 09:21:39 | 显示全部楼层
老兄这两个子目录下面有没有字体文件?

======================================
B~至于窗口模式,我采用以下方法也解决:
1.rm -rf /usr/share/mplayer/font/*
2.rm -rf ~/.mplayer/font/*
回复 支持 反对

使用道具 举报

发表于 2006-8-25 09:54:28 | 显示全部楼层
把我的mplayer.conf帖出来了吧,其实都没有改过的
至于图形界面的配置,就不用了吧,我都没有点过那个配置


  1. [huting@archlinux ~]$ cat /etc/mplayer/mplayer.conf
  2. #
  3. # MPlayer configuration file
  4. #
  5. # Configuration files are read system-wide from /usr/local/etc/mplayer.conf
  6. # and per user from ~/.mplayer/config, where per-user settings override
  7. # system-wide settings, all of which are overrriden by the command line.
  8. #
  9. # The configuration file settings are the same as the command line
  10. # options without the preceding '-'.
  11. #
  12. # See the CONFIGURATION FILES section in the man page
  13. # for a detailed description of the syntax.


  14. ##################
  15. # video settings #
  16. ##################

  17. # Specify default video driver (see -vo help for a list).
  18. vo=x11

  19. # Use SDL video with the aalib subdriver by default.
  20. #vo = sdl:aalib

  21. # FBdev driver:
  22. #
  23. # mode to use (read from fb.modes)
  24. #fbmode = 640x480-120
  25. #
  26. # location of the fb.modes file
  27. #fbmodeconfig = /etc/fb.modes

  28. # Specify your monitor timings for the vesa and fbdev video output drivers.
  29. # See /etc/X11/XF86Config for timings. Be careful; if you specify settings
  30. # that exceed the capabilities of your monitor, you may damage it.
  31. #
  32. # horizontal frequency range (k stands for 1000)
  33. #monitor-hfreq = 31.5k-50k,70k
  34. #
  35. # vertical frequency range
  36. #monitor-vfreq = 50-90
  37. #
  38. # dotclock (or pixelclock) range (m stands for 1000000)
  39. #monitor-dotclock = 30M-300M

  40. # Start in fullscreen mode by default.
  41. #fs=yes

  42. # Change to a different videomode when going fullscreen.
  43. #vm=yes

  44. # Override the autodetected color depth, may need 'vm=yes' as well.
  45. #bpp=0

  46. # Enable software scaling (powerful CPU needed) for video output
  47. # drivers that do not support hardware scaling.
  48. zoom=yes

  49. # standard monitor size, with square pixels
  50. #monitoraspect=4:3

  51. # Use this for a widescreen monitor, non-square pixels.
  52. #monitoraspect=16:9

  53. # Keep the player window on top of all other windows.
  54. #ontop=yes


  55. ##################
  56. # audio settings #
  57. ##################

  58. # Specify default audio driver (see -ao help for a list).
  59. ao=alsa

  60. # Use SDL audio driver with the esd subdriver by default.
  61. #ao = sdl:esd

  62. # Specify the mixer device.
  63. #mixer = /dev/mixer

  64. # Resample the sound to 44100Hz with the lavcresample audio filter.
  65. #af=lavcresample=44100


  66. ##################
  67. # other settings #
  68. ##################

  69. # Drop frames to preserve audio/video sync.
  70. #framedrop = yes

  71. # Specify your preferred skin here (skins are searched for in
  72. # /usr/local/share/mplayer/skins/<name> and ~/.mplayer/skins/<name>).
  73. #skin = Abyss

  74. # Resample the font alphamap.
  75. # 0     plain white fonts
  76. # 0.75  very narrow black outline (default)
  77. # 1     narrow black outline
  78. # 10    bold black outline
  79. #ffactor = 0.75

  80. # cache settings
  81. #
  82. # Use 8MB input cache by default.
  83. cache = 10000
  84. #
  85. # Prefill 20% of the cache before starting playback.
  86. #cache-min = 20.0
  87. #
  88. # Prefill 50% of the cache before restarting playback after the cache emptied.
  89. #cache-seek-min = 50

  90. # DVD: Display English subtitles if available.
  91. #slang = en

  92. # DVD: Play English audio tracks if available.
  93. #alang = en


  94. # You can also include other configuration files.
  95. #include = /path/to/the/file/you/want/to/include
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-8-25 09:55:33 | 显示全部楼层
还有,我的ttf字体用的是simsun.ttf
回复 支持 反对

使用道具 举报

发表于 2006-8-25 09:57:32 | 显示全部楼层
还有gui.conf,我没有改过这个文件,是mplayer自动生成的吧
  1. [huting@archlinux ~]$ cat .mplayer/gui.conf
  2. enable_audio_equ = "no"
  3. vo_driver = "x11"
  4. vo_panscan = "0.000000"
  5. vo_doublebuffering = "yes"
  6. vo_direct_render = "yes"
  7. v_framedrop = "1"
  8. v_flip = "0"
  9. v_ni = "no"
  10. v_idx = "-1"
  11. vf_pp = "no"
  12. vf_autoq = "0"
  13. vf_lavc = "no"
  14. ao_driver = "alsa"
  15. ao_volnorm = "no"
  16. softvol = "no"
  17. ao_surround = "no"
  18. ao_extra_stereo = "no"
  19. ao_extra_stereo_coefficient = "1.000000"
  20. dvd_device = "/dev/dvd"
  21. cdrom_device = "/dev/cdrom"
  22. osd_level = "1"
  23. sub_auto_load = "yes"
  24. sub_unicode = "no"
  25. sub_pos = "100"
  26. sub_overlap = "no"
  27. font_factor = "0.750000"
  28. font_text_scale = "5.000000"
  29. font_osd_scale = "6.000000"
  30. font_blur = "2.000000"
  31. font_outline = "2.000000"
  32. font_autoscale = "3"
  33. cache = "yes"
  34. cache_size = "10000"
  35. playbar = "no"
  36. load_fullscreen = "no"
  37. show_videowin = "yes"
  38. stopxscreensaver = "no"
  39. autosync = "no"
  40. autosync_size = "0"
  41. gui_skin = "OSX-Brushed"
  42. gui_save_pos = "yes"
  43. gui_main_pos_x = "109"
  44. gui_main_pos_y = "602"
  45. gui_video_out_pos_x = "257"
  46. gui_video_out_pos_y = "222"
  47. equ_band_00 = "0.000000"
  48. equ_band_01 = "0.000000"
  49. equ_band_02 = "0.000000"
  50. equ_band_03 = "0.000000"
  51. equ_band_04 = "0.000000"
  52. equ_band_05 = "0.000000"
  53. equ_band_06 = "0.000000"
  54. equ_band_07 = "0.000000"
  55. equ_band_08 = "0.000000"
  56. equ_band_09 = "0.000000"
  57. equ_band_10 = "0.000000"
  58. equ_band_11 = "0.000000"
  59. equ_band_12 = "0.000000"
  60. equ_band_13 = "0.000000"
  61. equ_band_14 = "0.000000"
  62. equ_band_15 = "0.000000"
  63. equ_band_16 = "0.000000"
  64. equ_band_17 = "0.000000"
  65. equ_band_18 = "0.000000"
  66. equ_band_19 = "0.000000"
  67. equ_band_20 = "0.000000"
  68. equ_band_21 = "0.000000"
  69. equ_band_22 = "0.000000"
  70. equ_band_23 = "0.000000"
  71. equ_band_24 = "0.000000"
  72. equ_band_25 = "0.000000"
  73. equ_band_26 = "0.000000"
  74. equ_band_27 = "0.000000"
  75. equ_band_28 = "0.000000"
  76. equ_band_29 = "0.000000"
  77. equ_band_30 = "0.000000"
  78. equ_band_31 = "0.000000"
  79. equ_band_32 = "0.000000"
  80. equ_band_33 = "0.000000"
  81. equ_band_34 = "0.000000"
  82. equ_band_35 = "0.000000"
  83. equ_band_36 = "0.000000"
  84. equ_band_37 = "0.000000"
  85. equ_band_38 = "0.000000"
  86. equ_band_39 = "0.000000"
  87. equ_band_40 = "0.000000"
  88. equ_band_41 = "0.000000"
  89. equ_band_42 = "0.000000"
  90. equ_band_43 = "0.000000"
  91. equ_band_44 = "0.000000"
  92. equ_band_45 = "0.000000"
  93. equ_band_46 = "0.000000"
  94. equ_band_47 = "0.000000"
  95. equ_band_48 = "0.000000"
  96. equ_band_49 = "0.000000"
  97. equ_band_50 = "0.000000"
  98. equ_band_51 = "0.000000"
  99. equ_band_52 = "0.000000"
  100. equ_band_53 = "0.000000"
  101. equ_band_54 = "0.000000"
  102. equ_band_55 = "0.000000"
  103. equ_band_56 = "0.000000"
  104. equ_band_57 = "0.000000"
  105. equ_band_58 = "0.000000"
  106. equ_band_59 = "0.000000"
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-25 15:48:25 | 显示全部楼层
Post by tingxx
还有,我的ttf字体用的是simsun.ttf


老兄的simsun.ttf是不是从windows下面考过来的simsun.ttc改名后的?大概15兆左右的那个?

另外,老兄的老友记事不是那个什么盖天乐什么的mkv的版本呢?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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