Specify device to gstreamer VAAPI

Víctor Jáquez vjaquez at igalia.com
Mon Jul 16 11:37:37 UTC 2018


On Mon, 16 Jul 2018 at 02:36, RiccardoCagnasso wrote:
> I made a couple of tests. 
> Using vaapi i965 driver on a pc with a Nvidia quadro connected to the
> monitor, i need to add --display=drm to vainfo to read the capabilities of
> the graphic card. No --device seems to be required. But gst-launch filesrc !
> demux ! vaapidecodebin ! vaapisink display=drm doesn't really work (creates
> a windows but no video on it)

Actually it shouldn't create a window at all.

As your display is not connected to the decoding and rendering card, all the
rendering should be done off-screen. That's called headless.

You could do this

LIBVA_DRIVER_NAME=i965 gst-launch filesrc ! demux ! vaapidecodebin ! xvimagessink

That will force to use the i965 driver, which in you system is only accessible
through DRM, not the windowing system.

That would decode the frames in the intel card, and later each frame will be
copied onto the nvidia card.

>
> With vaapi iHD driver (https://github.com/intel/media-driver) vainfo doesn't
> require --display=drm (odd). gst-launch filesrc ! demux ! vaapidecodebin !
> vaapisink display=drm or gst-launch filesrc ! demux ! vaapidecodebin !
> vaapisink doesn't work (doesn't create a window) but gst-launch filesrc !
> demux ! vaapidecodebin ! xvimagesink works, albeit choppy on anything more
> than 1080p.

iHD driver is a new driver, for being used by MediaSDK. AFAIK, it doesn't
provide any rendering support, thus vaapisink isn't expected to work.

And iHD works, --again-- AFAIK, using only DRM, not the windowing system. That's
is why it works, and work choppy, because of the memcopy, since the intel card
and the nvidia card doesn't share memory areas.

Now, could try to use glimagesink, and trying to use dmabuf sharing mechanisms
among those cards, but that's uncharted territory.

vmjl


More information about the gstreamer-devel mailing list