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
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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 . 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:
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.
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.
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....