# nvidia gstreamer jetson

**URL:** <https://forums.balena.io/t/nvidia-gstreamer-jetson/233060>\
**Category:** balenaOS\
**Tags:** docker, jetson\
**Created:** [January 12, 2021, 1:49pm UTC](https://forums.balena.io/t/nvidia-gstreamer-jetson/233060 "2021-01-12T13:49:09Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![jap937](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jap937](https://forums.balena.io/u/jap937)\
**Post date:** [January 20, 2021, 1:26pm UTC](https://forums.balena.io/t/nvidia-gstreamer-jetson/233060/38 "2021-01-20T13:26:50Z")

</div>

yes, currently working on that,  
opencv did not change anything though

```
>>> import cv2
>>> cap = cv2.VideoCapture("rtspsrc location=rtsp://192.168.178.139/live/av0 latency=10 ! queue ! decodebin ! nvvidconv ! video/x-raw, width=1280 , height=720 ,format=(string)BGRx ! appsink")
libEGL warning: DRI2: failed to authenticate
libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

nvbuf_utils: Could not get EGL display connection
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 

(python3:481): GStreamer-CRITICAL **: 13:22:31.063: gst_mini_object_copy: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.063: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.063: gst_structure_copy: assertion 'structure != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.063: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.064: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.064: gst_structure_copy: assertion 'structure != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.064: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.065: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.065: gst_mini_object_ref: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.066: gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps1)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.067: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.068: gst_mini_object_copy: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.068: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.068: gst_structure_copy: assertion 'structure != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.069: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.069: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.069: gst_structure_copy: assertion 'structure != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.070: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.070: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.070: gst_mini_object_ref: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.071: gst_mini_object_copy: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.071: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.072: gst_structure_copy: assertion 'structure != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.073: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.074: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.074: gst_structure_copy: assertion 'structure != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.074: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.075: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.075: gst_mini_object_ref: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.076: gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps2)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.076: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.076: gst_mini_object_copy: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.077: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.077: gst_structure_copy: assertion 'structure != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.077: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.078: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.078: gst_structure_copy: assertion 'structure != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.078: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.079: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.079: gst_mini_object_ref: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.080: gst_pad_template_new: assertion 'caps != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.080: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.081: gst_element_request_compatible_pad: assertion 'GST_IS_PAD_TEMPLATE (templ)' failed

(python3:481): GStreamer-CRITICAL **: 13:22:31.082: gst_object_unref: assertion 'object != NULL' failed

```

interestingly running the following command eliminates the warnings, but reintroduces the segmentation error  
` echo "/usr/lib/aarch64-linux-gnu/tegra-egl" > /etc/ld.so.conf.d/nvidia-tegra.conf`

---

<div class="post-metadata">

**Author:** ![jap937](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jap937](https://forums.balena.io/u/jap937)\
**Post date:** [January 22, 2021, 3:38pm UTC](https://forums.balena.io/t/nvidia-gstreamer-jetson/233060/40 "2021-01-22T15:38:40Z")

</div>

currently still working on it, but no real progress. i started using the NVIDIA forums for anyone interested.

> **[Docker gstreamer](https://forums.developer.nvidia.com/t/docker-gstreamer/166436)**
>
> hi, I am currently attempting to get my gstreamer application working in a docker without requiring --runtime nvidia. I am however running into the following when running gst-inspect-nvvidconv root@devkit:/# echo $DISPLAY :0 root@devkit:/#...

---

<div class="post-metadata">

**Author:** ![jap937](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jap937](https://forums.balena.io/u/jap937)\
**Post date:** [February 3, 2021, 4:05pm UTC](https://forums.balena.io/t/nvidia-gstreamer-jetson/233060/42 "2021-02-03T16:05:46Z")

</div>

I have been messing around with some other bugs, but all systems are working fine now.  
basically, the LibEGL warnings can be completely ignored and do not seem to have an effect on the gstreamer.  
nvidia-l4t-gstreamer version also does not seem to be very important  
thanks for the help

my Dockerfile in case it helps someone

```
RUN echo 'upgrading apt-sources' &&\
    sed -i 's/r32 main/r32.4 main/g' /etc/apt/sources.list.d/nvidia.list &&\
    apt-get update

# optional to upgrade L4T packages?
ENV config=--force-confnew
RUN apt-get install -y -o Dpkg::Options::=$config nvidia-l4t-gstreamer

##################
#BPS
##################
RUN echo 'install L4T BPS binaries' &&\
    apt-get update && apt-get install -y wget tar lbzip2 python3 libegl1 && \
    wget https://developer.nvidia.com/embedded/L4T/r32_Release_v4.2/t210ref_release_aarch64/Tegra210_Linux_R32.4.2_aarch64.tbz2 && \
    tar xf Tegra210_Linux_R32.4.2_aarch64.tbz2 && \
    cd /Linux_for_Tegra && \
    sed -i 's/config.tbz2\"/config.tbz2\" --exclude=etc\/hosts --exclude=etc\/hostname/g' apply_binaries.sh && \
    sed -i 's/install --owner=root --group=root \"${QEMU_BIN}\" \"${L4T_ROOTFS_DIR}\/usr\/bin\/\"/#install --owner=root --group=root \"${QEMU_BIN}\" \"${L4T_ROOTFS_DIR}\/usr\/bin\/\"/g' nv_tegra/nv-apply-debs.sh && \
    sed -i 's/LC_ALL=C chroot . mount -t proc none \/proc/ /g' nv_tegra/nv-apply-debs.sh && \
    sed -i 's/umount ${L4T_ROOTFS_DIR}\/proc/ /g' nv_tegra/nv-apply-debs.sh && \
    sed -i 's/chroot . \// /g' nv_tegra/nv-apply-debs.sh && \
    ./apply_binaries.sh -r / --target-overlay && cd .. \
    rm -rf /Tegra210_Linux_R32.4.2_aarch64.tbz2 && \
    rm -rf /Linux_for_Tegra && \
    echo "/usr/lib/aarch64-linux-gnu/tegra" > /etc/ld.so.conf.d/nvidia-tegra.conf && ldconfig

ENV LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/tegra
ENV XFCE_PANEL_MIGRATE_DEFAULT=1
ENV UDEV=1
ENV DISPLAY=:0

# # Install X and xfce
RUN \
  apt-get install -y --no-install-recommends \
  xserver-xorg-input-evdev \
  xinit \
  xfce4 \
  xfce4-terminal \
  x11-xserver-utils \
  dbus-x11 \
  xterm

# Prevent screen from turning off
RUN echo "#!/bin/bash" > /etc/X11/xinit/xserverrc \
  && echo "" >> /etc/X11/xinit/xserverrc \
  && echo 'exec /usr/bin/X -s 0 dpms' >> /etc/X11/xinit/xserverrc

RUN echo 'installing cuda' &&\
    apt-get -y install cuda-toolkit-10-2 &&/
    some more stuff
```

---

<div class="post-metadata">

**Author:** ![gelbal](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/gelbal/32/1109_2.png) [@gelbal](https://forums.balena.io/u/gelbal)\
**Post date:** [February 3, 2021, 4:21pm UTC](https://forums.balena.io/t/nvidia-gstreamer-jetson/233060/43 "2021-02-03T16:21:25Z")

</div>

Hey @jap937, I’m happy to hear that you got this working. Thank you for sharing your dockerfile here. Appreciated!

[Previous page](https://forums.balena.io/t/nvidia-gstreamer-jetson/233060.md?page=1)
