<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">Hello Anton,</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">The RTSP media is coming as separate RTP streams for each video and audio. They must be having only usual RTP parameters like timestamp, sequence number and payload type.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">That too RTP timestamps are initialized randomly as per standard, so the timestamps on video and audio streams have no relation at all.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">If you are planning to read the time using some OCR software from the video frame, then you will have to decode H.264 and the typical granularity is 1sec.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">Are you using the "format-location" callback signal in splitmuxsink with which you can generate custom filenames with timestamp and any prefix. It is not available on gst-launch, but it is definitely available on C and Python.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">Thanks and Regards</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">Anand</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 17 Jul 2023 at 15:36, Антон Шаров via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</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><div> </div><div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Hi.</div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">I’m given rtsp stream from camera, where each frame has capturing timestamp.</div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Connection strin looks like rtsp://{usr}:{pwd{@ip_addr/onvif/media?profile=Profile1</div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">I need to store this data for some time and provide search access for this data, either return closest (exact) frame for provided timestamp or return mp4 file which containts this closest frame. My first pipeline is <span>rtsp ! h264depay ! h264parse ! splitmuxsink location=… max-time-size=10seconds (for example), when I save new file via splitmuxsink, I’m some how need to get camera timestamp</span></div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span>for first frame of video (or key frame) and maybe store this mp4 file as timestamp.mp4 (or save ts for later in some db, for example).</span></div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Other approach is to use jpegenc and to store each frame with it’s timestamp, but I don’t know how to obtain timestamp for jpeg buffer (rtsp ! decodebin ! jpegenc ! appsink). But I assume that this won’t be effective solution in terms of CPU and storage usage, and better to store mp4 files.</div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">So, in both cases I don’t know how to get reference-timestamp-meta for needed buffer.</div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Can someone help me? </div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">PS: I use C# wrapper, namely gstreamer-sharp, but I don’t think it is relevant for this problem.</div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="background-color:rgb(255,255,255);color:rgb(44,45,46);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:15px;font-style:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-weight:400;letter-spacing:normal;text-align:start;text-decoration-color:initial;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Thanks in advance.</div></div><div> </div><div><div><div>--<br>С Уважением,<br>Шаров Антон</div></div></div></div>
</blockquote></div>