Difference between revisions of "VLC VAAPI"

From VideoLAN Wiki
Jump to navigation Jump to search
Line 3: Line 3:
 
== Introduction ==
 
== Introduction ==
 
This page is about compiling VLC with support of GPU acceleration on Linux.
 
This page is about compiling VLC with support of GPU acceleration on Linux.
This howto has been written by [[User:J-b|Jean-Baptiste Kempf]].
+
 
 +
This howto has been written by [[User:J-b|Jean-Baptiste Kempf]] and tested with nVidia GPU.
  
 
http://en.wikipedia.org/wiki/Video_Acceleration_API
 
http://en.wikipedia.org/wiki/Video_Acceleration_API

Revision as of 15:25, 8 January 2010

Introduction

This page is about compiling VLC with support of GPU acceleration on Linux.

This howto has been written by Jean-Baptiste Kempf and tested with nVidia GPU.

http://en.wikipedia.org/wiki/Video_Acceleration_API

http://www.freedesktop.org/wiki/Software/vaapi

Before starting

libva

Install libva from http://www.splitted-desktop.com/~gbeauchesne/libva/ . We do not support other libraries than the one from Mr. Beauchesne.

Drivers

nVidia

http://www.splitted-desktop.com/~gbeauchesne/vdpau-video/ for nVidia.

ATI

http://www.splitted-desktop.com/~gbeauchesne/xvba-video/ for ATI.

Run

vainfo

To check if everything works.

FFmpeg trunk

Get the latest FFmpeg trunk as of 2010-January. Compile it with vaapi hwaccel support.

./configure --enable-gpl --enable-postproc --prefix=/path/to/ --enable-shared --enable-vaapi
make
make install

Copy vaapi.h to the includes.

VLC

Get VLC from Git. Get the necessary external libraries (on debian/*buntu: apt-get build-dep vlc)

./bootstrap
./configure
make


Compile VLC with vaapi

Patch VLC with http://vlc.pastebin.com/f59445620

Reconfigure VLC.

Edit vlc-config and add

-lX11 -lva-x11

to the avcodec line.

Mine looks like this:

avcodec)
     cflags="${cflags} -I/home/jb/VideoLAN/vlc/vlc/extras/ffmpeg"
     libs="${libs} /home/jb/vlc/extras/ffmpeg/libavcodec/libavcodec.a /home/jb/vlc/extras/ffmpeg/libavutil/libavutil.a -lz -lm -lva -ldl -ljack -lasound -lm -lX11 -lva-x11"

Recompile VLC

make clean && make

Check

That everything went ok:

./vlc --list | grep avcodec

should return something.

Activate

Activate acceleration in the preferences.

Profit