How to set the video output as rtsp stream in deepstream-server-app in deepstream7.0?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
rtx 2060
• DeepStream Version
deepstream 7.0 with docker image nvcr.io/nvidia/deepstream:7.0-gc-triton-devel
• JetPack Version (valid for Jetson only)
• TensorRT Version
in nvcr.io/nvidia/deepstream:7.0-gc-triton-devel
• NVIDIA GPU Driver Version (valid for GPU only)
535
• Issue Type( questions, new requirements, bugs)
questions
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

I use the system’s own USE_NEW_NVSTREAMMUX=“yes” deepstream-server-app dsserver_config.yml
The results are as follows:

libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
Calling gst_element_factory_make for nvmultiurisrcbin
!! [WARNING] "encoder" group not enabled.
Using file: dsserver_config.yml
Running...

The system is stuck, I think it is a bug. The system can work normally after changing dsserver_config.yml to:

encoder:

enable: 1 #Disabled, Set to 1 to enable encoder pipeline in the sample application.

Usage:

curl -XPOST 'http://localhost:9100/api/v1/stream/add' -d '{
"key": "sensor",
"value": {
"camera_id": "uniqueSensorID1",
"camera_name": "front_door",
"camera_url": "file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4",
"change": "camera_add",
"metadata": {
"resolution": "1920 x1080",
"codec": "h264",
"framerate": 30
}
},
"headers": {
"source": "vst",
"created_at": "2021-06-01T14:34:13.417Z"
}
}'

It looks like the source can be added correctly.
But I don’t know how to output the video as an rtsp stream. I tried to modify the sink section of dsserver_config.yml to:


sink:
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
# set profile only for hw encoder, sw encoder selects profile based on sw-preset
profile: 0
# set below properties in case of RTSPStreaming
rtsp-port: 8554
udp-port: 5400
qos: 0

But it doesn’t work, the system doesn’t work. May I ask: How can I see the video output of deepstream-server-app?

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I am checking.

  1. I can’t reproducing the hung issue. if setting “enable: 1” can fix, the issue should be related to rendering. can you see the video after executing this command-line? if not, please share the log 1.log.
export GST_DEBUG=3 && gst-launch-1.0 filesrc  location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! nveglglessink  >1.log 2>1.log
  1. if setting “enable: 1”, the application will record output video to a file test.h264.

export DISPLAY=:1

Thank you!

I use export DISPLAY=:1, in the container:
export GST_DEBUG=3 && gst-launch-1.0 filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! nveglglessink >1.log 2>1.log
It is displayed normally.

deepstream-server-app dsserver_config.yml can also display the window normally.

But I still don’t know how to output the results to the rtsp stream. The sink settings in my dsserver_config.yml are as follows:

sink:
# 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
# # set profile only for hw encoder, sw encoder selects profile based on sw-preset
# profile: 0
# # set below properties in case of RTSPStreaming
# rtsp-port: 8554
# udp-port: 5400
qos: 0

deepstream-server-app is opensource. it uses opt\nvidia\deepstream\deepstream-7.0\sources\includes\nvds_yml_parser.h to parse the configuration file. it does not support rtsp sink configurations parsing. but you can port rtsp sink configuration parsing and creating logics from deepstram-app. please refer to opt\nvidia\deepstream\deepstream\sources\apps\apps-common\src\deepstream-yaml\deepstream_sink_yaml.cpp and opt\nvidia\deepstream\deepstream\sources\apps\apps-common\src\deepstream-yaml\deepstream_sink_yaml.cpp.