DeepStream 配置文件解析

参考:DeepStream 配置文件解析
参考:deepstream 样本配置和流

DeepStream 配置文件解析

    • @[TOC](DeepStream 配置文件解析)
      • application:与指定组件无关的配置
      • tiled-display:平铺显示
      • source:源配置。多个源时,命名:[source0] ,[source1] , ...
      • sink:sink组件的相关配置。表示了输出(如显示、文件渲染、编码、文件保存)。一个管道可以包含多个sink。组的命名须为[sink0], [sink1], ...
      • osd:OSD(on-screen display)组件相关配置。包括每一帧上显示的文本和矩形框
      • streammux:streammux(混流)组件的配置和更改
      • ---
      • 1.例子

application:与指定组件无关的配置

[application]
# 是否开启应用程序的性能测试
enable-perf-measurement=1
# 性能指标测试时间间隔(秒)
perf-measurement-interval-sec=5
# 存储了主检测器输出结果(KITTI数据格式)的路径名(已经存在)---mei
gie-kitti-output-dir=streamscl=out/source30_1080p_dec_infer-resnet_tiled_display_int8_copy/kitti/
# 存储跟踪器的输出结果的路径(没有输出结果?含义?)---每帧的目标信息
kitti-track-output-dir=out/source30_1080p_dec_infer-resnet_tiled_display_int8_copy/track/

tiled-display:平铺显示

# 是否平铺展示
enable=1
# 平铺2D数组行数
rows=2
# 平铺2D列数
columns=2
# 平铺宽,单位像素
width=1280
# 高,单位像素
height=720
# 多gpu时,使用的gpu编号
gpu-id=0
# 平台默认类型
#(0): nvbuf-mem-default - Default memory allocated, specific to particular platform
# pinned/主机CUDA内存
#(1): nvbuf-mem-cuda-pinned - Allocate Pinned/Host cuda memory, applicable for Tesla
# device CUDA memory
#(2): nvbuf-mem-cuda-device - Allocate Device cuda memory, applicable for Tesla
# unified CUDA memory
#(3): nvbuf-mem-cuda-unified - Allocate Unified cuda memory, applicable for Tesla
#(4): nvbuf-mem-surface-array - Allocate Surface Array memory, applicable for Jetson
nvbuf-memory-type=0

source:源配置。多个源时,命名:[source0] ,[source1] , …

# 资源是否有效
enable=1
# 1:相机(V4L2)2:URI 3:MultiURI(复用URI)4:RTSP 5:相机(CSI)(只针对Jetson)
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
# 编码流的URI。可以是文件,HTTP URI, RTSP.只有type=2和3的时候有效。对于MultiURI,%d的格式可以指定多个源。The application iterates from 0 to num-sources 1 to generate the actual URIs.(含义?)
uri=file://../../streams/shanghai.mp4
#uri=http://123.56.185.164:10000/play.html?serial=34020000001110000002&code=34020000001310000004
# 资源数,只有当type=3时有效
num-sources=2
# 丢帧的间隔。 例如,5表示解码器每隔五帧输出一次; 0表示没有丢帧。
drop-frame-interval=30
# 使用的gpu-id
gpu-id=0
# (0): memtype_device   - Memory type Device
# (1): memtype_pinned   - Memory type Host Pinned
# (2): memtype_unified  - Memory type Unified
cudadec-memtype=0

sink:sink组件的相关配置。表示了输出(如显示、文件渲染、编码、文件保存)。一个管道可以包含多个sink。组的命名须为[sink0], [sink1], …

[sink0]
# 是否开启
enable=1
# 1:Fakesink 2:基于EGL的窗口接收器(nveglglessink) 3:编码+文件保存(编码器+混合器+ filesink)4:编码+ RTSP流 5:叠加层(仅适用于Jetson) 6:消息转换器+消息代理
#Type - 1=FakeSink 2=EglSink 3=File
type=2
# 指示要渲染流的速度。0:尽可能快 1:同步
sync=1
source-id=0
gpu-id=0
# # 0:平台默认类型 1:pinned/主机CUDA内存 2:device CUDA memory 3: unified CUDA memory 4:
nvbuf-memory-type=0

[sink1]
enable=1
type=3
#1=mp4 2=mkv
# 用于文件保存的容器。 仅对type = 3有效。
container=1
#1=h264 2=h265
# 用于保存文件的编码器。
codec=1
#encoder type 0=Hardware 1=Software
enc-type=0
sync=0
# 编码帧内出现频率。
#iframeinterval=10
# 用于编码的比特率,以每秒位数为单位。 适用于type = 3和4。
bitrate=2000000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
profile=0
# 输出编码文件的路径名。 仅对type = 3有效。
output-file=out.mp4
source-id=0

