在上一节中我们已经讲过DeepStream整体架构和运行流程。
说明:本文的目的是RTSP推流
一、流程
视频流输入——> 解码——> 帧批处理——> 推理——> 目标跟踪——> 可视化构件——> 输出
Gst-nvv4l2decoder→Gst-nvstreammux→Gst-nvinfer→Gst-nvtracker→Gst-nvmultistreamtiler→Gst-nvvideoconvert→Gst-nvosd→Gst-nveglglessink
二、输出负载插件
这节重点讲解输出模块的两个插件Gst-nvmsgconv输出负载和Gst-nvmsgbroker连接云端。
我们知道在屏幕展示用到nvdsosd插件(plugin),相关的组件(group)是OSD Group。则输出用到的组件是Sink Group
Specify properties and modify behavior of sink components that represent outputs such as displays and files for rendering, encoding, and file saving. The pipeline can contain multiple sinks. Groups must be named as: [sink0], [sink1] …
下面是我们在测试用到的[sink0]
[sink0]
enable=1
type=2
sync=0
source-id=0
gpu-id=0
nvbuf-memory-type=0
三、拓展
DeepStream相关问题分析的很到位:http://www.gpus.cn/gpus_list_page_techno_support_content?id=136
Q1: 如何解释控制台上的每秒帧数(FPS)显示信息?
答:在运行deepstream-app时,控制台上显示的FPS数是最近五秒钟的平均值。 括号中的数字是整个运行过程中的平均FPS。 每个流显示数字。 性能测量间隔是通过配置文件中的perf-measurement-interval-sec设置来设置的。
Q2: 如何指定Deepstream输出的RTSP流?
答:您可以通过在应用程序配置文件中添加RTSP接收器来启用远程显示。示例配置文件source30_720p_dec_infer_resnet_tiled_display_int8 .txt的[sink2]部分提供了一个这样的示例。您必须将enable标志设置为1。但是我没有找到这个配置文件,我实是在apps/sample_apps/deepstream-test5下找到配置文件test5_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt的,也找到[sink2]相关的配置了
启用远程显示后,应用程序打印RTSP URL,您可以在任何媒体播放器(如VLC)中打开它。
优质文章,对DeepStream优化很有帮助:http://bbs.gpuworld.cn/index.php?topic=73249.msg84323