歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux安裝Mplayer沒有聲音的解決方法

Linux安裝Mplayer沒有聲音的解決方法

日期:2017/2/28 14:37:58   编辑:Linux教程

在安裝後mplayer 之後,可能會出現有圖像但是沒有聲音的情況,看debug信息說是找不到/dev/dsp,然後看到網上有些說法是mknod /dev/dsp 設備文件什麼的,感覺很怪,因為我使用的CentOS,據說聲音數據走的已經不再是/dev/dsp這個設備文件了,所以我又亂試了一些方法.

步驟:

1.安裝alsa相關的包,因為rhel6和centos6以上的版本使用聲卡配置都是alsa了,所以聲音可能與缺這個相關的包有關.

yum install -y *alsa*

2.下在解碼包 all-xxxxx.tar.bz2

http://www.mplayerhq.hu/MPlayer/releases/codecs/

3.解壓all-xxxxx.tar.bz2

tar -xf all-xxxxx.tar.bz2

4.創建一個文件夾

mkdir /usr/local/lib/codecs

5.進入all-xxxx

cd all-xxxxxx

6.將裡面的所有文件移到第4部創建出來的文件夾中

mv -f /all-xxx/* /usr/local/lib/codecs

7.重新./configure.這次加上參數--codecsdir=/usr/local/lib/codecs

./configure --codecsdir=/usr/local/lib/codecs

8.make

9.make install

執行上述步驟之後mplayer就會有聲音了

Copyright © Linux教程網 All Rights Reserved