<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Any thoughts on this? (see main q's)</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><div class="gmail_default">1. Is RGBA in gstreamer limited to 8bit? If so, I'll need to figure another way</div><div class="gmail_default">2. Otherwise, it seems that there is a hole in the glcolorconvert implementation</div><div class="gmail_default"><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 10, 2022 at 12:17 PM Bill Hofmann <<a href="mailto:bill@theliquidview.com">bill@theliquidview.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks for your suggestion.<br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">That kind of works in general, but I'm running into an issue or two, no doubt for obvious to someone else reasons.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">First off (not burying the lede):</div><div class="gmail_default" style="font-family:verdana,sans-serif">1. Is RGBA in gstreamer limited to 8bit? If so, I'll need to figure another way</div><div class="gmail_default" style="font-family:verdana,sans-serif">2. Otherwise, it seems that there is a hole in the glcolorconvert implementation</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">On Ubuntu 22, Intel 11gen NUC, using KMS/DRM, this graph has terrible performance (~ 4fps), no doubt because of multiple conversions:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font face="monospace">gst-launch-1.0 glvideomixer background=2 name=m ! kmssink connector-id=308 plane-id=31 \</font></div><div class="gmail_default"><font face="monospace">souphttpsrc location="<a href="http://127.0.0.1//foo.m3u8" target="_blank">http://127.0.0.1//foo.m3u8</a>" ! \</font></div><div class="gmail_default"><font face="monospace"> parsebin ! queue ! vaapih265dec ! video/x-raw,format=P010_10LE ! queue max-size-bytes=100663300 ! \</font></div><div class="gmail_default"><font face="monospace"> glupload ! glcolorconvert ! glshader fragment="\"`cat myshader.frag`\"" ! m.</font></div></blockquote><font face="monospace"><br></font><div><div class="gmail_default" style="font-family:verdana,sans-serif">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"</div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace">gst-launch-1.0 glvideomixer background=2 name=m ! video/x-raw,format=P010_10LE  ! kmssink connector-id=308 plane-id=31 \</font></div><div><font face="monospace">souphttpsrc location="<a href="http://127.0.0.1//foo.m3u8" target="_blank">http://127.0.0.1//foo.m3u8</a>" ! \</font></div><div><font face="monospace">parsebin ! queue ! vaapih265dec! queue max-size-bytes=100663300 ! \</font></div><div><font face="monospace">glupload ! glcolorconvert ! glshader fragment="\"`cat myshader.frag`\"" ! m.</font></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">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).</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">(Note the myshader.frag is straight from the glshader docs, just does a copy. First things first.)</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Yours in GL ignorance,</div><div class="gmail_default" style="font-family:verdana,sans-serif">-Bill</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 17, 2022 at 3:08 PM Jeff Shanab <<a href="mailto:jshanab@jfs-tech.com" target="_blank">jshanab@jfs-tech.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>This sounds like a job for a shader. (that is how I did a fade on camera disconnect)</div><div><br></div><div>the shader has a single variable 0 to 100.  0 is stream old and 100 is stream new.</div><div><br></div><div>When value is not 0 or 100 you are in the transition zone.<br></div><div>decode both and pass both pixel values.</div><div>update the value and have it average the scaled pixel values into the new pixel value passed on to the fragment shader.</div><div><br></div><div><br></div><div>Maybe pixel = factor * pixelFromOld + 100-factor * pixelFromNew as factor runs from 100 down to 0</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 17, 2022 at 4:49 PM Bill Hofmann via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">All:</div><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">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.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">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.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Suggestions as to a way to attack this? I can't be the only one...</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">-Bill</div><br></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>