參考 GStreamer
參考 NVIDIA DeepStream SDK Developer Guide
發送錄影,停止錄影命令
nano@nano-desktop:~/Data/DeepStream/kafka_2.13-2.6.0$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic Record
>{"command":"start-recording","sensor":{"id":"0"}}
>{"command":"stop-recording","sensor":{"id":"0"}}
啟動 zookeeper
nano@nano-desktop:~/Data/DeepStream/kafka_2.13-2.6.0$ bin/zookeeper-server-start.sh config/zookeeper.properties
啟動 kafka
nano@nano-desktop:~/Data/DeepStream/kafka_2.13-2.6.0$ bin/kafka-server-start.sh config/server.properties
$ vi configs/test5_config_file_src_infer.txt
[sourceX]
# type 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP 5=CAMERA_CSI
type=4
uri=rtsp://user:passwd@192.168.0.xxx:554/chID=1&streamType=main&linkType=tcp
smart-record=1
# 可透過下列命令觸發停止錄影
# bin/kafka-console-producer.sh --broker-list localhost:9092 --topic Record
# >{"command":"start-recording","sensor":{"id":"0"}}
# >{"command":"stop-recording","sensor":{"id":"0"}}
smart-record=2
# 每10秒觸發一次 start / stop
[sink1]
#Type - 1=FakeSink 2=EglSink 3=File 4=UDPSink 5=nvoverlaysink 6=MsgConvBroker
type=6
msg-conv-config=dstest5_msgconv_sample_config.txt
msg-broker-conn-str=localhost;9092
topic=ObjDetect
[message-consumer0]
subscribe-topic-list=Record
好用的除錯訊息,宣告於
deepstream-5.0/sources/apps/apps-common/includes/deepstream_common.h
NVGSTDS_ERR_MSG_V
NVGSTDS_INFO_MSG_V
NVGSTDS_WARN_MSG_V
也可使用 GStreamer 學習紀錄 的列印除錯訊息
也可使用 GLib Reference Manual 的列印除錯訊息
執行命令
nano@nano-desktop:/opt/nvidia/deepstream/deepstream-5.0/sources/apps/sample_apps/deepstream-test5a$ ./deepstream-test5-app -c configs/test5_config_file_src_infer.txt
在執行命令的 terminal 中可用鍵盤下令
h: Print this help
q: Quit
p: Pause
r: Resume
使錄影命令不用填寫時間
vi deepstream-5.0/sources/apps/apps-common/src/deepstream_c2d_msg_util.c
NvDsC2DMsg*
nvds_c2d_parse_cloud_message (gpointer data, guint size)
{
...
if (startRec) {
time_t startUtc, endUtc, curUtc;
const gchar *timeStr;
if (json_object_has_member (object, "start")) {
...
} else {
start = 0;
NVGSTDS_WARN_MSG_V ("wrong message format, missing 'start' field.");
//goto error;
}
...
}
接收觸發事件
nano@nano-desktop:~/Data/DeepStream/kafka_2.13-2.6.0$ bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic ObjDetect --from-beginning
nano@nano-desktop:~/Data/DeepStream/kafka_2.13-2.6.0$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic Record
>{"command":"start-recording","sensor":{"id":"0"}}
>{"command":"stop-recording","sensor":{"id":"0"}}
vi deepstream-5.0/sources/apps/apps-common/src/deepstream_source_bin.c
create_camera_source_bin
create_uridecode_src_bin
create_rtsp_src_bin
生活紀錄: Deepstream-Test5 學習紀錄 >>>>> Download Now
回覆刪除>>>>> Download Full
生活紀錄: Deepstream-Test5 學習紀錄 >>>>> Download LINK
>>>>> Download Now
生活紀錄: Deepstream-Test5 學習紀錄 >>>>> Download Full
>>>>> Download LINK Yi