Gst-nvdsanalytics sample pipeline does not work

I am trying to run the sample pipeline but its not working
The following pipelines demonstrate plugin’s usage.

•For dGPU:

gst-launch-1.0 filesrc location=streams/sample_1080p.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! m.sink_0 nvstreammux name=m width=1920 height=1080 batch-size=1 live-source=1 ! nvinfer config-file-path= config_infer_primary.txt ! nvtracker ll-lib-file = /opt/nvidia/deepstream/deepstream/lib/libnvds_nvdcf.so ll-config-file= tracker_config.yml tracker-width=640 tracker-height=384 ! nvdsanalytics config-file= config_nvdsanalytics.txt ! nvmultistreamtiler ! nvvideoconvert ! nvdsosd ! nveglglessink

root@mike:/opt/nvidia/deepstream/deepstream-5.0/sources/apps/sample_apps/deepstream-nvdsanalytics-test# ll
total 372
drwxr-xrwx 1 root root 4096 May 8 08:10 ./
drwxr-xrwx 1 root root 4096 May 8 07:06 …/
-rw-r–rw- 1 root root 2143 Apr 27 13:33 Makefile
-rw-r–rw- 1 root root 3758 Apr 27 13:33 README
-rw-r–rw- 1 root root 1659 Apr 27 13:33 config_nvdsanalytics.txt
-rwxr-xr-x 1 root root 104304 May 8 07:14 deepstream-nvdsanalytics-test*
-rw-r–rw- 1 root root 17813 Apr 27 13:33 deepstream_nvdsanalytics_test.cpp
-rw-r–r-- 1 root root 217832 May 8 07:14 deepstream_nvdsanalytics_test.o
-rw-r–rw- 1 root root 3295 Apr 27 13:33 nvdsanalytics_pgie_config.txt
-rw-r–r-- 1 root root 0 May 8 08:20 nvof.mp4
-rw-r–rw- 1 root root 3233 Apr 27 13:33 tracker_config.yml
root@mike:/opt/nvidia/deepstream/deepstream-5.0/sources/apps/sample_apps/deepstream-nvdsanalytics-test# gst-launch-1.0 filesrc location=/opt/nvidia/deepstream/deepstream-5.0/samples/streams/sample_1080p.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! m.sink_0 nvstreammux name=m width=1920 height=1080 batch-size=1 live-source=1 ! nvinfer config-file-path= config_infer_primary.txt ! nvtracker ll-lib-file = /opt/nvidia/deepstream/deepstream/lib/libnvds_nvdcf.so ll-config-file= tracker_config.yml tracker-width=640 tracker-height=384 ! nvdsanalytics config-file=config_nvdsanalytics.txt ! nvmultistreamtiler ! nvvideoconvert ! nvdsosd ! nveglglessink
Failed to load config file: No such file or directory
**** ERROR: <gst_nvinfer_parse_config_file:1158>: failed**
Setting pipeline to PAUSED …
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
ERROR: Pipeline doesn’t want to pause.
Got context from element ‘eglglessink0’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to NULL …
Freeing pipeline …

can you please shed more information on the plugin. Do you have an example where its output can be written to a RTSP Stream.

Can deepstream-nvdsanalytics-test run well?

Yes I can. Thanks.

I am trying to combine test4 and nvdsanalytics and also trying to display using RTSP. Do you have any samples. I keep getting pipeline could not be made.

Hi
about plugin, you can refer to documentation,

about how the output written to rtsp stream, you can use deepstream-app, in config group sink, we have type 4: Encode + RTSP streaming, refer to this,
https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html#page/DeepStream_Development_Guide/deepstream_app_config.3.2.html#wwpID0ENHA
about error you met, Failed to load config file: No such file or directory
**** ERROR: <gst_nvinfer_parse_config_file:1158>: failed**
please check the config file path.

Hi,

A similar error occurred:

deepstream-app -c …/…/…/…/samples/configs/deepstream-app-trtis/source1_primary_detector.txt

*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8554/ds-test ***

Failed to load config file: Key file contains line ?infer_config {? which is not a key-value pair, group, or comment
** ERROR: <gst_nvinfer_parse_config_file:1158>: failed
0:00:00.434796374 9027 0x55a2d5dd2a00 WARN nvinfer gstnvinfer.cpp:747:gst_nvinfer_start:<primary_gie> error: Configuration file parsing failed
0:00:00.434816632 9027 0x55a2d5dd2a00 WARN nvinfer gstnvinfer.cpp:747:gst_nvinfer_start:<primary_gie> error: Config file path: /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app-trtis/config_infer_primary_detector_ssd_inception_v2_coco_2018_01_28.txt
** ERROR: main:651: Failed to set pipeline to PAUSED
Quitting
ERROR from primary_gie: Configuration file parsing failed
Debug info: gstnvinfer.cpp(747): gst_nvinfer_start (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie:
Config file path: /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app-trtis/config_infer_primary_detector_ssd_inception_v2_coco_2018_01_28.txt
App run failed

This is due to the mismatch in the file format that is expected.

This is strange. I was able to run these apps on the NVIDIA Docker images. But, when I built these on the local machine, the above error occurs. Any input will be appreciated.

config in your local server and config within docker is same?

Hi,

The problem seems to be due to using “deepstream-app-trtis” config file for ‘standard’ (non Trtiton Inference Server) environment. Using a ‘standard’ “deepstream-app” config file solved the problem.

This is a very basic question:
The performance on a Ubuntu 18.04, with dGPU (RTX2080) is poor. %CPU is very high 50-70% where as %GPU is low 5%-7% as compared to running under the docker container on the same machine.

I couldn’t get any reference to do the setup (environmental variables, enabling CUDA etc on the NVIDIA Quick Start pages (of 5.0). I re-used some of the items from the docker container (5.0-x-3-devel) but that didn’t help.
Any suggestions or pointers on how to utilize the GPU on a Ubuntu system?

nvidia-smi provides this output for running it outside the container:

±----------------------------------------------------------------------------+
| NVIDIA-SMI 440.64.00 Driver Version: 440.64.00 CUDA Version: 10.2 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 208… On | 00000000:09:00.0 Off | N/A |
| 52% 71C P2 120W / 250W | 2770MiB / 11018MiB | 12% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 2220 G /usr/lib/xorg/Xorg 18MiB |
| 0 2358 G /usr/bin/sddm-greeter 33MiB |
| 0 6458 C ./deepstream-app 2576MiB |
±----------------------------------------------------------------------------+

Thanks in advance!

Hi deepak,

Please open a new topic for your issue. Thanks