Gstreamer error in Deepstream-yolo-app

A gstreamer error was displayed when executing the following command.
Could you tell me as I do not know the solution method?

#deepstream-yolo-app Tesla /root/DeepStream_Release/samples/streams/sample_720p.h264 /root/deepstream_reference_apps-master/yolo/config/yolov2.txt

Now playing: /root/DeepStream_Release/samples/streams/sample_720p.h264
Loading pre-trained weights…
Loading complete!
Total Number of weights read : 50983561
layer inp_size out_size weightPtr
(1) conv-bn-leaky 3 x 608 x 608 32 x 608 x 608 992
(2) maxpool 32 x 608 x 608 32 x 304 x 304 992
(3) conv-bn-leaky 32 x 304 x 304 64 x 304 x 304 19680
(4) maxpool 64 x 304 x 304 64 x 152 x 152 19680
(5) conv-bn-leaky 64 x 152 x 152 128 x 152 x 152 93920
(6) conv-bn-leaky 128 x 152 x 152 64 x 152 x 152 102368
(7) conv-bn-leaky 64 x 152 x 152 128 x 152 x 152 176608
(8) maxpool 128 x 152 x 152 128 x 76 x 76 176608
(9) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 472544
(10) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 505824
(11) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 801760
(12) maxpool 256 x 76 x 76 256 x 38 x 38 801760
(13) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 1983456
(14) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 2115552
(15) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 3297248
(16) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 3429344
(17) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 4611040
(18) maxpool 512 x 38 x 38 512 x 19 x 19 4611040
(19) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 9333728
(20) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 9860064
(21) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 14582752
(22) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 15109088
(23) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 19831776
(24) conv-bn-leaky 1024 x 19 x 19 1024 x 19 x 19 29273056
(25) conv-bn-leaky 1024 x 19 x 19 1024 x 19 x 19 38714336
(26) route - 512 x 38 x 38 38714336
(27) conv-bn-leaky 512 x 38 x 38 64 x 38 x 38 38747360
(28) reorg 64 x 38 x 38 256 x 19 x 19 38747360
(29) route - 1280 x 19 x 19 38747360
(30) conv-bn-leaky 1280 x 19 x 19 1024 x 19 x 19 50547936
(31) conv-linear 1024 x 19 x 19 425 x 19 x 19 50983561
(32) region 425 x 19 x 19 425 x 19 x 19 50983561
Anchors are being converted to network input resolution i.e. Anchors x 32 (stride)
Output blob names :
region_32
Using previously generated plan file located at /root/deepstream_reference_apps-master/yolo/data/yolov2-kFLOAT-kGPU-batch1.engine
Loading TRT Engine…
Loading Complete!
Running…
Frame Number = 0 Number of objects = 3 Car Count = 0 Person Count = 2 Bicycle Count = 0 Truck Count = 0
ERROR from element h264-parser: GStreamer encountered a general stream error.
Error: GStreamer encountered a general stream error.
Returned, stopping playback
Deleting pipeline

Hi,

Can you check if the file source path is valid – " /root/DeepStream_Release/samples/streams/sample_720p.h264" ?

Also can you run the app with GST_DEBUG=3 variable to get more logs ? The new command would be

GST_DEBUG=3 deepstream-yolo-app Tesla /root/DeepStream_Release/samples/streams/sample_720p.h264 /root/deepstream_reference_apps-master/yolo/config/yolov2.txt

It was re-executed using the command you gave me.
Please let me know if you can understand something from here.

