Hello, I have a question about how different PTS values are handled in the nvv4l2decoder
element on the following setup:
Platform: Jetson NX Xavier
L4T: R35.5.0
Deepstream: 6.3
We are working with cameras with a non-constant frame rate. The following example illustrates the buf.pts
BEFORE and AFTER nvv4l2decoder
.
PTS Before NvDec | PTS After NvDec |
---|---|
0.5 | 0.5 |
1 | 1 |
1.5 | 1.5 |
2 | 2 |
GST_CLOCK_TIME_NONE | 2.5 |
GST_CLOCK_TIME_NONE | 3 |
GST_CLOCK_TIME_NONE | 3.5 |
2.2 | 3.5 |
2.5 | 3.5 |
In the table I am trying to illustrate the following situation:
- Some frames have
pts = GST_CLOCK_TIME_NONE
- On receiving such frame, the
nvv4l2decoder
increments its internal timestamp by some constant - When frames with correct
pts
resume,nvv4l2decoder
sets the timestamp to its internal timestamp if the original is less or equal, i.e.buf.pts = std::max(buf.pts, decoder_pts)
This however results in two frames which are consecutive (i.e. originally 40 ms apart) can end up several seconds apart in time. This might cause troubles for several algorithms, which work with time values and require the timestamps to be correct (e.g. object velocity estimation – causes objects to slow down).
Is my observation correct? Is this indeed how decoder works with the timestamps?
If so, is there a way of configuring the decoder to not increment the timestamp when receiving NONE value, or to not modify the PTS values if they are set?
I have read the docs here: Gst-nvvideo4linux2 — DeepStream 6.3 Release documentation, but did not find any answer to how Timestamp values are handled.
Thanks,
Simon