10

I would like to know which package I have to install and how to test that is working fine?

I know there are many question similar but no one is complete and clear to me

4 Answers 4

11

libva-intel-vaapi-driver Install libva-intel-vaapi-driver vainfo Install vainfo

Then run vainfo to check if you see the entry points for some profiles:

[...]
vainfo: Supported profile and entrypoints
    VAProfileMPEG2Simple            : VAEntrypointVLD
    [...]

For all GStreamer-based video players, this package should be sufficient: gstreamer0.10-vaapi Install gstreamer0.10-vaapi. If I'm correct most standard video players like Totem are GStreamer based.

VLC is a different story, but it's being built with the --enable-libva build flag in Ubuntu (as shown by the apt-get source vlc). This means it should just work by enabling it in the configuration:

enter image description here

Or, manually, on the command line:

vlc --ffmpeg-hw -v
[...]
libva: VA-API version 0.32.0
[0x7feeecc02a28] avcodec decoder: Using VA API version 0.32 for hardware decoding.
3
3
  1. Decoding:
    sudo apt-get install i965-va-driver libva-intel-vaapi- driver vainfo
    
    Then setup vlc to use hardware decoding, run it from the command line (to get the debug messsages) and open am .mp4 file. You should see:
    [0x1781058] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
    libva info: VA-API version 0.35.0
    libva info: va_getDriverName() returns 0
    libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
    libva info: Found init function __vaDriverInit_0_35
    libva info: va_openDriver() returns 0
    [0x7fd825a569a8] avcodec decoder: Using VA API version 0.35 for **hardware decoding**.*
    
  2. Encoding: Install Gstreamer, libgstremaer-vaapi1.x, i965-va-driver; The following command will launch a gstremaer filter graph which takes input from your web camera (/dev/video0) then encodes and muxes into test2.mp4 file:
    gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1800 ! video/x-raw,format= I420,width=640,height=480 ! vaapipostproc ! queue ! vaapiencode_h264 ! qtmux ! filesink location=test2.mp4
    
    It will fail if you don't have hardware encoding support for your sandy bridge graphics (HD 2000/3000 GPU). Note it fails for me (Core i7, HD3000 graphics) and according Intel it shouldn't, because HD2000/3000 supports H.264 HW encoding....
1
  • Shouldn't libva-intel-vaapi- driver be: libva-intel-vaapi-driver Sep 13, 2022 at 9:00
2

Just a quicknote on Totem : it's not possible to use the gstreamer-vaapi right now for Totem as it use a special GTK widget which does not interface with gstreamer like a classic player. the team is working on it.

1
  • Just to add that progress on that work can be followed at bugs.launchpad.net/bugs/997370
    – papukaija
    Mar 1, 2014 at 10:48
-1

Just install vainfo and you are all set. To install that open your terminal with CTRL + ALT + T

sudo apt-get install vainfo
1
  • 2
    I believe the vainfo package does not install any driver-specific va-api libraries.
    – gertvdijk
    Jan 26, 2013 at 17:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .