Hello,
I am running Jetpack 4.6 and L4T 32.6.1.
I am using gstreamer and the nvarguscamerasrc plugin to create a stream and I would like to get absolute timestamps in my gstreamer pipeline. But the PTS timestamp doesn’t make sense.
Here’s how I test it :
gst-launch-1.0 -v nvarguscamerasrc sensor-id=0 ! fakesink silent=false
Here’s the output :
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: stream-start (10254), GstEventStreamStart, stream-id=(string)a37df85956a2cf47c52a834621cb9809, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)1;) 0x55b48bd5d0
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: caps (12814), GstEventCaps, caps=(GstCaps)"video/x-raw\(memory:NVMM\)\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ format\=\(string\)NV12\,\ framerate\=\(fraction\)30/1";) 0x55b48bd640
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1920 x 1080 FR = 29,999999 fps Duration = 33333334 ; Analog Gain range min 1,000000, max 31,622776; Exposure Range min 59000, max 33333000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 1920 H = 1080
seconds to Run = 0
Frame Rate = 29,999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event ******* (fakesink0:sink) E (type: segment (17934), GstEventSegment, segment=(GstSegment)"GstSegment, flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, base=(guint64)0, offset=(guint64)0, start=(guint64)0, stop=(guint64)18446744073709551615, time=(guint64)0, position=(guint64)0, duration=(guint64)18446744073709551615;";) 0x55b48bd6b0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = preroll *******
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (1008 bytes, dts: 0:00:01.665492543, pts: 0:00:01.665492543, duration: none, offset: -1, offset_end: -1, flags: 00000040 discont , meta: none) 0x7f7800a080
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (1008 bytes, dts: 0:00:01.696078377, pts: 0:00:01.696078377, duration: none, offset: -1, offset_end: -1, flags: 00000000 , meta: none) 0x7f7800a190
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (1008 bytes, dts: 0:00:01.729442996, pts: 0:00:01.729442996, duration: none, offset: -1, offset_end: -1, flags: 00000000 , meta: none) 0x7f7800a2a0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (1008 bytes, dts: 0:00:01.762407295, pts: 0:00:01.762407295, duration: none, offset: -1, offset_end: -1, flags: 00000000 , meta: none) 0x7f7800a3b0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (1008 bytes, dts: 0:00:01.795593962, pts: 0:00:01.795593962, duration: none, offset: -1, offset_end: -1, flags: 00000000 , meta: none) 0x7f7800a4c0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain ******* (fakesink0:sink) (1008 bytes, dts: 0:00:01.828735989, pts: 0:00:01.828735989, duration: none, offset: -1, offset_end: -1, flags: 00000000 , meta: none) 0x7f7800a5d0
[...]
I understood that the pts timestamp should contain the absolute timestamp at which the frame was captured, but here it starts at zero. Is it normal ?
If so, how can I get the absolute timestamp ?
Thanks for your help !