Deepstream msg broker timestamp always set to 1970-01-01

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson orin Nx 16)
• DeepStream Version 7.0
• JetPack Version 6 36.3

Deepstream test5 app is working correctly, but when tested with camera rtsp stream the detection is saved into redis with timestamp 1970-01-01 00:00:00 and it’s always this timestamp, when i test with a stream using nvstreamer through vst the timestamp is saved correctly (i’m adding the camera stream using vst too)
Here’s my deepstream config:


[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5
#gie-kitti-output-dir=streamscl

[tiled-display]
enable=1
rows=1
columns=1
width=1280
height=720
gpu-id=0
nvbuf-memory-type=4
square-seq-grid=1

#Note: [source-list] now support REST Server with use-nvmultiurisrcbin=1
[source-list]
num-source-bins=0
#list=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4;file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h265.mp4
use-nvmultiurisrcbin=1
#sensor-id-list vector is one to one mapped with the uri-list
#identifies each sensor by a unique ID
#sensor-id-list=UniqueSensorId1;UniqueSensorId2
max-batch-size=4
http-ip=localhost
http-port=9010
#sgie batch size is number of sources * fair fraction of number of objects detected per frame per source
#the fair fraction of number of object detected is assumed to be 4
sgie-batch-size=40
#Set the below key to keep the application running at all times
stream-name-display=1

[source-attr-all]
enable=1
type=3
num-sources=1
gpu-id=0
cudadec-memtype=0
latency=100
rtsp-reconnect-attempts=3
rtsp-reconnect-interval-sec=60
select-rtp-protocol=4

[streammux]
gpu-id=0
#Note: when used with [source-list], batch-size is ignored
#instead, max-batch-size config is used
batch-size=4
##time out in usec, to wait after the first buffer is available
##to push the batch even if the complete batch is not formed
batched-push-timeout=30000
## Set muxer output width and height
width=960
height=544
##Enable to maintain aspect ratio wrt source, and allow black borders, works
##along with width, height properties
enable-padding=0
nvbuf-memory-type=4
## If set to TRUE, system timestamp will be attached as ntp timestamp
## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached
# attach-sys-ts-as-ntp=1
## drop-pipeline-eos ignores EOS from individual streams muxed in the DS pipeline
## It is useful with source-list/use-nvmultiurisrcbin=1 where the REST server
## will be running post last stream EOS to accept new streams
drop-pipeline-eos=1
##Boolean property to inform muxer that sources are live
##When using nvmultiurisrcbin live-source=1 is preferred default
##to allow batching of available buffers when number of sources is < max-batch-size configuration
live-source=1
attach-sys-ts-as-ntp=0
buffer-pool-size=4


[sink0]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File
type=1
sync=1
source-id=0
gpu-id=0
nvbuf-memory-type=4

[sink1]
enable=1
msg-broker-conn-str=localhost;6379;test
msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream/lib/libnvds_redis_proto.so
msg-conv-msg2p-new-api=0
msg-conv-frame-interval=1
msg-broker-config=/ds-config-files/yolov8s/cfg_redis.txt
msg-conv-payload-type=1
#multiple-payloads=1
source-id=0
sync=0
type=6
topic=test

[sink2]
enable=0
type=3
#1=mp4 2=mkv
container=1
#1=h264 2=h265 3=mpeg4
## only SW mpeg4 is supported right now.
codec=3
sync=1
bitrate=2000000
output-file=out.mp4
source-id=0

[sink3]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay
type=4
#1=h264 2=h265
codec=1
#encoder type 0=Hardware 1=Software
enc-type=0
sync=0
bitrate=4000000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
profile=0
# set below properties in case of RTSPStreaming
rtsp-port=8555
udp-port=5511

[osd]
enable=1
gpu-id=0
border-width=1
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Arial
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=4

# config-file property is mandatory for any gie section.
# Other properties are optional and if set will override the properties set in
# the infer config file.
[primary-gie]
enable=1
gpu-id=0
gie-unique-id=1
nvbuf-memory-type=4
config-file=config_infer_primary_yoloV8_nx16.txt
model-engine-file=/yolov8s/model_b4_gpu0_int8.engine
batch-size=4
bbox-border-color0=1;0;0;1
bbox-border-color1=0;1;1;1
bbox-border-color2=0;0;1;1
bbox-border-color3=0;1;0;1
interval=0
#enable-dla=1
#use-dla-core=0

[tracker]
enable=1
tracker-width=960
tracker-height=544
ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
ll-config-file=config_tracker_NvDCF_PNv2.6_Interval_1_PVA.yml;config_tracker_NvDCF_PNv2.6_Interval_1_PVA.yml
sub-batches=2:2
gpu-id=0
display-tracking-id=1

### LPD model
[secondary-gie0]
enable=1
#model-engine-file=/yolov8s/model/LPDNet_usa_pruned_tao5.onnx_b40_gpu0_int8.engine
gpu-id=0
batch-size=4
gie-unique-id=2
operate-on-gie-id=1
operate-on-class-ids=2;3;5;7
#operate-on-class-ids=0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19
config-file=lpd_yolov4-tiny_us.txt
#config-file=test.txt
#classifier-async-mode=1

### LPR model
[secondary-gie1]
enable=0
#model-engine-file=/yolov8s/model/LPDNet_usa_pruned_tao5.onnx_b40_gpu0_int8.engine
gpu-id=0
batch-size=4
gie-unique-id=5
operate-on-gie-id=2
operate-on-class-ids=0
config-file=lpr_config_sgie_us.txt

### VahicleMakeNet Model
[secondary-gie2]
enable=1
#model-engine-file=/yolov8s/model/LPDNet_usa_pruned_tao5.onnx_b40_gpu0_int8.engine
gpu-id=0
batch-size=4
gie-unique-id=6
operate-on-gie-id=1
operate-on-class-ids=2;3;5;7
#config-file=vehicle_typenet_config_sgie.txt
config-file=config_infer_secondary_vehicleMake.txt


### VahicleTypeNet Model
[secondary-gie3]
enable=1
#model-engine-file=/yolov8s/model/LPDNet_usa_pruned_tao5.onnx_b40_gpu0_int8.engine
gpu-id=0
batch-size=4
gie-unique-id=7
operate-on-gie-id=1
operate-on-class-ids=2;3;5;7
#config-file=vehicle_typenet_config_sgie.txt
config-file=config_infer_secondary_vehicleType.txt

### VahicleColorNet Model
[secondary-gie4]
enable=1
#model-engine-file=/yolov8s/model/LPDNet_usa_pruned_tao5.onnx_b40_gpu0_int8.engine
gpu-id=0
batch-size=4
gie-unique-id=8
operate-on-gie-id=1
operate-on-class-ids=2;3;5;7
#config-file=vehicle_typenet_config_sgie.txt
config-file=config_infer_secondary_vehicleColor.txt


[tracker2]
enable=1
tracker-width=960
tracker-height=544
ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
ll-config-file=config_tracker_NvDCF_PNv2.6_Interval_1_PVA.yml;config_tracker_NvDCF_PNv2.6_Interval_1_PVA.yml
sub-batches=2:2
gpu-id=0
display-tracking-id=1


[tests]
file-loop=1

Here’s a screenshot of the detections

This seems to be a system time issue.

Does the output of the date command say 1970-01-01?

If you execute the following command, will the time output by msgbroker change?

sudo date -s "2025-01-21 00:00:00"

yes, the output of date is correct, i’m running deepstream in a container, and the time is set to UTC, so i don’t think it’s a system issue, plus the time is stored correctly for all other sources, only not for the camera source

If the rtsp camera does not send rtcp packets, or sends rtcp packets but without SSRC, the frame_meta->ntp_timestamp is not updated, which will also cause this problem.

Try attach-sys-ts-as-ntp=1, so that nvstreammux will use the system time instead of ntp time.

yes, thanks for the answer, this solved my problem

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.