Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

CentOS MPlayer 播放有畫面無聲音?安裝 alsa-lib + 完整解碼包編譯支援

編輯:關於 Linux

CentOS 6+ 採用 ALSA 音訊架構,MPlayer 缺 alsa-lib 會無聲音。解法:yum install -y *alsa* 安裝完整 ALSA 套件 → 下載 MPlayer 官方 all-.tar.bz2 完整解碼包 → 解壓至 /usr/local/lib/codecs → 重新 ./configure --codecsdir=/usr/local/lib/codecs → make && make install。編譯指定解碼目錄後,MPlayer 即可正常解碼音訊流並輸出聲音。

完整指令流程

# 1. 安裝 ALSA 相關套件
yum install -y *alsa*

# 2. 下載解碼包
wget https://www.mplayerhq.hu/MPlayer/releases/codecs/all-20110131.tar.bz2

# 3. 解壓並部署
tar -xf all-20110131.tar.bz2
mkdir -p /usr/local/lib/codecs
mv all-20110131/* /usr/local/lib/codecs/

# 4. 重新編譯 MPlayer 指定解碼目錄
./configure --codecsdir=/usr/local/lib/codecs
make
make install

ALSA 是現代 Linux 音訊基礎,解碼包提供專有格式支援,兩者缺一不可。編譯時務必指定 --codecsdir 讓 MPlayer 找到解碼器。

Copyright © Windows教程網 All Rights Reserved