Decoding video in VLC using VAAPI and nVidia

19 April 2009

I know Phoronix people don’t come around here, and that most people reading this blog don’t care, but anyway…

GPU video decoding on Linux

On linux, decoding video using GPU means different standards:

Fortunately, we can use VDPAU (nVidia) as a backend to VAAPI. And there is a very nice library, named libva.

VLC and VAAPI

So far, most patches were done on MPlayer and FFmpeg, but here we go:

VLC - VAAPI

The sample is a M2TS with H.264 encoded at 32Mbps. Decoding is done without audio and subs and with a command line interface.

Performances

The perfs are quite nice, but they might be better. Why?

Because we don’t output directly the video, we just take it back from the decoder, so we have a lot of memcpy, which explains why the decoding could be faster, but isn’t…

Does this mean I can decode using GPU and then restream using VLC?

In theory, yes. Not tested yet :D

Jean-Baptiste Kempf

Comments

  1. On 16 May 16160, 8:41 by KS Ng

    I’ve installed libva with vdpau backend and compiled latest VLC git, but found H/W h264 acceleration not enabled when running VLC to view a h264 clip. Would you please advise what else I need to do!

  2. On 6 May 6060, 8:13 by JBK

    Well, patch is integrated in VLC 1.1-git.

  3. On 5 May 5050, 4:36 by Cyril

    I do have a libva working on my system, and I’m interested in your patch.
    Can you send it to me ?

  4. On 20 May 20200, 7:17 by JBK

    Unfortunately, it is a bit complex…

    But if you have libva working with vainfo running, drop me a mail and I’ll give you the instructions.

  5. On 20 May 20200, 2:34 by animaster

    Hi, I’m interested on this article. Can you explain how can I try the VLC with VAAPI patch?
    I would like to try it on my system. Thanks.