displaying format=(string)GRAY8 on ximagesink
Josh Doe
josh at joshdoe.com
Wed Apr 22 19:13:55 UTC 2020
On Wed, Apr 22, 2020 at 1:02 PM Erik Rull <erik.rull at rdsoftware.de> wrote:
> I was struggling with some shm src / sink issues and found out that the
> ximagesink sink does not seem to support 8 bit gray images.
>
> What do I have to do to get the video displayed?
> I see that the frames are there due to a identity that I check for
> arriving items...
>
> If I convert everything to BGRx I get the frames. But I don't want to
> waste that
> much bandwidth. Also several videoconverts before it do not help.
>
> The section of the pipeline looks like this:
>
> shmsrc socket-path=/tmp/pad_shm is-live=1 !
>
> video/x-raw,format=(string)GRAY8,framerate=(fraction)8/1,pixel-aspect-ratio=(fraction)1/1,interlace-mode=(string)progressive,width=401,height=404
> ! videoconvert ! identity name=identity ! ximagesink
> max-lateness=500000000
>
> the part before comes from an appsrc which generates proper 8 bit frames:
> appsrc name=src stream-type=0 is-live=1 max-bytes=10000000
> caps=video/x-raw,format=(string)GRAY8,framerate=8/1,width=401,height=404 !
> shmsink render-delay=0 socket-path=/tmp/pad_shm shm-size=10000000
> wait-for-connection=0 max-lateness=500000000 buffer-time=0
You don't exactly say what the result is with your current pipeline. Have
you tried substituting "avimux ! filesink location=test.mp4" or similar for
ximagesink to see what you're getting?
I ran your pipelines but with videotestsrc instead of appsink, and it works
fine. Only thing I can see going on is that your appsrc isn't actually
producing data as GRAY8, 401x404. Also, are you padding the rows to
404x404? GStreamer assumes widths are multiples of 4-bytes, so you'll need
to pad rows with three pixels.
-Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200422/86e22be0/attachment.htm>
More information about the gstreamer-devel
mailing list