Encoding a DMABuf into a video stream with VAAPI

z0Kng xaterus at gmail.com
Tue Feb 21 14:03:44 UTC 2023


Hello,

Thanks for the quick reply.

Am Mo., 20. Feb. 2023 um 19:45 Uhr schrieb Victor Jaquez via
gstreamer-devel <gstreamer-devel at lists.freedesktop.org>:
>
> I don't follow, the modifier is 0 or I915_FORMAT_MOD_X_TILED??

I'm sorry I should have explained that better.
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.

> Right now, no drm modifier is negotiated. There are on-going efforts in this
> direction, but they aren't finished yet.

Is it nevertheless possible to encode I915_FORMAT_MOD_X_TILED?


> What version of gstreamer-vaapi are you using?
1.20.1-1ubuntu1

> Right now it support dmabuf as input. But also, it would be better if you can
> use vah264enc/vah264enc in gst-plugins-bad which will replace those in
> gstreamer-vaapi.

Am I correct in assuming that I would need version 1.22 of gst-plugins-bad ?
I'll have to see how I can do that since the ubuntu packagemanager is
still on 1.20.3-1ubuntu6


> Why not? They should link.  A debug log would be needed.


Using launch string: appsrc name=source !
video/x-raw(memory:DMABuf),width=1024,height=768,framerate=0/1,format={BGRx,BGRx:0x0100000000000001}
!  vaapipostproc ! vaapih264enc ! h264parse ! mp4mux ! filesink
location=test.mp4
0:00:00.193572609 43064 0x555556c59e70 ERROR           GST_PIPELINE
gst/parse/grammar.y:758:gst_parse_perform_link: could not link source
to vaapipostproc0, vaapipostproc0 can't handle caps
video/x-raw(memory:DMABuf), width=(int)1024, height=(int)768,
framerate=(fraction)0/1, format=(string){ BGRx,
BGRx:0x0100000000000001 }
0:00:00.196454953 43064 0x555557221860 WARN              aggregator
gstaggregator.c:2099:gst_aggregator_query_latency_unlocked:<mp4mux0>
Latency query failed
0:00:00.196595319 43064 0x555556c59e70 WARN             vaapifilter
gstvaapifilter.c:1373:gst_vaapi_filter_set_property:<vaapifilter0> VA
display doesn't support VPP
0:00:00.197414802 43064 0x555556dfa240 FIXME                default
gstutils.c:4025:gst_pad_create_stream_id_internal:<source:src>
Creating random stream-id, consider implementing a deterministic way
of creating a stream-id

But I will try to switch to VA and report back.

Best regards
Michael


More information about the gstreamer-devel mailing list