Jamyy's Weblog

讓 VLC media player 正常顯示 .srt 中文字幕

by Jamyy on 一月.29, 2014, under Linux, Windows

環境:

  1. Linux Mint 16 x86_64, VLC media player 2.0.8, LANG=en_US.UTF-8
  2. Windows Vista x64 繁體中文, VLC media player 2.1.2

環境: Linux Mint 16 x86_64, VLC media player 2.0.8, LANG=en_US.UTF-8

前置作業: 將 Big5 編碼的 .srt 檔案轉成 UTF-8 編碼

$ iconv -f big5 -t utf8 subtitle.srt > subtitle-utf8.srt

方式一: 調整 VLC 設置

$ vlc → Tools → Preferences

  • Subtitles & OSD: Default encoding: Universal (UTF-8), Font: WenQuanYi Micro Hei ()
  • Show settings: All → Input / Codecs → Subtitles codecs → Subtitles: 取消勾選 UTF-8 subtitles autodetection, 取消勾選 Formatted Subtitles ()

Save 之後, 重新啟動 VLC Player, 載入影片、載入 subtitle-utf8.srt

方式二: 修改 /etc/fonts 設定檔

$ cd /etc/fonts/conf.avail
$ sudo cp 49-sansserif.conf 49-sansserif.conf.backup
$ sudo vi 49-sansserif.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
  If the font still has no generic name, add sans-serif
 -->
        <match target="pattern">
                <test qual="all" name="family" compare="not_eq">
                        <string>WenQuanYi Micro Hei</string>
                </test>
                <test qual="all" name="family" compare="not_eq">
                        <string>WenQuanYi Micro Hei</string>
                </test>
                <test qual="all" name="family" compare="not_eq">
                        <string>monospace</string>
                </test>
                <edit name="family" mode="append_last">
                        <string>WenQuanYi Micro Hei</string>
                </edit>
        </match>
</fontconfig>

Ref: Ubuntu下VLC中文字幕显示问题的解决_Linux教程_Linux公社-Linux系统门户网站


 

環境: Windows Vista x64 繁體中文, VLC media player 2.1.2

Step 1. 開啟 VLC media player

Step 2. 工具 → 偏好設定 → 字幕 / OSD ()

  • 預設編碼: 正體中文 (Big5)
  • 字型: SimHei

Step 3. 重新啟動 VLC media player, 載入影片, 載入 Big5 編碼的 .srt 字幕檔

Ref: windows 7 64-bit VLC播放器 繁體中文字幕亂碼解決 @ KevinLuo's Blog 凱文網誌



:, ,