Preparing A DeepStream Application on DSBOX-NX
Updated: Mar 6
In this tutorial, we will make our own DeepStream application which includes centered transparent logo.
First of all, we need a DeepStream SDK installed DSBOX-NX. Next, we prepare and configure our own DeepStream application with CMake. Finally, we add transparent logo on application window.
If you have not installed DeepStream SDK yet, you can install it from here. In this quick guide, you can install DeepStream SDK in 3 ways: Using NVIDIA SDK Manager, the DeepStream tar package and the DeepStream Debian package.
Build Your Own DeepStream Application
In our CMake project, we need GStreamer RTSP_Server source files at
two specific source files at (in /opt/nvidia/deepstream/deepstream-4.0/sources/apps folder)
model files' folder at
and (two) configuration files at
Copy gst folder from GitHub downloaded zip file, model files' folder, two source files and two configuration files. Create "build" folder and "CMakeLists.txt" file.
After that, we configure our CMakeLists.txt file in our project folder.
In build folder, open terminal and type "cmake .. && make".
Set Your Configuration File & Build Again
In "config_infer_primary.txt" file, change "batch-size=32". For models' file path, change "../models/Primary_Detector" as "./models/Primary_Detector" (5 times).
Change the name of "source30_1080p_dec_infer-resnet_tiled_display_int8.txt" as "test_1080p_dec_infer-resnet_tiled_display_int8.txt". In this file, we will change tiled-display, source(s), sink0, streammux and primary-gie blocks. At the end of file, we add tracker and tests blocks.
In sources blocks, there are 32 sources (from source0 to source31) have their own URI file paths. In this picture, the 23rd source is an example of other sources' style. Each source changes only its URI path.
Now we can run in terminal with this script:
./deepstreamApp -c ../test_1080p_dec_infer-resnet_tiled_display_int8.txt
If you get an error like "-lgstrtspserver-1.0.so not found", you should type in terminal (if libgstrtspserver-1.0.so.0 exists)
sudo ln -s /usr/lib/aarch64-linux-gnu/libgstrtspserver-1.0.so.0 /usr/lib/aarch64-linux-gnu/libgstrtspserver-1.0.so
Add Logo on Your DeepStream Application
In our source files we need to change two files (deepstream_osd.h & deepstream_osd_bin.c) to add transparent logo on the centre of DeepStream window.
In deepstream_osd.h file, we need to add logooverlay & nvvidconv2 elements.
In deepstream_osd_bin.h file, we need to define logooverlay & nvvidconv2 elements in 3 places.
After that, re-compile your CMake project and run again.
Thanks for reading.