• Jetson Xavier NX
• DeepStream 5.0
• JetPack Version:4.4
I’m testing the deepstream test5 kafka which consuming a “record” topic, and I publish to kafka topic with python as following code.
from time import sleep
from json import dumps
from kafka import KafkaProducer
import datetime
producer = KafkaProducer(
bootstrap_servers=['localhost:9092'],
value_serializer=lambda x: dumps(x).encode('utf-8')
)
for j in range(9999):
print("Iteration", j)
dt_now = datetime.datetime.now()
end_time = dt_now + datetime.timedelta(0,10)
data = {'command': "stop-recording",
'start': dt_now.strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3]+"Z",
'end': end_time.strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3]+"Z",
'sensor':{"id":"CAMERA_ID"}
}
producer.send('record', value=data)
sleep(10)
The deepstream test-5 seems like consuming the following.
Consuming message, on topic[record]. Payload ={"command": "stop-recording", "start": "2020-09-14T23:15:27.211Z", "end": "2020-09-14T23:15:37.211Z", "sensor": {"id": "CAMERA_ID"}}
Consuming message, on topic[record]. Payload ={"command": "stop-recording", "start": "2020-09-14T23:15:37.230Z", "end": "2020-09-14T23:15:47.230Z", "sensor": {"id": "CAMERA_ID"}}
But I’m not understand the “start-recording/stop-recording” command which with a “start” and “end” fields. How should I suppose to use this consumer correctly? For using consumer based triggered smart record, should I enable smart-record on camera sources of the deepstream-test5?