Problems Running deepstream_test1_app from sources/apps - EGL display errors

Hello all.

We tried compiling and running deepstream_test1_app located in “DeepStream_Release/sources/apps/deepstream-test1” path on a cloud instance with Quadro P4000 GPU. After compiling, the binary file got generated with the name “deepstream_test1_app”. When we tried running the file with the sample video provided in streams (setting the GST_DEBUG environment variable to 4), we encountered the following errors:

0:00:09.095460533 10137      0x1325720 ERROR            egladaption ext/eglgles/gstegladaptation.c:663:gst_egl_adaptation_choose_config:<nvvideo-renderer> Could not find matching framebuffer config
0:00:09.095489073 10137      0x1325720 ERROR            egladaption ext/eglgles/gstegladaptation.c:676:gst_egl_adaptation_choose_config:<nvvideo-renderer> Couldn't choose an usable config
0:00:09.095494656 10137      0x1325720 ERROR          nveglglessink ext/eglgles/gsteglglessink.c:2706:gst_eglglessink_configure_caps:<nvvideo-renderer> Couldn't choose EGL config
0:00:09.095505847 10137      0x1325720 ERROR          nveglglessink ext/eglgles/gsteglglessink.c:2766:gst_eglglessink_configure_caps:<nvvideo-renderer> Configuring caps failed
0:00:09.095551569 10137      0x13256d0 ERROR          nveglglessink ext/eglgles/gsteglglessink.c:2811:gst_eglglessink_setcaps:<nvvideo-renderer> Failed to configure caps
0:00:09.095625344 10137      0x13256d0 ERROR          nveglglessink ext/eglgles/gsteglglessink.c:2811:gst_eglglessink_setcaps:<nvvideo-renderer> Failed to configure caps
0:00:11.722946822  9221      0x20cead0 ERROR          nveglglessink ext/eglgles/gsteglglessink.c:2811:gst_eglglessink_setcaps:<nvvideo-renderer> Failed to configure caps

Despite the errors, the code runs fine and prints the number of objects in each frame. Naturally, we would like to get visual confirmation of this success, so we tried to run the same binary using a VNC remote desktop. When we did so, the program stalls after printing “Running…” and gives us the following errors:

0:00:00.094049373  7618       0x6d1600 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvvideo-renderer> current NULL pending VOID_PENDING, desired next READY
0:00:00.094751717  7618       0x6d1600 ERROR            egladaption ext/eglgles/gstegladaptation_egl.c:144:gst_egl_adaptation_init_display:<nvvideo-renderer> Could not get EGL display connection
0:00:00.094766339  7618       0x6d1600 ERROR            egladaption ext/eglgles/gstegladaptation_egl.c:185:gst_egl_adaptation_init_display:<nvvideo-renderer> Couldn't setup window/surface from handle
0:00:00.094770989  7618       0x6d1600 ERROR          nveglglessink ext/eglgles/gsteglglessink.c:526:egl_init:<nvvideo-renderer> Couldn't init EGL display
0:00:00.094775199  7618       0x6d1600 ERROR          nveglglessink ext/eglgles/gsteglglessink.c:552:egl_init:<nvvideo-renderer> Failed to perform EGL init

We encountered similar issues with the EGL display due to missing drivers when running deepstream-app with the config files in samples/config on a remote machine using VNC. But, we were able to overcome the problem by specifying the use of a file sink rather than a windowed display in a configuration file.

Because such a configuration file is unavailable for these samples, we have been attempting to implement a similar solution by reconfiguring the gstreamer pipeline from its current setup (file-source → h264-parser → nvh264-decoder → nvinfer → filter1 → nvvidconv → filter2 → nvosd → video-renderer) to something that using a filesink instead of the nvosd + video-renderer combo (something along the lines of file-source → h264-parser → nvh264-decoder → nvinfer → filter1 → x264enc → mp4mux → filesink). We are having trouble trying to figure out how exactly to accomplish this - when we try to attach the x264enc element to the filter1 element (which has source format NV12), we receive an incompatible format error from GStreamer, even though the x264enc element should accept NV12 format on its sink pad.

We are relatively new to GStreamer and are having some trouble figuring out what’s wrong with our pipeline and how to remedy the issue, as it is quite difficult to find examples/documentation for GStreamer’s C++ API. If someone would be willing to provide us with some guidance on how to create the filesink pipeline that we’re trying to build, the help would be much appreciated.


We have already have file sink, you can try with deepstream-app -c /path to ds package/samples/configs/deepstream-app/source30_720p_dec_infer-resnet_tiled_display_int8.txt

change Type to 3 for file sink
#Type - 1=FakeSink 2=EglSink 3=File

Hello amycao, thanks for the reply. We were already able to save the inference output into a file, using file sink (type 3), when running deepstream-app with configuration files from /path_to_ds_package/samples/configs/deepstream-app/. But, we do not have a similar config file in the /path_to_ds_package/sources/apps/deepstream-test1. The config file which is present in this path is as follows:

# Copyright (c) 2018 NVIDIA Corporation.  All rights reserved.
# NVIDIA Corporation and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto.  Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA Corporation is strictly prohibited.


It doesn’t have the sink parameter where we can change the sink type to file sink, similar to what we have in the config files at /path_to_ds_package/samples/configs/deepstream-app. So, we have been attempting to implement a file sink solution by reconfiguring the gstreamer pipeline in the deepstream_test1_app.c file as discussed in the original post. Please let us know if it is possible to include sink property into the above config file to save the output to a file. If not, it would really help if you could suggest an alternate pipeline rather than the one originally provided in deepstream_test1_app.c (file-source → h264-parser → nvh264-decoder → nvinfer → filter1 → nvvidconv → filter2 → nvosd → video-renderer) to enable file sinking.

Hello all. Found the solution to our question in the following thread:

Thanks DaneLLL, and amycao for the help.