歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux服務器 >> Linux系統下安裝Mplayer播放器方法

Linux系統下安裝Mplayer播放器方法

日期:2017/3/2 16:54:37   编辑:Linux服務器

 STEP 1. 下載必要的文件:
 
  下載主程序:
 
  MPlayer-1.0pre8.tar.bz2
 
  官方解碼器:
 
  essential-20071007.tar.bz2
 
  官方win32_CODES-all:
 
  windows-essential-20071007.zip
 
  皮膚:
 
  Orange-1.3.tar.bz2
 
  上面的那幾樣東西都在官方網站找到並順利下載
 
  下載網址: http://www.mplayerhq.hu/homepage/design7/dload.html
 
  STEP2. 安裝codecs:
 
  tar vjxf essential-20071007.tar.bz2
mv essential-20071007 /usr/lib/codes(or /usr/lib/codecs,this is used for.
/configure --with-codecsdir=/usr/lib/codecs/,
you must make the direct is correct,or you cant install the codes.)
chmod 644 /usr/lib/codes/*(or 777)
chown root.root /usr/lib/codes/*

unzip windows-essential-20071007.zip
mv windows-essential-20071007 /usr/lib/wincodes
(or /usr/lib/wincodecs,
this is usedfor ./configure --with-win32libdir=/usr/lib/wincodecs/,
you must make thedirect is correct,or you cant install the codes.)
chmod 644 /usr/lib/wincodes/*(or 777)
chown root.root /usr/lib/wincodes/*


  STEP 3.安裝MPlayer:
 
   tar vjxf MPlayer-1.0pre8.tar.bz2
cd MPlayer-1.0pre8
./configure --prefix=/usr/local/mplayer/
--enable-gui--enable-freetype --with-codecsdir=/usr/lib/codes/--with-win32libdir=
/usr/lib/wincodes/
--disable-gcc-checking--language=zh_CN

  回車後,它會讓你確認是否真的願意disable-gcc-checking ,回車就行了。
 
  make
 
  make的時間可能比較長。建議你可以先去干別的事。接下來我們就可以make install了。
 
  make install
 
   cd etc
cp example.conf /usr/local/mplayer/etc/config
cp codecs.conf /usr/local/mplayer/etc/
 
  STEP 4.安裝字體
 
  把你想用的字體(如 simsun.ttf ,windows系統的字體目錄下就有c:\windows\font\)放到/home/<你的用戶名>/.mplayer 下(root用戶放到/root/.mplayer下)並且改名為subfont.ttf .
 
  拷貝(這裡假設您的simsun字體臨時放在 /root/ 目錄下,用戶為root):
 
  cp /root/simsun.ttf /root/.mplayer/
 
  改名:
 
  mv /root/.mplayer/simsun.ttf /root/.mplayer/subfont.ttf
 
  (如 果不做這一步運行時會報錯:New_Face failed. Maybe the font path is wrong.please supply teh text font ~/.mplayer/subfont.ttf.如果沒有~/.mplayer,只需要點菜單欄的查看 ,選擇,顯示隱藏文件即可。)
 
  STEP 5.安裝皮膚
 
  tar vjxf Orange-1.3.tar.bz2
 
  mv Orange /usr/local/mplayer/share/mplayer/skins/
 
  cd /usr/local/mplayer/share/mplayer/skins/
 
  ln -s Orange default
 
  官方網站有很多皮膚,下載以後,解壓,然後放到/usr/local/mplayer/share/mplayer/skins/ 下,然後右擊mplayer,選皮膚浏覽,就可以看到你剛放進去的皮膚了。
 
  STEP 6.運行
 
  /usr/local/mplayer/bin/gmplayer
 
  就可以運行程序了。你就可以在linux下聽歌看電影了

Copyright © Linux教程網 All Rights Reserved