Mplayer的安裝、字幕等相關問題

安裝:

1. Tarball安裝:

1.1 先把解碼器放下列文件夾:
/usr/local/lib/codes
/usr/local/lib/wincodecs    (all-20061022.tar.bz2)
/usr/local/lib/rp9codecs    (rp9codecs-20050115.tar.bz2)

1.2 # ./configure --prefix=/usr/local/mplayer --enable-gui --enable-freetype --with-codecsdir=/usr/local/lib/codes --with-win32libdir=/usr/local/lib/wincodecs --with-reallibdir=/usr/local/lib/rp9codecs --cc=gcc32


2. yum安裝:

2.1 yum install mplayer

2.2 RPM解碼器:
mplayer-codecs-20061022-1.i386.rpm
mplayer-codecs-extra-20061022-1.i386.rpm
mplayer-codecs-win32-20040704-1.i386.rpm
mplayer-codecs-win32-qt-6.0-1.i386.rpm



---------------------------
文檔:
mplayer的文檔很詳細而且有中文:MPlayer-1.0pre2/DOCS/zh/documentation.html#subtitles_osd 或 man /usr/share/man/zh_CN/man1/mplayer.1.gz



---------------------------
如何配置支持中文字幕:

mplayer支持兩種osd的字體:一種是的arialXXX的包的格式,一種是ttf。如果你在編譯時有freetype2(--enable-freetype)支持,就可以使用ttf。你可以在~/.mplayer/config文件中指定ttf的文件名。

版本:mplayer-1.0-0.91.20080531svn.lvn8

已經編譯好TrueType支持:

1. 系統先安裝中文字體

2. 通過gmplayer(MPlayer GUI)的圖形化配置對話框更改:
"Subtitles & OSD > Encoding" 爲 "cp936" 並勾上 "Unicode subtitle"
"Font -> Encoding" 爲 "unicode",Font 填入 SimSun 或 /usr/share/fonts/zh_CN/TrueType/simsun.ttc

*檢查/etc/mplayer/mplayer.conf,若fontconfig = yes,則Font填 SimSun,否則填入字體文件完整路徑 /usr/share/fonts/zh_CN/TrueType/simsun.ttc。

也可以手工編輯它的配置文件 (注意:gmplayer的配置文件是$HOME/.mplayer/gui.conf,而mplayer的配置文件是$HOME/.mplayer/config)。

   ## 使用fontconfig
   fontconfig = yes
   font = "SimSun"
  
   或者
   ## 不使用fontconfig
   fontconfig = no
   font = "/usr/share/fonts/zh_CN/TrueType/simsun.ttc"


   然後在加上:
   subcp=cp936
   zoom=yes
   unicode=yes
   subfont-encoding=unicode



---------------------------
遇到過的問題:

Q: 出錯信息 Mplayer - alsa-control:unable to find simple control 'PCM',0

A: enabling "Enable Software Mixer" under the audio tab in Mplayer preferences.


Q:New_Face Failed.Maybe the font pass is wrong.
Please supply the text font file(~/.mplayer/subfont.ttf).
這是出錯信息,不過 mplayer 可以正常使用

A:隨便把一個字體(最好是中文字體)複製或鏈接到~/.mplayer下,並改名爲subfont.ttf就可以了.

發佈了28 篇原創文章 · 獲贊 0 · 訪問量 7萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章