nvidia gstreamer jetson

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

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

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
2 Likes

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