Upgrading GStreamer version of NVIDIA Jetson
![]() |
|
The following wiki guides on how to install a GStreamer version on the Jetson other than the one installed by the SDK. It also has information on how to build the Jetson's accelerated GStreamer elements so that they run correctly in the new version.
This has been tested on an NVIDIA Orin AGX using Jetpack 5.1.1.
![]() | Note: Although upgrading the device's GStreamer version can provide new features and/or remove bugs present in GStreamer, NVIDIA only officially supports their accelerated elements for the sdk-installable version. |
Upgrading GStreamer
More details at Setting a GStreamer Alternative Environment-GStreamer-1.16 through GStreamer-1.19
By running these steps for the desired version, you'll have all the software elements built for the specific version. Do note that you might need to install some development libraries for a given element if it is not being built out of the box.
GStreamer 1.16-1.19
git clone https://github.com/GStreamer/gst-build --branch 1.18.6 cd gst-build meson builddir ninja -C builddir
GStreamer >= 1.20
git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git -b 1.22 cd gstreamer meson builddir ninja -C builddir
Installing NVIDIA elements
- This guide only installs nvvidconv, the nvcompositor, and the nvdecoder/encoders, for others the process should be pretty similar, although you might need to patch the Makefile similarly to how this is done for some of these elements.
- Each element is independent of each other, you don't need to install all of them for one of them to work. However, the nvvidconv is used in most pipelines to convert from CPU memory to NVMM memory, so it is commonly needed for most use cases.
Go to https://developer.nvidia.com/embedded/jetson-linux-archive and select the corresponding L4T to the installed Jetpack. From there download the Driver Package (BSP) Sources
tarball, and copy it over to the Jets
Activate the environment
- This is only needed if you didn't install the newer version and want to keep the SDK's version. At the end of this section, there are instructions on how to add each element to the development environment.
# This assumes that you only built the environment and didn't install it cd gst-build # For >=1.20 cd gstreamer ninja -C builddir devenv
Extract the sources
cd ~ # Assuming that this is where you copied the public_sources.tbz2 tarball tar xvf public_sources_3531.tbz2 cd Linux_for_Tegra/source/public/
NVencoder/decoder
# NVdecoder/encoder tar xvf gst-nvvideo4linux2_src.tbz2 cd gst-v4l2 make cd .. # Add plugins to the path without installing GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD/gst-v4l2/
Nvvidconv
![]() | Note: This requires having DeepStream installed, if it isn't installed, use the sdk-manager to install it. |
tar xvf gst-nvvidconv_src.tbz2 cd gst-nvvidconv/ cat > nvvidconv_makefile.patch << EOF --- Makefile +++ Makefile @@ -46,6 +46,8 @@ INCLUDES += -I\$(CUDA_PATH)/include INCLUDES += -I\$(CUDA_PATH)/targets/\$(ARCH)-linux/include +INCLUDES += -I/opt/nvidia/deepstream/deepstream/sources/includes/ + INCLUDES += -I./ PKGS := gstreamer-1.0 \ EOF patch < nvvidconv_makefile.patch make cd .. # Add plugins to the path without installing GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD/gst-nvvidconv/
NvCompositor
tar xvf gst-nvcompositor_src.tbz2 cd gst-nvcompositor/ cat > nvcompositor_makefile.patch << EOF --- Makefile 2023-06-20 22:42:32.041529245 +0000 +++ Makefile 2023-06-20 22:42:01.429480422 +0000 @@ -35,7 +35,15 @@ SRCS := $(wildcard *.c) +ARCH := $(shell uname -m) +ifdef CUDA_VER +CUDA_PATH := /usr/local/cuda-$(CUDA_VER) +else +CUDA_PATH := /usr/local/cuda +endif + INCLUDES += -I./ +INCLUDES += -I/opt/nvidia/deepstream/deepstream/sources/includes/ PKGS := gstreamer-1.0 \ gstreamer-base-1.0 \ @@ -54,7 +62,7 @@ LDFLAGS = -Wl,--no-undefined -L$(LIB_INSTALL_DIR) -Wl,-rpath,$(LIB_INSTALL_DIR) LDFLAGS += -L$(CUDA_PATH)/targets/$(ARCH)-linux/lib/ -LIBS += `pkg-config --libs $(PKGS)` +LIBS += `pkg-config --libs $(PKGS)` -lnvbufsurface -lnvbufsurftransform -lcudart all: $(SO_NAME) EOF patch < nvcompositor_makefile.patch make cd .. # Add plugins to the path without installing GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD/gst-nvcompositor/
For direct inquiries, please refer to the contact information available on our Contact page. Alternatively, you may complete and submit the form provided at the same link. We will respond to your request at our earliest opportunity.
Links to RidgeRun Resources and RidgeRun Artificial Intelligence Solutions can be found in the footer below.