Decoding video in VLC using VAAPI and nVidia
By JBK on Sunday, April 19 2009, 22:51 - VideoLAN - Permalink
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:
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

Comments
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.
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.
I do have a libva working on my system, and I’m interested in your patch.
Can you send it to me ?
Well, patch is integrated in VLC 1.1-git.
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!