Issue building GStreamer 16.2 in Nvidia Jetson TX2

Hey! I’m developing a webrtc gstreamer app in the nvidia jetson TX2. I’ve managed to make it work with gstreamer 14.5 but when trying to comunicate with the client we found some communication issues (posted that in gstreamer devel if anyone’s interested, still haven’t found an answer)

I’ve read that webrtc has some issues in 14.5 that are fixed in 16 so I was trying to build gstreamer 16.2 in my board. The building works fine and gstreamer is installed (I built it from git, checking out version 16.2), my problem comes when trying to make it work, i get the following error:

0:00:06.919807018  4744   0x5586655700 WARN               webrtcbin gstwebrtcbin.c:109:_have_nice_elements:<sendrecv> error: libnice elements are not available
0:00:06.920047657  4744   0x5586655700 ERROR           GST_PIPELINE grammar.y:726:gst_parse_perform_link: could not link queue1 to sendrecv, sendrecv can't handle caps application/x-rtp, media=(string)video, encoding-name=(string)VP8, payload=(int)96
Failed to parse launch: could not link queue1 to sendrecv, sendrecv can't handle caps application/x-rtp, media=(string)video, encoding-name=(string)VP8, payload=(int)96

I’m guessing this is because a problem with libnice, but I have libnice 0.14.1 installed which is what webrtcbin depends on, and libnice shows up linked against libgstwebrtc:

ldd /home/nvidia/gst_1.16.2/gst-plugins-bad/ext/webrtc/.libs/libgstwebrtc.so
	linux-vdso.so.1 (0x0000007f84018000)
	libgtk3-nocsd.so.0 => /usr/lib/aarch64-linux-gnu/libgtk3-nocsd.so.0 (0x0000007f83f70000)
	libgstapp-1.0.so.0 => /home/nvidia/gst_1.16.2/out/lib/libgstapp-1.0.so.0 (0x0000007f83f52000)
	libgstbase-1.0.so.0 => /home/nvidia/gst_1.16.2/out/lib/libgstbase-1.0.so.0 (0x0000007f83ed7000)
	libgstreamer-1.0.so.0 => /home/nvidia/gst_1.16.2/out/lib/libgstreamer-1.0.so.0 (0x0000007f83da3000)
	libgstsdp-1.0.so.0 => /home/nvidia/gst_1.16.2/out/lib/libgstsdp-1.0.so.0 (0x0000007f83d7f000)
	libnice.so.10 => /usr/lib/aarch64-linux-gnu/libnice.so.10 (0x0000007f83d2c000)
	libgio-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libgio-2.0.so.0 (0x0000007f83bae000)
	libgobject-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0 (0x0000007f83b50000)
	libglib-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0 (0x0000007f83a41000)
	libgstwebrtc-1.0.so.0 => /home/nvidia/gst_1.16.2/out/lib/libgstwebrtc-1.0.so.0 (0x0000007f83a28000)
	libgstsctp-1.0.so.0 => /home/nvidia/gst_1.16.2/out/lib/libgstsctp-1.0.so.0 (0x0000007f83a15000)
	libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f838bc000)
	/lib/ld-linux-aarch64.so.1 (0x0000007f83fed000)
	libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007f838a7000)
	libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f8387b000)
	libgmodule-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libgmodule-2.0.so.0 (0x0000007f83867000)
	libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007f837ad000)
	libgstrtp-1.0.so.0 => /home/nvidia/gst_1.16.2/out/lib/libgstrtp-1.0.so.0 (0x0000007f8377c000)
	libgnutls.so.30 => /usr/lib/aarch64-linux-gnu/libgnutls.so.30 (0x0000007f83613000)
	libgupnp-igd-1.0.so.4 => /usr/lib/aarch64-linux-gnu/libgupnp-igd-1.0.so.4 (0x0000007f835fb000)
	libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000007f835ce000)
	libselinux.so.1 => /lib/aarch64-linux-gnu/libselinux.so.1 (0x0000007f8359b000)
	libresolv.so.2 => /lib/aarch64-linux-gnu/libresolv.so.2 (0x0000007f83576000)
	libmount.so.1 => /lib/aarch64-linux-gnu/libmount.so.1 (0x0000007f83519000)
	libffi.so.6 => /usr/lib/aarch64-linux-gnu/libffi.so.6 (0x0000007f83501000)
	libpcre.so.3 => /lib/aarch64-linux-gnu/libpcre.so.3 (0x0000007f8348f000)
	libp11-kit.so.0 => /usr/lib/aarch64-linux-gnu/libp11-kit.so.0 (0x0000007f8337d000)
	libidn2.so.0 => /usr/lib/aarch64-linux-gnu/libidn2.so.0 (0x0000007f83351000)
	libunistring.so.2 => /usr/lib/aarch64-linux-gnu/libunistring.so.2 (0x0000007f831ce000)
	libtasn1.so.6 => /usr/lib/aarch64-linux-gnu/libtasn1.so.6 (0x0000007f831ad000)
	libnettle.so.6 => /usr/lib/aarch64-linux-gnu/libnettle.so.6 (0x0000007f8316c000)
	libhogweed.so.4 => /usr/lib/aarch64-linux-gnu/libhogweed.so.4 (0x0000007f8312b000)
	libgmp.so.10 => /usr/lib/aarch64-linux-gnu/libgmp.so.10 (0x0000007f830ae000)
	libgssdp-1.0.so.3 => /usr/lib/aarch64-linux-gnu/libgssdp-1.0.so.3 (0x0000007f8308d000)
	libgupnp-1.0.so.4 => /usr/lib/aarch64-linux-gnu/libgupnp-1.0.so.4 (0x0000007f83049000)
	libblkid.so.1 => /lib/aarch64-linux-gnu/libblkid.so.1 (0x0000007f82ff1000)
	libsoup-2.4.so.1 => /usr/lib/libsoup-2.4.so.1 (0x0000007f82f14000)
	libxml2.so.2 => /usr/lib/aarch64-linux-gnu/libxml2.so.2 (0x0000007f82d74000)
	libuuid.so.1 => /lib/aarch64-linux-gnu/libuuid.so.1 (0x0000007f82d5d000)
	libsqlite3.so.0 => /usr/lib/aarch64-linux-gnu/libsqlite3.so.0 (0x0000007f82c61000)
	libicuuc.so.60 => /usr/lib/aarch64-linux-gnu/libicuuc.so.60 (0x0000007f82a8b000)
	liblzma.so.5 => /lib/aarch64-linux-gnu/liblzma.so.5 (0x0000007f82a5b000)
	libicudata.so.60 => /usr/lib/aarch64-linux-gnu/libicudata.so.60 (0x0000007f810a2000)
	libstdc++.so.6 => /usr/lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007f80f0e000)
	libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007f80eea000)