root@f23f3b7b51c9:~# ll /root/DeepStream_Release/samples/streams/sample_720p.h264
-rw-rw-r-- 1 root root 14759548 Aug 27 2018 /root/DeepStream_Release/samples/streams/sample_720p.h264
root@f23f3b7b51c9:~#
root@f23f3b7b51c9:~#
root@f23f3b7b51c9:~#
root@f23f3b7b51c9:~# GST_DEBUG=3 deepstream-yolo-app Tesla /root/DeepStream_Release/samples/streams/sample_720p.h264 /root/deepstream_reference_apps-master/yolo/config/yolov2.txt
Now playing: /root/DeepStream_Release/samples/streams/sample_720p.h264
Loading pre-trained weights…
Loading complete!
Total Number of weights read : 50983561
layer inp_size out_size weightPtr
(1) conv-bn-leaky 3 x 608 x 608 32 x 608 x 608 992
(2) maxpool 32 x 608 x 608 32 x 304 x 304 992
(3) conv-bn-leaky 32 x 304 x 304 64 x 304 x 304 19680
(4) maxpool 64 x 304 x 304 64 x 152 x 152 19680
(5) conv-bn-leaky 64 x 152 x 152 128 x 152 x 152 93920
(6) conv-bn-leaky 128 x 152 x 152 64 x 152 x 152 102368
(7) conv-bn-leaky 64 x 152 x 152 128 x 152 x 152 176608
(8) maxpool 128 x 152 x 152 128 x 76 x 76 176608
(9) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 472544
(10) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 505824
(11) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 801760
(12) maxpool 256 x 76 x 76 256 x 38 x 38 801760
(13) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 1983456
(14) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 2115552
(15) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 3297248
(16) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 3429344
(17) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 4611040
(18) maxpool 512 x 38 x 38 512 x 19 x 19 4611040
(19) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 9333728
(20) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 9860064
(21) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 14582752
(22) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 15109088
(23) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 19831776
(24) conv-bn-leaky 1024 x 19 x 19 1024 x 19 x 19 29273056
(25) conv-bn-leaky 1024 x 19 x 19 1024 x 19 x 19 38714336
(26) route - 512 x 38 x 38 38714336
(27) conv-bn-leaky 512 x 38 x 38 64 x 38 x 38 38747360
(28) reorg 64 x 38 x 38 256 x 19 x 19 38747360
(29) route - 1280 x 19 x 19 38747360
(30) conv-bn-leaky 1280 x 19 x 19 1024 x 19 x 19 50547936
(31) conv-linear 1024 x 19 x 19 425 x 19 x 19 50983561
(32) region 425 x 19 x 19 425 x 19 x 19 50983561
Anchors are being converted to network input resolution i.e. Anchors x 32 (stride)
Output blob names :
region_32
Using previously generated plan file located at /root/deepstream_reference_apps-master/yolo/data/yolov2-kFLOAT-kGPU-batch1.engine
Loading TRT Engine…
Loading Complete!
0:00:05.414039644 8214 0x27e5630 WARN basesrc gstbasesrc.c:3489:gst_base_src_start_complete: pad not activated yet
Running…
0:00:05.446205588 8214 0x24e5e80 ERROR egladaption ext/eglgles/gstegladaptation.c:663:gst_egl_adaptation_choose_config: Could not find matching framebuffer config
0:00:05.446265360 8214 0x24e5e80 ERROR egladaption ext/eglgles/gstegladaptation.c:676:gst_egl_adaptation_choose_config: Couldn’t choose an usable config
0:00:05.446285978 8214 0x24e5e80 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2719:gst_eglglessink_configure_caps: Couldn’t choose EGL config
0:00:05.446303299 8214 0x24e5e80 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2779:gst_eglglessink_configure_caps: Configuring caps failed
0:00:05.446350106 8214 0x24e5ed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
0:00:05.446406637 8214 0x24e5ed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
0:00:05.446420159 8214 0x24e5ed0 WARN GST_PADS gstpad.c:4092:gst_pad_peer_query:nv-onscreendisplay:src could not send sticky events
0:00:05.450592060 8214 0x24e5ed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
0:00:05.450651346 8214 0x24e5ed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
Frame Number = 0 Number of objects = 3 Car Count = 0 Person Count = 2 Bicycle Count = 0 Truck Count = 0
0:00:05.580253152 8214 0x24e5ed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
0:00:05.580535091 8214 0x24e5ed0 WARN baseparse gstbaseparse.c:3599:gst_base_parse_loop: error: streaming stopped, reason not-negotiated
0:00:05.580726890 8214 0x24e5ed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
ERROR from element h264-parser: GStreamer encountered a general stream error.
Error: GStreamer encountered a general stream error.
0:00:05.580826557 8214 0x24e5ed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
Returned, stopping playback
Deleting pipeline
root@f23f3b7b51c9:~#

Can you check if the file exists in this path ? – /root/DeepStream_Release/samples/streams/sample_720p.h264

How is it here?
Are there any other required commands?

root@f23f3b7b51c9:~# ll /root/DeepStream_Release/samples/streams/sample_720p.h264
-rw-rw-r-- 1 root root 14759548 Aug 27 2018 /root/DeepStream_Release/samples/streams/sample_720p.h264

Can you please provide more details regarding your setup ? Are you running this on docker ?

I built deepstream-yolo-app on docker container.
Since the necessary files are missing, we are installing packages such as cuda.

Docker container
https://ngc.nvidia.com/catalog/containers/nvidia:deepstream

Deepstream-yolo-app
https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps

Did you run “xhost +” before launching the docker as spcecified in the instructions over here ? – https://ngc.nvidia.com/catalog/containers/nvidia:deepstream

