GstCUDA - Building and Installation Guide
Getting the Code
GstCUDA is RidgeRun's professional product. You can purchase GstCUDA, with full source code, from the RidgeRun Store or using the Shopping Cart:
| |
Dependencies
GstCUDA is supported for the Jetson TX1/TX2/Nano/Xavier platforms and PC systems that have an NVIDIA GPU. The following packages are needed in order to build and use GstCUDA:
- GStreamer 1.8.0.1 version or greater:
- gstreamer-1.0
- gstreamer-plugins-base-1.0
- gstreamer-base-1.0
- gstreamer-check-1.0
- gstreamer-video-1.0
- gstreamer-controller-1.0
- gstreamer-plugins-bad-1.0
- CUDA 8.0 version or greater *
- Mesa EGL
- Installed by JetPack by default, if not got to Installing_CUDA-toolkit_and_VisionWorks_Jetson_TX2/Xavier/Nano
GStreamer
The GStreamer packages are likely already installed in your Tegra Ubuntu OS distribution. In case you want to double check and install the missing packages, run the following commands.
sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-bad
CUDA L4T package
The Jetpack default installation will flash and install all the necessary CUDA packages. This section describes how to perform a manual installation, which is typically __NOT__ needed
Installation guide:
1. You will need to know which distribution version you are using:
lsb_release -a
2. Go to the CUDA 11.6.1 download archive and follow the selection menu.
- For Jetson platform you can follow this link: CUDA 11.6.1 Jetson Configuration
- For Ubuntu x86 platform you can follow this link: CUDA 11.6.1 Ubuntu x86 Configuration
Select the version depending on the lsb_release command executed above. We recommend using the deb (local) option for the installation.
3. Once you have selected your system setup, NVIDIA will show you the installation instructions for those requirements.
Mesa EGL
Run the following command to install the Mesa EGL package:
sudo apt install libegl1-mesa-dev
GTK-Doc
Run the following command to install the GTK-Doc package:
sudo apt install gtk-doc-tools
Building the project
The GstCUDA package must be built natively.
For the Jetson TX1/TX2/Nano/Xavier/Orin platforms
In order to build the project run the following commands. Note that the libdir variable corresponds to the Jetson system.
./autogen.sh --prefix=/usr/ --libdir=/usr/lib/aarch64-linux-gnu/ make
The autogen.sh script will automatically run the configure script. In case a more complex configuration is needed, the configure step may be executed manually:
./autogen.sh --noconfigure ./configure --prefix=/usr/ --libdir=/usr/lib/aarch64-linux-gnu/ <additional advanced options> make
For x86 platforms
In order to build the project run the following commands.
./autogen.sh --noconfigure ./configure --prefix=/usr/ --libdir=/usr/lib/x86_64-linux-gnu/ --disable-nvmm <additional advanced options> make
Using another CUDA Version
If you want to utilize another CUDA version you can use the following flag during the configuration step.
--with-cuda-prefix=/usr/local/cuda-<VERSION>
Finally, the status of the current version may be checked by running the unit tests:
make check
Installing the plugin
The plugin is installed to the GStreamer's default plug-in location in the file system by running:
sudo make install
To verify that the plug-in was correctly installed, you should run:
gst-inspect-1.0 cuda
with expected output
Plugin Details: Name cuda Description Allows frames to be processed by the GPU using a custom CUDA library algorithm Filename /usr/lib/<platform>/gstreamer-1.0/libgstcuda.so Version 0.14.1.1 License Proprietary Source module gst-cuda Source release date 2022-09-28 20:35 (UTC) Binary package GStreamer CUDA Plug-in Origin URL Unknown package origin cudamux: cudamux cudafilter: cudafilter 2 features: +-- 2 elements
After installing GstCUDA and all its dependencies, the Linux O.S. running on your platform must be rebooted before running a GStreamer pipeline that uses GstCUDA.