The code I’m using is in the gstreamer-devel post above if it’s needed for something, anyone has any idea about the problem?

Hi,
We have buil dinstructions in gstreamer user guide. FYR.

The NVIDIA plugins are built with 1.14.5 and may not be compatible with newer version. Please note this.

Hey! thanks for your answer, I was following that guide but I needed to instal gstreamer1.0-nice built for gstreamer 1.16, now that part works.

However I have another question:

When trying to build gstreamer from source using your guide, I encounter several issues in 32.4.2. My program uses both nvdec/nvenc and omxenc/omxdec, but when building gstreamer it doesn’t install this plugins and I don’t knwo why. Checking gst-plugins-bad I see it’s because it cant find nvcuvid.h, but I don’t know how to install this plugin in the nvidia jetson, any help?

Hi,
The nvidia gstreamer-1.0 libraries include:

libgstnvarguscamera.so
libgstnvcompositor.so
libgstnvdrmvideosink.so
libgstnveglglessink.so
libgstnveglstreamsrc.so
libgstnvegltransform.so
libgstnvivafilter.so
libgstnvjpeg.so
libgstnvtee.so
libgstnvvidconv.so
libgstnvvideo4linux2.so
libgstnvvideocuda.so
libgstnvvideosink.so
libgstnvvideosinks.so
libgstomx.so

Please make sure you have all libraries copied to the path of gstreamer16.2, clean the cache and check again.

$ rm ~/.cache/gstreamer-1.0/registry.aarch64.bin

Hey! If I understand correctly, according to your gstreamer guide those libraries are copied after building gstreamer, not before, but my issue comes in building. When doing either gst-install --prefix=/home/ubuntu/gst-1.14.5 --version=1.14.5 or building from sources, gst-plugins-bad decides not to build nvdec/nvenc or webrtc, when it’s dependencies are installed:

configure: *** checking feature: nvdec ***
configure: *** for plug-ins: nvdec ***
checking for cuvidCtxLock in -lnvcuvid... no
configure: WARNING: Could not find library nvcuvid
configure: *** These plugins will not be built: nvdec

configure: *** checking feature: NVIDIA Encode API ***
configure: *** for plug-ins: nvenc ***
checking for NvEncodeAPICreateInstance in -lnvidia-encode... no
configure: WARNING: Could not find library nvidia-encode
configure: *** These plugins will not be built: nvenc

Hi,
The nvenc and nvdec are not built since these are for desktop GPUs. We have gst-v4l2 plugins with hardware acceleration on Jetson platforms. The plugins are linked with libgstnvvideo4linux2.so.

The plugin I need is nvv4l2vp8enc and that one is missing after building gstreamer (both 1.14 and 1.16), I thought nvenc/dec not being built were the reason behind the missing plugins, what dependencies does gst-v4l2 have that its causing it not being built while building from source?