<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"Yu Gothic";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@Yu Gothic";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Iam streaming video data via RTSP with gstreamer on a nvidia-jetson board with the following pipeline:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-family:Consolas;color:#525252;letter-spacing:.1pt;background:#F8F8F8">./test-launch -p 8554 "nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM),width=1024, height=768, framerate=10/1,
 format=NV12 ! nvv4l2h264enc ! h264parse ! rtph264pay name=pay0 pt=96"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">When I film the boards “Eigenzeit” from a UART terminal with the camera and compare this filmed time against the received RTP timestamp the received RTP timestamp is 300ms younger than the filmed “Eigenzeit”. At
<a href="https://github.com/GStreamer/gst-plugins-good/tree/master/gst/rtp">https://github.com/GStreamer/gst-plugins-good/tree/master/gst/rtp</a> I read about timestamping on the sender side that this is performed using the following formular:<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="font-size:9.0pt;font-family:Consolas;color:#24292F">          RTP = ((RT - RT-base) * clock-rate / GST_SECOND) + RTP-offset<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Further reading the README is mentioning this example:<o:p></o:p></span></p>
<pre style="margin-left:35.4pt;background:white"><span lang="EN-US" style="font-size:9.0pt;font-family:Consolas;color:#24292F">Some pipelines to illustrate the process:<o:p></o:p></span></pre>
<pre style="margin-left:35.4pt;background:white"><span lang="EN-US" style="font-size:9.0pt;font-family:Consolas;color:#24292F"><o:p> </o:p></span></pre>
<pre style="margin-left:35.4pt;background:white"><span lang="EN-US" style="font-size:9.0pt;font-family:Consolas;color:#24292F">    gst-launch-1.0 v4l2src ! videoconvert ! avenc_h263p ! rtph263ppay ! udpsink<o:p></o:p></span></pre>
<pre style="margin-left:35.4pt;background:white"><span lang="EN-US" style="font-size:9.0pt;font-family:Consolas;color:#24292F"><o:p> </o:p></span></pre>
<pre style="margin-left:35.4pt;background:white"><span lang="EN-US" style="font-size:9.0pt;font-family:Consolas;color:#24292F">  v4l2src puts a GStreamer timestamp on the video frames base on the current<o:p></o:p></span></pre>
<pre style="margin-left:35.4pt;background:white"><span lang="EN-US" style="font-size:9.0pt;font-family:Consolas;color:#24292F">  running_time. The encoder encodes and passed the timestamp on. The payloader<o:p></o:p></span></pre>
<pre style="margin-left:35.4pt;background:white"><span lang="EN-US" style="font-size:9.0pt;font-family:Consolas;color:#24292F">  generates an RTP timestamp using the above formula and puts it in the RTP<o:p></o:p></span></pre>
<pre style="margin-left:35.4pt;background:white"><span lang="EN-US" style="font-size:9.0pt;font-family:Consolas;color:#24292F">  packet. It also copies the incoming GStreamer timestamp on the output RTP<o:p></o:p></span></pre>
<pre style="margin-left:35.4pt;background:white"><span lang="EN-US" style="font-size:9.0pt;font-family:Consolas;color:#24292F">  packet. udpsink synchronizes on the gstreamer timestamp before pushing out the<o:p></o:p></span></pre>
<pre style="margin-left:35.4pt;background:white"><span lang="EN-US" style="font-size:9.0pt;font-family:Consolas;color:#24292F">  packet. <o:p></o:p></span></pre>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">So if I’m not mistaken this is the reason for the delay of 300ms (= pipeline latency) I’m experiencing. However in my use-case I need a timestamp which is not depending on the pipeline latency. I want to have a timestamp
 received via the network that is jitter free and independent of any running time of the pipeline. Is RTP then maybe for my use-case? Or if I can use RTP how I can get the pipeline to produce / generate a RTP timestamp  which is independent of the pipelines
 runtime?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks in advance for any help on this issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Steve<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">P.S. Iam not on the mailing list, so please don’t forget to CC: me, thanks
</span><span lang="EN-US" style="font-family:"Segoe UI Emoji",sans-serif">😊</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:black;background:white">Best regards,</span><span lang="EN-US" style="background:white"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="background:white"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Steve Kreyer<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-----------------------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Senior Software Development Engineer<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">PMC45<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US">Vector Informatik GmbH</span></b><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Visitor address: Holderäckerstraße 36 | 70499 Stuttgart | Germany<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Tel.: +49 711 80670-4274 <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="mailto:steve.kreyer@vector.com"><span style="color:blue">steve.kreyer@vector.com</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><a href="http://www.vector.com/"><span lang="EN-US" style="color:blue">www.vector.com</span></a><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt">Registered Office: Ingersheimer Str. 24 | 70499 Stuttgart<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt">Commercial Register: Amtsgericht Stuttgart | HRB 17317
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt">Managing Directors: </span><span lang="EN-US" style="font-size:9.0pt">Dr. Thomas Beck, Dr. Stefan Krauß, Thomas Riegraf<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-----------------------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>