<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 7 août 2019 04 h 10, Guillermo Rodriguez Garcia <<a href="mailto:guille.rodriguez@gmail.com">guille.rodriguez@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Nicolas,</div><div><br></div><div>El mié., 7 ago. 2019 a las 3:54, Nicolas Dufresne (<<a href="mailto:nicolas@ndufresne.ca" target="_blank" rel="noreferrer">nicolas@ndufresne.ca</a>>) escribió:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Le mardi 06 août 2019 à 10:54 +0200, Guillermo Rodriguez Garcia a<br>
écrit :<br>
> Hello all,<br>
> <br>
> I am trying to decode a live mjpeg stream from an IP camera using souphttpsrc ! multipartdemux ! avdec_ffmpeg, but I get not-negotated errors:<br>
> <br>
> 0:00:01.216966334   326   0xaba920 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<souphttpsrc0> error: Internal data stream error.<br>
> 0:00:01.217129000   326   0xaba920 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<souphttpsrc0> error: streaming stopped, reason not-negotiated (-4)<br>
> ERROR: from element /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0: Internal data stream error. <br>
> <br>
> If I add jpegparse between multipartdemux and avdec_ffmpeg, then all works fine.<br>
> <br>
> But, once I add jpegparse, do I need multipartdemux at all ? souphttpsrc ! jpegparse ! avdec_ffmpeg *also* seems to work fine. Is there any reason to keep multipartdemux then?<br>
<br>
jpegparse is able to skip over corruption in between jpeg files, in<br>
this case the multipart stuff. If you look at the templates,<br>
avdec_mjpeg requires the field parsed=TRUE in the caps. That field is<br>
used to indicate an already parsed (aka framed) jpeg stream. This is<br>
needed as this element does not have a internal parser, unlike jpegdec.<br>
Ideally there should be a way to get this field out of multipartdemux<br>
if the content is frames, but I'm not familiar enough to give more<br>
advise.<br></blockquote><div><br></div><div>OK so jpegparse con handle the "demux" part by skipping over the "garbage" between frames (the multipart headers).</div><div>It would then seem that multipartdemux is unnecessary if jpegparse is used.</div><div><br></div><div>Or is there any advantage in keeping it? (for example, would it be more reliable, or perhaps faster?)</div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I don't have numbers to support it, but performance should be better if you keep it.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> <br>
> Moreover, if I replace avdec_ffmpeg with jpegdec, then I don't seem to need neither multipartdemux nor jpegparse; I can just have souphttpsrc ! jpegdec and that seems to work as well...<br>
<br>
jpegdec element has an internal parser. Note that it will be slower if<br>
you pass random data then if you use multipartdemux.<br></blockquote><div><br></div><div>I understand. Does the same also apply to jpegparse? (i.e. is it slower in skipping over the garbage than if I use multipartdemux?)</div><div><br></div><div>How does jpegdec compare to avdec_ffmpeg? Which one is recommended? Any known drawbacks?</div><div><br></div><div>Thank you,</div><div><br></div><div>Guillermo Rodriguez Garcia<br></div></div><div dir="ltr" class="m_-3976519027881712053gmail_signature"><a href="mailto:guille.rodriguez@gmail.com" target="_blank" rel="noreferrer">guille.rodriguez@gmail.com</a></div></div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div></div></div>