<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 16 juill. 2020 04 h 00, Timtchenko, Michael <<a href="mailto:Michael.Timtchenko@agcocorp.com">Michael.Timtchenko@agcocorp.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 lang="DE" link="#0563C1" vlink="#954F72">
<div class="m_-7323029154952826363WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello guys,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">i’ve encountered a very strange behavior while streaming from a v4l2src to a kmssink (or glimagesink) by using vaapi-components for decoding. The problem is, that the streaming starts for 2 seconds, then freezes for 2
 seconds and continues again for 2 seconds and so on. This effect is only noticeable when using vaapi-components. If I use a pipeline with simply software decoding, the stream is displayed fluently.</span></p></div></div></blockquote></div></div><div dir="auto">Two seconds could be the key frame distance ?</div><div dir="auto"><br></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 lang="DE" link="#0563C1" vlink="#954F72"><div class="m_-7323029154952826363WordSection1"><p class="MsoNormal"><span lang="EN-US">
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">My sending pipeline is constructed as follows:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">gst-launch-1.0 v4l2src io-mode=dmabuf device=/dev/video$(($1+4)) ! video/x-raw,format=YV12,width=720,height=576  ! v4l2h264enc ! rtph264pay ! udpsink host=${IP} port=55555</span></p></div></div></blockquote></div></div><div dir="auto">v4l2h264enc has this extra-controls property that let you genetically change he specific configuration, just an information.</div><div dir="auto"><br></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 lang="DE" link="#0563C1" vlink="#954F72"><div class="m_-7323029154952826363WordSection1"><p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Setting pipeline to PAUSED ...<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Pipeline is live and does not need PREROLL ...<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Setting pipeline to PLAYING ...<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">New clock: GstSystemClock<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Redistribute latency...<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">The erroneous reading pipeline looks like this:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">gst-launch-1.0 udpsrc port=55555 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! vaapih264dec ! vaapipostproc width=720 height=576 ! glimagesink</span></p></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">One thing to note is the absence of rtpjitterbuffer element, which would allow adding some latency to remove network jitter. So that is one thing to try.</div><div dir="auto"><br></div><div dir="auto">Another possibility is that the issue is cause by vaaph264dec having more latency then avdec_h264. Perhaps give the low-latency property a try ?</div><div dir="auto"><br></div><div dir="auto">Let's hope one of these suggestions helps.</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 lang="DE" link="#0563C1" vlink="#954F72"><div class="m_-7323029154952826363WordSection1"><p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Setting pipeline to PAUSED ...<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Pipeline is live and does not need PREROLL ...<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Got context from element 'vaapipostproc0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayDRM\)\ vaapidisplaydrm1";<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Setting pipeline to PLAYING ...<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">New clock: GstSystemClock<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Redistribute latency...<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: from element /GstPipeline:pipeline0/GstKMSSink:kmssink0: A lot of buffers are being dropped.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Additional debug info:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">../libs/gst/base/gstbasesink.c(3005): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstKMSSink:kmssink0:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">There may be a timestamping problem, or this computer is too slow.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">WARNING: from element /GstPipeline:pipeline0/GstKMSSink:kmssink0: A lot of buffers are being dropped.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Additional debug info:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">../libs/gst/base/gstbasesink.c(3005): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstKMSSink:kmssink0:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">There may be a timestamping problem, or this computer is too slow.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">If I run the following pipeline on the same system, the stream is presented fluently without any problems:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US">gst-launch-1. 0 udpsrc
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Monospace;background:#f6f6f6">port=55555 caps=\"application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96\" ! rtph264depay ! avdec_h264 ! decodebin
 ! videoconvert ! kmssink</span><span lang="EN-US" style="font-size:10.0pt;font-family:Monospace"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I’m not sure what exactly the problem is. Maybe the timestamping mechanism in vaapi has a different behavior then in the avdec_h264 as the log message says?  I’ve also changed log levels but I couldn’t find anything helpful.
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Any help for further diagnostics is highly appreciated.
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Kind regards<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Michael<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<br>
<div style="background-color:#ffffff"><br>
<span style="font-size:14pt;font-family:'times new roman','garamond',serif;color:#000000">Bitte beachten / Please note!</span><br>
<div style="font-size:12pt;line-height:10pt;font-family:'times roman',serif"><br>
*******************************************************************************
<p>AGCO GmbH<br>
Sitz der AGCO GmbH: Johann-Georg-Fendt-Str.4, 87616 Marktoberdorf, Germany<br>
Registergericht Amtsgericht Kempten HRB 10327<br>
Geschäftsführer: Christoph Groeblinghoff, Ingrid Bussjaeger-Martin, Dr. Heribert Reiter, Ekkehart Glaeser<br>
Vorsitzender des Aufsichtsrates: Torsten Dehner<br>
</p>
*******************************************************************************
<p>Diese E-Mail ist nur für den Empfänger bestimmt, an den es gerichtet ist und kann vertrauliches<br>
bzw. unter das Berufsgeheimnis fallendes Material enthalten. Jegliche darin enthaltene Ansicht<br>
oder Meinungsäußerung ist die des Autors und stellt nicht notwendigerweise die Ansicht oder<br>
Meinung von AGCO dar. Sind Sie nicht der Empfänger, so haben Sie diese E-Mail irrtümlich
<br>
erhalten und jegliche Verwendung, Veröffentlichung, Weiterleitung, Abschrift oder jeglicher<br>
Druck dieser E-Mail ist strengstens untersagt. Weder AGCO noch der Absender übernehmen die
<br>
Haftung für Viren; es obliegt Ihrer Verantwortung, die E-Mail und deren angehängte
<br>
Dateien (sofern vorhanden) auf Viren zu überprüfen.<br>
</p>
*******************************************************************************
<p>This email is intended solely for the use of the individual to whom it is addressed and may contain<br>
confidential and/or privileged material. Any views or opinions presented are solely those of the<br>
author and do not necessarily represent those of AGCO. If you are not the intended recipient, be<br>
advised that you have received this email in error and that any use, dissemination, forwarding,<br>
printing or copying of this email is strictly prohibited. Neither AGCO nor the sender accepts any<br>
responsibility for viruses and it is your responsibility to scan and virus check the email and its<br>
attachment(s) (if any).<br>
</p>
******************************************************************************* </div>
</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><br>
</blockquote></div></div></div>