http://www.latelee.org/using-gnu-linux/ubuntu-intel-gpu-vaapi.html
http://www.webupd8.org/2012/11/install-mplayer-with-va-api-hardware.html


下面是實現這個功能的步驟:
1
、安裝vaapi及drm庫:

sudo apt-get install libdrm-intel1 libva1 libva-intel-vaapi-driver vainfo

2、安裝顯卡驅動:

- for Intel GPUs (for Intel HD Graphics as well as G45 and later):

sudo apt-get install i965-va-driver


- for AMD Radeon GPUs (you also need the proprietary drivers!):

sudo apt-get install xvba-va-driver

 

3、安裝帶有vaapi的mplayer:
mplayer預設是沒有整合vaapi的,需要使用它的vaapi分支源碼編譯才行,不,有好心國際友人已經實現了ubuntu的協力廠商源。
首先添加這個源:

 


To install MPlayer with VA-API support in Ubuntu 14.04 13.10, 13.04, 12.10, 12.04 or 11.10, use the following commands:

sudo add-apt-repository ppa:sander-vangrieken/vaapi
sudo apt-get update
sudo apt-get install mplayer-vaapi

沒有什麼錯誤的話,一切就OK了。需要注意的是mplayer是沒有介面的,只有命令列,如果要安裝一個像上去正常點的播放機,就要安裝gnome-mplayer或smplayer,不過這不是我們關注的重點(其實我已經安裝了,但按網上配置的方法,CPU沒降下來)。
播放視頻命令很簡單,如下:

mplayer -vo vaapi xxx.av

其中“-vo vaapi”指定“視頻輸出”為vaapi,通過mplayer -vo -h可以查看其支援的視頻輸出有哪些(比如,指定輸出為sdl就不會使用硬體解碼,此時CPU佔用率是很高的)。網上還提到需要添加”-va vaapi”選項,即指定視頻加速,但這個版本的mplayer沒有,因此不用輸入。

 

硬解可以 但播放V4l2 的非壓縮來源 沒有效果 似乎 真的沒 -va vaapi 導致沒影像加速效果!! CPU使用率還是一樣

 

arrow
arrow
    文章標籤
    UBUNTU 14.04 MPLAYER VAAPI
    全站熱搜

    立你斯 發表在 痞客邦 留言(0) 人氣()