[sink2]
enable=0
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
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流服务器的端口; 有效的未使用端口号。 对type = 4有效。
rtsp-port=8554
# 流实现内部使用的端口; 有效的未使用端口号。 对type = 4有效。
udp-port=5400

[sink3]
enable=0
type=5
overlay-id=1
width=1920
height=1920
# 渲染器窗口的水平偏移量(以像素为单位)。
offset-x=10
# 渲染器窗口的垂直偏移量,以像素为单位。
offset-y=10
# 显示HEAD的ID。 对叠加水槽有效(类型= 5)。
display-id=0

[sink4]
enable=0
type=6
# Gst-nvmsgconv元素的配置文件的路径名(类型= 6)。
msg-conv-config=out/source30_1080p_dec_infer-resnet_tiled_display_int8_copy/dstest5_msgconv_sample_config.txt
msg-broker-proto-lib=/home/ubuntu/libnvds_amqp_proto.so
# 后端服务器的连接字符串(类型= 6)。
msg-broker-conn-str=foo.bar.com;80;dsapp
topic=test-ds4
# 有效负载类型。 0,PAYLOAD_DEEPSTREAM:深度流架构有效负载。1,PAYLOAD_DEEPSTREAM_MINIMAL:深流架构有效负载最小。256,PAYLOAD_RESERVED:保留类型。257,PAYLOAD_CUSTOM:自定义架构有效负载(类型= 6)。
msg-conv-payload-type=0
# Gst-nvmsgbroker元素的可选配置文件的路径名(类型= 6)。
msg-conv-config=/home/ubuntu/cfg_amqp.txt
# 仅在msg-conv-payload-type = 257,PAYLOAD_CUSTOM时适用。
msg-conv-msg2p-lib= /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_msgconv.so
# nvmsgconv元素的comp-id Gst属性; 要从中处理元数据的主要/次要gie组件的ID(gie-unique-id)。
msg-conv-comp-id=1
# nvmsgbroker元素的comp-id Gst属性; 要从中处理元数据的主要/次要gie组件的ID(gie-unique-id)。
msg-broker-comp-id=1

osd:OSD(on-screen display)组件相关配置。包括每一帧上显示的文本和矩形框


streammux:streammux(混流)组件的配置和更改


1.例子

deepstream-nvdsanalytics-test例子

  • .config_nvdsanalytics.txt配置文件介绍
[property]
enable=1
#用于配置的宽度高度,用于配置以下配置
config-width=1920
config-height=1080
#osd-mode 0: 不显示任何行、rois 和文本
#         1: 仅显示线条、rois 和静态文本,即标签
#         2: 显示来自 1 的所有信息以及有关计数的信息
osd-mode=2
#设置必须显示的 OSD 字体大小
display-font-size=12

## 每个流配置
[roi-filtering-stream-0]
enable=1
#ROI to filter select objects, and remove from meta data
roi-RF=295;643;579;634;642;913;56;828
#remove objects in the ROI
inverse-roi=0
class-id=-1

## Per stream configuration
[roi-filtering-stream-2]
#enable or disable following feature
enable=1
#ROI to filter select objects, and remove from meta data
roi-RF=295;643;579;634;642;913;56;828
#remove objects in the ROI
inverse-roi=1
class-id=0

[overcrowding-stream-1]
enable=1
roi-OC=295;643;579;634;642;913;56;828
#no of objects that will trigger OC
object-threshold=3
class-id=-1

[line-crossing-stream-0]
enable=1
#Label;direction;lc
#line-crossing-Entry=1072;911;1143;1058;944;1020;1297;1020;
# 前两个点为方向点,后两个点为撞线点
line-crossing-Exit=789;672;1084;900;851;773;1203;732
class-id=0
#extended when 0- only counts crossing on the configured Line
#              1- assumes extended Line crossing counts all the crossing
extended=0
#LC modes supported:
#loose   : 计算所有穿越而没有强烈遵守方向
#balanced: 与模式=松散相比,预期严格遵守方向
#strict  : 与模式=平衡相比,预期严格遵守方向
mode=loose

[direction-detection-stream-0]
enable=1
#Label;direction;
direction-South=284;840;360;662;
direction-North=1106;622;1312;701;
class-id=0


你可能感兴趣的:(人工智能,音视频,deepstream)