Compositor sometimes doesn't accept formats with alpha?

Florian Echtler floe at butterbrot.org
Mon May 23 07:08:46 UTC 2022


Hello everyone,

I'm trying to optimize a large pipeline and thought I could get rid of one 
videoconvert step. The sub-pipeline I've focused on looks as follows:

alpha -> tee --> compositor -> capsfilter -> queue -> videoconvert -> [encoder]
alpha -> tee /
[...]

So far, the capsfilter behind the compositor is forcing format=AYUV as output. 
But since the alpha channel is never used again, I thought I could just have the 
compositor directly output I420 and feed that into the encoder without having to 
do another conversion.

However, when I change the capsfilter to format=I420, I'm suddenly getting 
GST_PAD_LINK_NOFORMAT errors when connecting the tees to the compositor. Looking 
at the caps in more detail, what the compositor accepts on its sink_%u pads is

format=(string){ Y444, Y42B, YUY2, UYVY, YVYU, I420, YV12, NV12, NV21, Y41B, 
RGB, BGR, xRGB, xBGR, RGBx, BGRx }

when I have I420 as output format, but it is

format=(string){ AYUV, BGRA, ARGB, RGBA, ABGR, Y444, Y42B, YUY2, UYVY, YVYU, 
I420, YV12, NV12, NV21, Y41B, RGB, BGR, xRGB, xBGR, RGBx, BGRx }

when I have AYUV as output format. This is rather counterintuitive for me - the 
whole point of the compositor is that it should always be able to handle alpha 
channels on the input pads?

I've tested on 1.16.4 and 1.20.1, and the same issue appears in both cases.

Any suggestions welcome!

Best, Florian
-- 
SENT FROM MY DEC VT50 TERMINAL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220523/c76b44fc/attachment.sig>


More information about the gstreamer-devel mailing list