<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 9, 2020 at 3:18 PM Victor Rollinger <<a href="mailto:victor.rollinger@na.denso.com">victor.rollinger@na.denso.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 lang="EN-US">
<div class="gmail-m_8627991138803359118WordSection1">
<p class="MsoNormal">I need to display a PNG image using gstreamer.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">From reading the documentation, this command should work:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">However, when I enter the command, I get the following output on the console:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Setting pipeline to PAUSED ...<u></u><u></u></p>
<p class="MsoNormal">Pipeline is PREROLLING ...<u></u><u></u></p>
<p class="MsoNormal">/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<u></u><u></u></p>
<p class="MsoNormal">ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data stream error.<u></u><u></u></p>
<p class="MsoNormal">Additional debug info:<u></u><u></u></p>
<p class="MsoNormal">../../../../git/libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:<u></u><u></u></p>
<p class="MsoNormal">streaming stopped, reason not-negotiated (-4)<u></u><u></u></p>
<p class="MsoNormal">ERROR: pipeline doesn't want to preroll.<u></u><u></u></p>
<p class="MsoNormal">Setting pipeline to NULL ...<u></u><u></u></p>
<p class="MsoNormal">Freeing pipeline ...<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Note that the following command works:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">gst-launch-1.0 -v videotestsrc ! 'video/x-raw,format=(string)YUY2,width=640,height=480,framerate=(fraction)30/1' ! waylandsink<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">How do I display the PNG file without getting the “Internal data stream error”?</p></div></div></blockquote><div><br></div><div>Hi, the error mentions "not-negotiated" and this means something along your pipeline have incompatible formats. If you check the output caps from pngdec you can see that the format it outputs is RGBA and it has a different height than the capsfilter you are using before waylandsink.</div><div><br></div><div>I'd suggest that you either:<br></div><div>1) Update your capsfilter to the expected values coming out of pngdec (assuming wayland sink can handle it and that you can predict it for your input)</div><div>2) Add more elements to the conversions to the format you like before it reaches your capsfilter. You need a videoscale to update the height to what you want as well as a videoconvert for converting between RGBA and YUY2 that you specified. This makes your pipeline more robust and able to handle different input sizes and formats, at the cost of possible extra operations on your images. If you add them before imagefreeze they will be done only on the original image and it shouldn't matter much.<br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_8627991138803359118WordSection1"><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Victor<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
_______________________________________________<br>
gstreamer-embedded mailing list<br>
<a href="mailto:gstreamer-embedded@lists.freedesktop.org" target="_blank">gstreamer-embedded@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-embedded" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-embedded</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Thiago Sousa Santos</div></div>