<p>I am able to get the hw-acceleration working through ffmpeg using Nvidia graphics card. I just thoroughly followed the steps described here.</p>

<p><a href="https://wiki.archlinux.org/index.php/Hardware_video_acceleration" rel="nofollow">Hw Acceleratoin guide</a></p>

CC BY-SA 3.0
2016-05-26T11:50:19.087Z
2016-05-26T11:50:19.087Z
Raju
<p>I am developing a multimedia player using ffmpeg. I am trying hard to get hardware acceleration through ffmpeg using vdpau hardware accelerator. I didn't get any success so far. Below I have mentioned details of my system specs, software and the error of the ffmpeg command line tool. Please feel free to comment if you need further information. Any quick suggestions will be greatly helpful.</p>

<pre>
<b>Here is my system hardware specification:</b>
Processor: Intel® Core™ i5-4570 CPU @ 3.20GHz × 4 
Graphis: GeForce GTX 750 Ti/PCIe/SSE2
Os: Ubuntu-14.04 64bit
Memory: 8GiB
</pre>

<p><strong>Software:</strong>
ffmpeg-2.8.1</p>

<p><strong>other useful logs:</strong>
<strong>1. Find enable hw accelerator in ffmpeg</strong></p>

<p>./ffmpeg -hwaccels</p>

<pre>
ffmpeg version 2.8.1 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --enable-shared
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
Hardware acceleration methods:
vdpau
</pre>

<p><strong>2. Hw accel decoding using ffmpeg</strong> </p>

<p>./ffmpeg -hwaccel vdpau -i /tmp/test.mp4 /tmp/test.ts</p>

<p><strong>Error log:</strong></p>

<pre>
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/nvidia_drv_video.so
libva info: va_openDriver() returns -1
</pre>

<p><strong>3.Command: lspci -vnn | grep -i VGA -A 12</strong></p>

<pre>
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM107 [GeForce GTX 750 Ti] [10de:1380] (rev a2) (prog-if 00 [VGA controller])
    Subsystem: ZOTAC International (MCO) Ltd. Device [19da:288a]
    Flags: bus master, fast devsel, latency 0, IRQ 48
    Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
    Memory at e0000000 (64-bit, prefetchable) [size=256M]
    Memory at f0000000 (64-bit, prefetchable) [size=32M]
    I/O ports at e000 [size=128]
    [virtual] Expansion ROM at f7000000 [disabled] [size=512K]
    Capabilities: 
    Kernel driver in use: nvidia

01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:0fbc] (rev a1)
    Subsystem: ZOTAC International (MCO) Ltd. Device [19da:288a]
</pre>

CC BY-SA 3.0
2016-05-23T16:05:05.813Z
According to [here](https://wiki.archlinux.org/index.php/Hardware_video_acceleration#VA-API_vaInitialize_failed), "*you may need to set the LIBVA_DRIVER_NAME environment variable to vdpau*"
Gyan
CC BY-SA 3.0
2016-05-24T05:06:06.187Z
Hi Mulvya, I tried setting LIBVA_DRIVER_NAME variable but issue still exists. Since **/usr/lib/x86_64-linux-gnu/dri/vdpau_drv_video.so** library is missing, it is coming out with error.
Raju
<video><ffmpeg><codec><transcoding><playback>
how to get vdpau hardware acceleration using ffmpeg?
Raju
# how to get vdpau hardware acceleration using ffmpeg?

(Asked by: username_0 on 2016-05-23)

I am developing a multimedia player using ffmpeg. I am trying hard to get hardware acceleration through ffmpeg using vdpau hardware accelerator. I didn't get any success so far. Below I have mentioned details of my system specs, software and the error of the ffmpeg command line tool. Please feel free to comment if you need further information. Any quick suggestions will be greatly helpful.

Here is my system hardware specification:
Processor: Intel® Core™ i5-4570 CPU @ 3.20GHz × 4 
Graphis: GeForce GTX 750 Ti/PCIe/SSE2
Os: Ubuntu-14.04 64bit
Memory: 8GiB

Software:
ffmpeg-2.8.1
other useful logs:
1. Find enable hw accelerator in ffmpeg
./ffmpeg -hwaccels

ffmpeg version 2.8.1 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --enable-shared
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
Hardware acceleration methods:
vdpau

2. Hw accel decoding using ffmpeg 
./ffmpeg -hwaccel vdpau -i /tmp/test.mp4 /tmp/test.ts
Error log:

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/nvidia_drv_video.so
libva info: va_openDriver() returns -1

3.Command: lspci -vnn | grep -i VGA -A 12

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM107 [GeForce GTX 750 Ti] [10de:1380] (rev a2) (prog-if 00 [VGA controller])
    Subsystem: ZOTAC International (MCO) Ltd. Device [19da:288a]
    Flags: bus master, fast devsel, latency 0, IRQ 48
    Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
    Memory at e0000000 (64-bit, prefetchable) [size=256M]
    Memory at f0000000 (64-bit, prefetchable) [size=32M]
    I/O ports at e000 [size=128]
    [virtual] Expansion ROM at f7000000 [disabled] [size=512K]
    Capabilities: 
    Kernel driver in use: nvidia

01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:0fbc] (rev a1)
    Subsystem: ZOTAC International (MCO) Ltd. Device [19da:288a]

**Tags:** video, ffmpeg, codec, transcoding, playback

> **Comments:**
> **username_1**: According to [here](https://wiki.archlinux.org/index.php/Hardware_video_acceleration#VA-API_vaInitialize_failed), "*you may need to set the LIBVA_DRIVER_NAME environment variable to vdpau*"  
> **username_0**: Hi Mulvya, I tried setting LIBVA_DRIVER_NAME variable but issue still exists. Since **/usr/lib/x86_64-linux-gnu/dri/vdpau_drv_video.so** library is missing, it is coming out with error.  

---

## 1 answers

### Answer by username_0 on 2016-05-26. Score: 0

I am able to get the hw-acceleration working through ffmpeg using Nvidia graphics card. I just thoroughly followed the steps described here.

[Hw Acceleratoin guide](https://wiki.archlinux.org/index.php/Hardware_video_acceleration)


---

