Encoding a DMABuf into a video stream with VAAPI

z0Kng xaterus at gmail.com
Tue Feb 21 14:25:15 UTC 2023


Hi,
Also thank you for the quick reply.

Am Mo., 20. Feb. 2023 um 19:49 Uhr schrieb Nicolas Dufresne
<nicolas at ndufresne.ca>:
> I'm a bit unclear what you mean, is it 0 / LINEAR or I915_FORMAT_MOD_X_TILED ?
Yes I described that inaccurately.
The first few seconds the modifier is linear, then it changes to
I915_FORMAT_MOD_X_TILED.
That I can encode I915_FORMAT_MOD_X_TILED is more important.


> The data is in RGB and the encoders only support YUV, so you must apply a conversion to the buffers anyway. You should be using vaapipostproc (or vapostproc) to adapt using hardware acceleration. Note that you don't need the dmabuf caps feature if you have linear buffers. The GstDmabufAllocator utility will wrap your dmabuf and implement CPU mapping in case it would be the only option.

Ok, but most of the time I will have I915_FORMAT_MOD_X_TILED, so would
it be possible without cpu mapping?

> Very strange size formula, should be just "dmabuf->height * dmabuf->stride".
Ok thanks, I have changed that.

> I think are using work-in-progress drm-modifier branch. I think the plan is to ignore the old vaapi plugin, and only implement this for the new VA plugin (just try and replace every vaapi* element into va* names).

I will try to switch to VA. The only problem I have is that the Ubuntu
package manager only has gst-plugins-bad 1.20.3. And there do not seem
to be any encoders included.

Best regards
Michael


More information about the gstreamer-devel mailing list