Ubuntu – How to enable hardware accelerated video in VLC with Intel HD 4000 GPU

hd-videointel graphicsvaapivlc

I am running Ubuntu 12.10 on a Dell Latitude E5530, and I am unable to get hardware accelerated video decoding running in VLC player.

I've ticked the hardware acceleration option in the settings of VLC, installed all libva, libdrm and vaapi related packages, yet the CPU usage indicates me it's still not active. The CPU usage during the playback of a 720p video is 40-80%, where I would expect to see a lot lower usage on my machine.

Can anyone give me some advice on how to get it working?

The output of vainfo is:

libva: VA-API version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: Intel i965 driver - 1.0.17
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

I've tried to play 720p mpg, mp4 and wmv movies, yet none of them ran hardware accelerated.

The codecs of the tested movies are:

  • mpeg: H264-MPEG 4-AVC (part 10) (avc) (resulting 80% CPU usage, full HD resolution)
  • mp4: MPEG 4 Video (mp4v) (16% CPU usage, 720p)
  • wmv: Windows Media Video 7 (WMV1) (16 % CPU usage, 720p resolution)

Taking a look at System Monitor, I can see, that all four CPU threads (talking about a i5-3210M dual-core processor) are nearly equally stressed, so the above mentioned 16 and 80% CPU usage is distributed among the threads).

Best Answer

VA-API (Hardware Acceleration For Intel )

Is there a power saving application similar to Jupiter? check my answer for full detail

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

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



Its in Tools > Preferences > Input & Codecs > Enable Use GPU Accelerated decoding

enter image description here

How to correctly enable/test VA-API on Intel Sandy Bridge?

 vlc --ffmpeg-hw -v

Check the line

 [0x7fd018c02d38] avcodec decoder: Using VA API version 0.32 for hardware decoding.