Change position with a dissolve

Bill Hofmann bill at
Wed Aug 10 19:17:33 UTC 2022

Thanks for your suggestion.

That kind of works in general, but I'm running into an issue or two, no
doubt for obvious to someone else reasons.

First off (not burying the lede):
1. Is RGBA in gstreamer limited to 8bit? If so, I'll need to figure another
2. Otherwise, it seems that there is a hole in the glcolorconvert

On Ubuntu 22, Intel 11gen NUC, using KMS/DRM, this graph has terrible
performance (~ 4fps), no doubt because of multiple conversions:

gst-launch-1.0 glvideomixer background=2 name=m ! kmssink connector-id=308
plane-id=31 \
souphttpsrc location="" ! \
 parsebin ! queue ! vaapih265dec ! video/x-raw,format=P010_10LE ! queue
max-size-bytes=100663300 ! \
 glupload ! glcolorconvert ! glshader fragment="\"`cat myshader.frag`\"" !

Attempting to keep the conversion til later, this graph fails with the
error "gstglcolorconvert.c:2656:_init_convert:<glcolorconvert2> Don't know
how to convert from RGBA to P010_10LE"

gst-launch-1.0 glvideomixer background=2 name=m !
video/x-raw,format=P010_10LE  ! kmssink connector-id=308 plane-id=31 \
souphttpsrc location="" ! \
parsebin ! queue ! vaapih265dec! queue max-size-bytes=100663300 ! \
glupload ! glcolorconvert ! glshader fragment="\"`cat myshader.frag`\"" ! m.

Now, looking at gstglcolorconvert.c and at the glconvert element in
general, it seems that while documentation (and caps negotiation) says that
this conversion should be supported, the actual implementation doesn't
support it (in _RGB_to_YUV). That said, also, I realize that the RGBA
format is likely 8 bit, which would mean that this just wouldn't work for
me (I'm delivering 10b HEVC video here).

(Note the myshader.frag is straight from the glshader docs, just does a
copy. First things first.)

Yours in GL ignorance,

On Fri, Jun 17, 2022 at 3:08 PM Jeff Shanab <jshanab at> wrote:

> This sounds like a job for a shader. (that is how I did a fade on camera
> disconnect)
> the shader has a single variable 0 to 100.  0 is stream old and 100 is
> stream new.
> When value is not 0 or 100 you are in the transition zone.
> decode both and pass both pixel values.
> update the value and have it average the scaled pixel values into the new
> pixel value passed on to the fragment shader.
> Maybe pixel = factor * pixelFromOld + 100-factor * pixelFromNew as factor
> runs from 100 down to 0
> On Fri, Jun 17, 2022 at 4:49 PM Bill Hofmann via gstreamer-devel <
> gstreamer-devel at> wrote:
>> All:
>> I'm looking to be able to set position forward or backward (say, 5
>> minutes, just for an example), but rather than a "hard cut", instead to do
>> a 5 second dissolve.  That, to me, implies keeping 5 seconds of frames
>> after the original position, and doing a ramped blend with frames from the
>> new position. Or something like that.
>> What's the best approach? I looked at the GstEdit functionality, but that
>> seemed way overblown for what I need. Can imagine a way using the
>> compositor, but I'd think I'd need a copy of the stream running in parallel
>> (and switching back and forth). Could also do a custom filter in the path
>> that queues the frames, maybe.
>> Suggestions as to a way to attack this? I can't be the only one...
>> -Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list