Difference between revisions of "VAAPI"

From MythTV Official Wiki
Jump to: navigation, search
(Using Ubuntu/Debian)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{stub}}
 
 
{{Wikipedia|Video Acceleration API}}
 
{{Wikipedia|Video Acceleration API}}
  
'''V'''ideo '''A'''cceleration '''API''' is a successor to [[XvMC]], providing partial and full hardware offloading of video decoding. This interface is available on Intel graphics. Interface frontends are also available for ATI's XvBA and nVidia's [[VDPAU]]. This interface will be supported by MythTV as of 0.25.
+
'''V'''ideo '''A'''cceleration '''API''' is a successor to [[XvMC]], providing partial and full hardware offloading of video decoding. This interface is available on Intel graphics. Interface frontends are also available for ATI's XvBA and nVidia's [[VDPAU]]. This interface is supported by MythTV as of 0.25.
  
  
== Enable VAAPI in 0.25 using Intel Graphics ==
+
== Enable VAAPI ==
  
Although this needs some further testing, this is how I was able to enable VAAPI in 0.25 using Ubuntu and Intel 3000 graphics.
+
You need to install the libva VAAPI library and the related hardware drivers.
  
1. Install necessary packages:
+
== Intel Graphics ==
  
<pre>sudo apt-get install libbluray1 i965-va-driver vainfo libmad0 gtk2-engines-pixbuf</pre>
+
Install necessary packages
  
2. Check to see if newly installed software is working by running <pre>vainfo</pre>  You should see something similar to this: (note, output will be different for those running different versions of the Intel integrated graphics, you are looking for VAEntrypointVLD with some of the codecs)
+
=== Using Ubuntu/Debian ===
  
<pre>vainfo: VA API version: 0.32
+
<pre>sudo apt-get install libva1 i965-va-driver libva-intel-vaapi-driver vainfo</pre>
vainfo: Driver version: i965 Driver 0.1
+
vainfo: Supported profile and entrypoints
+
      VAProfileMPEG2Simple            : VAEntrypointVLD
+
      VAProfileMPEG2Main              : VAEntrypointVLD
+
      VAProfileH264Baseline          : VAEntrypointVLD
+
      VAProfileH264Main              : VAEntrypointVLD
+
      VAProfileH264High              : VAEntrypointVLD
+
      VAProfileVC1Simple              : VAEntrypointVLD
+
      VAProfileVC1Main                : VAEntrypointVLD
+
      VAProfileVC1Advanced            : VAEntrypointVLD</pre>
+
  
