<div dir="auto"><div>Hi,<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le dim. 27 août 2023, 19 h 15, Andrey Sotnikov via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>

  

    
  
  <div style="padding-bottom:1px">
    Hi, dear GStreamer community,<br>
    <br>
    My company manufactures cameras. I am trying to create an
    application that shares the data from these cameras over RTSP. Here
    is the launch string for GstRTSPMediaFactory: "( appsrc
    name=ourcamera ! queue ! x265enc speed-preset=5 tune=4
    option-string=colormatrix=gbr:lossless=true ! rtph265pay name=pay0
    pt=96 )".<br>
    <br>
    It turned out I must assign a timestamp zero to the first GstBuffer
    I send down this pipeline. Otherwise, if I assign a timestamp x
    seconds to the first GstBuffer, videoencoder will force appsink0
    (added by RTSPClient) to wait for x seconds before sending the data.<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">You should enable </div><h3><i>handle-segment-change</i></h3><div dir="auto"><i><br></i></div><div dir="auto"><i>Property. The push GstSample and set the GstSegment structure with the appropriate start timestamp. This way GStreamer will translate the timestamp to appropriate time without you having to retimestamp (hense removing the need for shallow copy)</i></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 style="padding-bottom:1px">
    <br>
    It means that if I have several connections to the RTSP server, I
    cannot send the same frame down all their pipelines, I have to make
    multiple copies of GstBuffer, just to be able to assign different
    timestamps.<br>
    <br>
    Is this first timestamp delay a bug in GStreamer, or is this
    intentional? If this is intentional, is there a way to avoid
    multiple copies of the same frame?<br>
    <br>
    Thank you.<br>
    Andrey.<br>
  </div>
  <u></u><u></u>

</blockquote></div></div></div>