Re: Get camera timestamp from rtsp stream.

Jeff Shanab via gstreamer-devel <[email protected]>
Newsgroups gmane.comp.video.gstreamer.devel
Message-ID <CAM09syrvVS4kH1GZdawQqtAY4TEras6EkV3xmX=Loiq0R6Mjvw@mail.gmail.com>
I believe he is referring to the originator timestamp that is part of the
onvif standard and once triggered int he rtsp conversation finds it's way
into rtp-header extensions. GStream has support for this feature in a
plugin last I saw.

On Wed, Jul 19, 2023 at 5:37 AM Anand Sivaram via gstreamer-devel <
[email protected]> wrote:

> Hello Anton,
>
> 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.
> That too RTP timestamps are initialized randomly as per standard, so the
> timestamps on video and audio streams have no relation at all.
> 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.
>
> 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.
>
> Thanks and Regards
>
> Anand
>
>
> On Mon, 17 Jul 2023 at 15:36, Антон Шаров via gstreamer-devel <
> [email protected]> wrote:
>
>>
>> Hi.
>>
>> I’m given rtsp stream from camera, where each frame has capturing
>> timestamp.
>> Connection strin looks like rtsp://{usr}:{pwd{@ip_addr
>> /onvif/media?profile=Profile1
>> 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  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
>> 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).
>>
>> 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.
>>
>> So, in both cases I don’t know how to get reference-timestamp-meta for
>> needed buffer.
>>
>> Can someone help me?
>>
>> PS: I use C# wrapper, namely gstreamer-sharp, but I don’t think it is
>> relevant for this problem.
>>
>> Thanks in advance.
>>
>> --
>> С Уважением,
>> Шаров Антон
>>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.