Change position with a dissolve

Bill Hofmann bill at theliquidview.com
Mon Aug 29 19:32:21 UTC 2022


Any thoughts on this? (see main q's)

1. Is RGBA in gstreamer limited to 8bit? If so, I'll need to figure another
way
2. Otherwise, it seems that there is a hole in the glcolorconvert
implementation


On Wed, Aug 10, 2022 at 12:17 PM Bill Hofmann <bill at theliquidview.com>
wrote:

> 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 way
> 2. Otherwise, it seems that there is a hole in the glcolorconvert
> implementation
>
> 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="http://127.0.0.1//foo.m3u8" ! \
>  parsebin ! queue ! vaapih265dec ! video/x-raw,format=P010_10LE ! queue
> max-size-bytes=100663300 ! \
>  glupload ! glcolorconvert ! glshader fragment="\"`cat myshader.frag`\"" !
> m.
>
>
> 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="http://127.0.0.1//foo.m3u8" ! \
> 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,
> -Bill
>
>
>
>
> On Fri, Jun 17, 2022 at 3:08 PM Jeff Shanab <jshanab at jfs-tech.com> 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 lists.freedesktop.org> 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: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220829/d3de3da0/attachment.htm>


More information about the gstreamer-devel mailing list