3. Install Intel drivers (taken from: step 5 of [http://forum.xbmc.org/showthread.php?tid=114368 GUIDE Simplified Guide for a perfect minimal HTPC on INTEL platforms]):
+
If compiling from source, also install libva-dev
 +
 
 +
<pre>sudo apt-get install libva-dev</pre>
 +
 
 +
=== Using other distributions ===
 +
 
 +
You can use the official Intel graphic installer available at:
 +
https://01.org/linuxgraphics/downloads/2013/intelr-linux-graphics-installer-version-1.0.2
 +
 
 +
Or build from source:
 +
 
 +
If your distribution doesn't include recent drivers (0.32 and above is recommended). Install Intel drivers (taken from: step 5 of [http://forum.xbmc.org/showthread.php?tid=114368 GUIDE Simplified Guide for a perfect minimal HTPC on INTEL platforms]):
 +
(11-8-13 See remarks below for errors and incomplete compile. This wiki needs to be updated.)
  
 
<pre>cd ~
 
<pre>cd ~
Line 43: Line 44:
 
cd intel-driver
 
cd intel-driver
 
git checkout vaapi-ext
 
git checkout vaapi-ext
wget http://paste.kde.org/184874/raw/ -O ./increase_micro_version.patch
+
wget http://paste.kde.org/184874/raw/ -O ./increase_micro_version.patch (11-8-13 the file will download but it is empty)
 
sudo autoreconf -v --install
 
sudo autoreconf -v --install
sudo patch -p1 < ./increase_micro_version.patch
+
sudo patch -p1 < ./increase_micro_version.patch (11-8-13 There will be an error here since the patch file is empty)
 
sudo ./configure --prefix=/usr
 
sudo ./configure --prefix=/usr
 
sudo make
 
sudo make
 
sudo make install</pre>
 
sudo make install</pre>
  
4. Install new Playback Profile from Mythfrontend: 
+
== Test ==
  
Mythfrontend->Setup->Video->Playback->(Screen 3/8)->Add New->(New Name (something like VAAPI)->OK->Add New Entry->
+
Check to see if newly installed software is working by running <pre>vainfo</pre> You should see something similar to this: (note, output will be different for those running different versions of the Intel integrated graphics, you are looking for VAEntrypointVLD with some of the codecs)
  
<pre>Match Criteria: > W: 0 H: 0
+
<pre>vainfo: VA API version: 0.32
Decoder: VAAPI accleration
+
vainfo: Driver version: i965 Driver 0.1
Max CPUs: Depends on your CPU
+
vainfo: Supported profile and entrypoints
Video Renderer: openglvaapi
+
      VAProfileMPEG2Simple            : VAEntrypointVLD
OSD renderer: opengl2 </pre>
+
      VAProfileMPEG2Main              : VAEntrypointVLD
 +
      VAProfileH264Baseline          : VAEntrypointVLD
 +
      VAProfileH264Main              : VAEntrypointVLD
 +
      VAProfileH264High              : VAEntrypointVLD
 +
      VAProfileVC1Simple              : VAEntrypointVLD
 +
      VAProfileVC1Main                : VAEntrypointVLD
 +
      VAProfileVC1Advanced            : VAEntrypointVLD</pre>
  
Hit Next
+
== Configure MythTV for VAAPI ==
  
<pre>Primary deinterlacer: None
+
# Make sure you are using OpenGL or Auto as painter
Fallback deinterlacer: None
+
#* MythFrontend -> Setup -> Appearance, make sure Painter is set to Auto or OpenGL (not Qt)
Custom filters: Empty</pre>
+
# Select VAAPI Playback Profile from Mythfrontend:
 +
#* MythFrontend -> Setup -> Video -> Playback -> (Screen 3/8) -> Select "VAAPI normal" profile in list
  
Hit Finish
+
Hit Next until you are back out to the main screen
  
Hit Enter until you are back out to the main screen
 
  
Try playing back a recording or another video and you should notice a decrease in CPU usage. 
 
  
The only issue that I've seen is with LiveTV.  Whenever I watch LiveTV I get a white screen with audio only if I change channels.  Exiting out and going right back in solves the issue until you change channel again, this might be attributed to something else with my setup.
+
Try playing back a recording or another video and you should notice a decrease in CPU usage.
  
 
[[Category:Glossary]]
 
[[Category:Glossary]]

Latest revision as of 18:29, 29 November 2013

Wikipedia-logo-en.png
Wikipedia has an article on:

Video Acceleration API is a successor to XvMC, providing partial and full hardware offloading of video decoding. This interface is available on Intel graphics. Interface frontends are also available for ATI's XvBA and nVidia's VDPAU. This interface is supported by MythTV as of 0.25.


Enable VAAPI

You need to install the libva VAAPI library and the related hardware drivers.

Intel Graphics

Install necessary packages

Using Ubuntu/Debian

sudo apt-get install libva1 i965-va-driver libva-intel-vaapi-driver vainfo

If compiling from source, also install libva-dev

sudo apt-get install libva-dev

Using other distributions

You can use the official Intel graphic installer available at: https://01.org/linuxgraphics/downloads/2013/intelr-linux-graphics-installer-version-1.0.2

Or build from source:

If your distribution doesn't include recent drivers (0.32 and above is recommended). Install Intel drivers (taken from: step 5 of GUIDE Simplified Guide for a perfect minimal HTPC on INTEL platforms): (11-8-13 See remarks below for errors and incomplete compile. This wiki needs to be updated.)

cd ~
sudo mkdir Builds
cd Builds
sudo apt-get build-dep libva1
git clone git://anongit.freedesktop.org/vaapi/libva
cd libva
git checkout vaapi-ext
sudo ./autogen.sh --prefix=/usr
sudo make
sudo make install
cd..
git clone git://anongit.freedesktop.org/vaapi/intel-driver
cd intel-driver
git checkout vaapi-ext
wget http://paste.kde.org/184874/raw/ -O ./increase_micro_version.patch (11-8-13 the file will download but it is empty)
sudo autoreconf -v --install
sudo patch -p1 < ./increase_micro_version.patch (11-8-13 There will be an error here since the patch file is empty)
sudo ./configure --prefix=/usr
sudo make
sudo make install

Test

Check to see if newly installed software is working by running
vainfo
You should see something similar to this: (note, output will be different for those running different versions of the Intel integrated graphics, you are looking for VAEntrypointVLD with some of the codecs)
vainfo: VA API version: 0.32
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

Configure MythTV for VAAPI

  1. Make sure you are using OpenGL or Auto as painter
    • MythFrontend -> Setup -> Appearance, make sure Painter is set to Auto or OpenGL (not Qt)
  2. Select VAAPI Playback Profile from Mythfrontend:
    • MythFrontend -> Setup -> Video -> Playback -> (Screen 3/8) -> Select "VAAPI normal" profile in list

Hit Next until you are back out to the main screen


Try playing back a recording or another video and you should notice a decrease in CPU usage.