This document is deprecated. Seevaapi.md instead.
Hardware acceleration of video decode on Linux isunsupported in Chrome for user-facing builds. During development (targeting other platforms) it can be useful to be able to trigger the code-paths used on HW-accelerated platforms (such as CrOS and win7) in a linux-based development environment. Here's one way to do so, with details based on a gprecise setup.
Install pre-requisites: On Ubuntu Precise, at least, this includes:
sudo apt-get install libtool libvdpau1 libvdpau-dev
Install and configurelibva
DEST=${HOME}/apps/libvacd/tmpgit clone git://anongit.freedesktop.org/libvacd libvagit reset--hard libva-1.2.1./autogen.sh&&./configure--prefix=${DEST}make-j32&& make install
Install and configure theVDPAU VAAPI driver
DEST=${HOME}/apps/libvacd/tmpgit clone git://anongit.freedesktop.org/vaapi/vdpau-drivercd vdpau-driverexport PKG_CONFIG_PATH=${DEST}/lib/pkgconfig/:$PKG_CONFIG_PATHexport LIBVA_DRIVERS_PATH=${DEST}/lib/driexport LIBVA_X11_DEPS_CFLAGS=-I${DEST}/includeexport LIBVA_X11_DEPS_LIBS=-L${DEST}/libexport LIBVA_DEPS_CFLAGS=-I${DEST}/includeexport LIBVA_DEPS_LIBS=-L${DEST}/libmake distcleanunset CC CXX./autogen.sh&&./configure--prefix=${DEST}--enable-debugfind.-nameMakefile|xargs sed-i'sI/usr/lib/xorg/modules/driversI${DEST}/lib/driIg'sed-i-e's/_(\(VAEncH264VUIBufferType\|VAEncH264SEIBufferType\));//' src/vdpau_dump.cmake-j32&& rm-f ${DEST}/lib/dri/{nvidia_drv_video.so,s3g_drv_video.so}&& make install
Add to args.gn:
target_os = "chromeos"
to link inVaapiVideoDecodeAccelerator
proprietary_codecs = true
andffmpeg_branding = "Chrome"
to allow Chrome to play h.264 content, which is the only codec VAVDA knows about today.Rebuild chrome
Run chrome withLD_LIBRARY_PATH=${HOME}/apps/libva/lib
in the environment, and with the--no-sandbox
command line flag.
If things don‘t work, a Debug build (to include D*LOG’s) with--vmodule=*content/common/gpu/media/*=10,gpu_video*=1
might be enlightening.
** note NOTE THIS IS AN UNSUPPORTED CONFIGURATION AND LIKELY TO BE BROKEN AT ANY POINT IN TIME **
This page is purely here to help developers targeting supported HW<video>
decode platforms be more effective. Do not expect help if this setup fails to work.