You can verify your setup by first running the samples included in Deepstream SDK

The “xhost +” command has not been executed.
I wondered if there is a security issue, but do you need to worry about it?

That is a required step if you want to view the display, since it lets the docker container access your host machine’s X server.

understood.
If I execute a command without looking at the display, what setting should I do?

You can change the type of sink from nveglglessink to fakesink over here.

https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps/blob/master/yolo/apps/deepstream-yolo/deepstream-yolo-app.cpp#L194

The following settings have been changed, but the same error is displayed.
What should I do?

deepstream-yolo-app.cpp#L194

/* sink = gst_element_factory_make (“nveglglessink”, “nvvideo-renderer”); */
sink = gst_element_factory_make (“fakesink”, “nvvideo-renderer”);

error

deepstream-yolo-app Tesla /root/DeepStream_Release/samples/streams/sample_720p.h264 /root/deepstream_reference_apps-master/yolo/config/yolov2.txt

Now playing: /root/DeepStream_Release/samples/streams/sample_720p.h264
Loading pre-trained weights…
Loading complete!
Total Number of weights read : 50983561
layer inp_size out_size weightPtr
(1) conv-bn-leaky 3 x 608 x 608 32 x 608 x 608 992
(2) maxpool 32 x 608 x 608 32 x 304 x 304 992
(3) conv-bn-leaky 32 x 304 x 304 64 x 304 x 304 19680
(4) maxpool 64 x 304 x 304 64 x 152 x 152 19680
(5) conv-bn-leaky 64 x 152 x 152 128 x 152 x 152 93920
(6) conv-bn-leaky 128 x 152 x 152 64 x 152 x 152 102368
(7) conv-bn-leaky 64 x 152 x 152 128 x 152 x 152 176608
(8) maxpool 128 x 152 x 152 128 x 76 x 76 176608
(9) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 472544
(10) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 505824
(11) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 801760
(12) maxpool 256 x 76 x 76 256 x 38 x 38 801760
(13) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 1983456
(14) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 2115552
(15) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 3297248
(16) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 3429344
(17) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 4611040
(18) maxpool 512 x 38 x 38 512 x 19 x 19 4611040
(19) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 9333728
(20) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 9860064
(21) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 14582752
(22) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 15109088
(23) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 19831776
(24) conv-bn-leaky 1024 x 19 x 19 1024 x 19 x 19 29273056
(25) conv-bn-leaky 1024 x 19 x 19 1024 x 19 x 19 38714336
(26) route - 512 x 38 x 38 38714336
(27) conv-bn-leaky 512 x 38 x 38 64 x 38 x 38 38747360
(28) reorg 64 x 38 x 38 256 x 19 x 19 38747360
(29) route - 1280 x 19 x 19 38747360
(30) conv-bn-leaky 1280 x 19 x 19 1024 x 19 x 19 50547936
(31) conv-linear 1024 x 19 x 19 425 x 19 x 19 50983561
(32) region 425 x 19 x 19 425 x 19 x 19 50983561
Anchors are being converted to network input resolution i.e. Anchors x 32 (stride)
Output blob names :
region_32
Using previously generated plan file located at /root/deepstream_reference_apps-master/yolo/data/yolov2-kFLOAT-kGPU-batch1.engine
Loading TRT Engine…
Loading Complete!
Running…
Frame Number = 0 Number of objects = 3 Car Count = 0 Person Count = 2 Bicycle Count = 0 Truck Count = 0
ERROR from element h264-parser: GStreamer encountered a general stream error.
Error: GStreamer encountered a general stream error.
Returned, stopping playback
Deleting pipeline

Please try running with GST_DEBUG=3 to get more logs which will help you in debugging the problem. Then again the above solution i have suggested is for pipelines running on baremetal. As i said earlier, running docker with “xhost +” is recommended.

I made the following changes exactly as you told me, are you wrong?

I am looking for another way because I can not do “xhost +”.
Could you avoid fakesink errors without using a display?

deepstream-yolo-app.cpp#L194

sink = gst_element_factory_make (“nveglglessink”, “nvvideo-renderer”);

<nveglglessink → fakesink>

error

GST_DEBUG=3 deepstream-yolo-app Tesla /root/DeepStream_Release/samples/streams/sample_720p.h264 /root/deepstream_reference_apps-master/yolo/config/yolov2.txt

