Display a PNG image using gstreamer

Victor Rollinger victor.rollinger at na.denso.com
Thu Jul 9 22:18:00 UTC 2020


I need to display a PNG image using gstreamer.

>From reading the documentation, this command should work:

gst-launch-1.0 -v filesrc location=filename.png ! pngdec ! imagefreeze ! 'video/x-raw,format=(string)YUY2,width=640,height=480,framerate=(fraction)30/1' ! waylandsink

However, when I enter the command, I get the following output on the console:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstPngDec:pngdec0.GstPad:src: caps = video/x-raw, format=(string)RGBA, width=(int)640, height=(int)384, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)0/1
ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data stream error.
Additional debug info:
../../../../git/libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Note that the following command works:

gst-launch-1.0 -v videotestsrc ! 'video/x-raw,format=(string)YUY2,width=640,height=480,framerate=(fraction)30/1' ! waylandsink

How do I display the PNG file without getting the "Internal data stream error"?

Thanks.

Victor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-embedded/attachments/20200709/6ea34c42/attachment.htm>


More information about the gstreamer-embedded mailing list