Now playing: /root/DeepStream_Release/samples/streams/sample_720p.h264
Loading pre-trained weights…
Loading complete!
Total Number of weights read : 50983561
layer inp_size out_size weightPtr
(1) conv-bn-leaky 3 x 608 x 608 32 x 608 x 608 992
(2) maxpool 32 x 608 x 608 32 x 304 x 304 992
(3) conv-bn-leaky 32 x 304 x 304 64 x 304 x 304 19680
(4) maxpool 64 x 304 x 304 64 x 152 x 152 19680
(5) conv-bn-leaky 64 x 152 x 152 128 x 152 x 152 93920
(6) conv-bn-leaky 128 x 152 x 152 64 x 152 x 152 102368
(7) conv-bn-leaky 64 x 152 x 152 128 x 152 x 152 176608
(8) maxpool 128 x 152 x 152 128 x 76 x 76 176608
(9) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 472544
(10) conv-bn-leaky 256 x 76 x 76 128 x 76 x 76 505824
(11) conv-bn-leaky 128 x 76 x 76 256 x 76 x 76 801760
(12) maxpool 256 x 76 x 76 256 x 38 x 38 801760
(13) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 1983456
(14) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 2115552
(15) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 3297248
(16) conv-bn-leaky 512 x 38 x 38 256 x 38 x 38 3429344
(17) conv-bn-leaky 256 x 38 x 38 512 x 38 x 38 4611040
(18) maxpool 512 x 38 x 38 512 x 19 x 19 4611040
(19) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 9333728
(20) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 9860064
(21) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 14582752
(22) conv-bn-leaky 1024 x 19 x 19 512 x 19 x 19 15109088
(23) conv-bn-leaky 512 x 19 x 19 1024 x 19 x 19 19831776
(24) conv-bn-leaky 1024 x 19 x 19 1024 x 19 x 19 29273056
(25) conv-bn-leaky 1024 x 19 x 19 1024 x 19 x 19 38714336
(26) route - 512 x 38 x 38 38714336
(27) conv-bn-leaky 512 x 38 x 38 64 x 38 x 38 38747360
(28) reorg 64 x 38 x 38 256 x 19 x 19 38747360
(29) route - 1280 x 19 x 19 38747360
(30) conv-bn-leaky 1280 x 19 x 19 1024 x 19 x 19 50547936
(31) conv-linear 1024 x 19 x 19 425 x 19 x 19 50983561
(32) region 425 x 19 x 19 425 x 19 x 19 50983561
Anchors are being converted to network input resolution i.e. Anchors x 32 (stride)
Output blob names :
region_32
Using previously generated plan file located at /root/deepstream_reference_apps-master/yolo/data/yolov2-kFLOAT-kGPU-batch1.engine
Loading TRT Engine…
Loading Complete!
0:00:05.377423174 8420 0x263e630 WARN basesrc gstbasesrc.c:3489:gst_base_src_start_complete: pad not activated yet
Running…
0:00:05.409981693 8420 0x233ee80 ERROR egladaption ext/eglgles/gstegladaptation.c:663:gst_egl_adaptation_choose_config: Could not find matching framebuffer config
0:00:05.410044895 8420 0x233ee80 ERROR egladaption ext/eglgles/gstegladaptation.c:676:gst_egl_adaptation_choose_config: Couldn’t choose an usable config
0:00:05.410064602 8420 0x233ee80 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2719:gst_eglglessink_configure_caps: Couldn’t choose EGL config
0:00:05.410081836 8420 0x233ee80 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2779:gst_eglglessink_configure_caps: Configuring caps failed
0:00:05.410131068 8420 0x233eed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
0:00:05.410186491 8420 0x233eed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
0:00:05.410201388 8420 0x233eed0 WARN GST_PADS gstpad.c:4092:gst_pad_peer_query:nv-onscreendisplay:src could not send sticky events
0:00:05.414384413 8420 0x233eed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
0:00:05.414445927 8420 0x233eed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
Frame Number = 0 Number of objects = 3 Car Count = 0 Person Count = 2 Bicycle Count = 0 Truck Count = 0
0:00:05.540124438 8420 0x233eed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
0:00:05.540368467 8420 0x233eed0 WARN baseparse gstbaseparse.c:3599:gst_base_parse_loop: error: streaming stopped, reason not-negotiated
0:00:05.540492979 8420 0x233eed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
0:00:05.540514979 8420 0x233eed0 ERROR nveglglessink ext/eglgles/gsteglglessink.c:2824:gst_eglglessink_setcaps: Failed to configure caps
ERROR from element h264-parser: GStreamer encountered a general stream error.
Error: GStreamer encountered a general stream error.
Returned, stopping playback
Deleting pipeline

After making the change, did you build and install the app ? It looks like eglsink is still being called ?

When I run “make & make install” again, the error disappears.
Thank you for your help many times.
I will ask you questions if there is anything else.