Docker gstreamer

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:/# gst-inspect-1.0 nvvidconv
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
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
Factory Details:
#### some nvvidconv properties
#

when running my actual pipeline (using cv2.VideoCapture()) results in the same warnings with the additional errors

I have tried $ echo “/usr/lib/aarch64-linux-gnu/tegra-egl” >> /etc/ld.so.conf.d/nvidia-tegra.conf
this resolves the warning, but results in a segmentation error with gst-inspect

does anybody know whether the fault would be at the libEGL or the gstreamer?

  • L4T 32.4.2
  • xfce4 desktop is running fine from within the docker

Hi,
It might be a permission issue. The user is not in video group. Please refer to

This does not seem to be the issue.
I am not creating any users so i wouldn’t expect this to be an issue

i still wanted to be sure but the following results in the same issue

sudo usermod -a -G video root
su root
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/aarch64-linux-gnu/tegra
gst-inspect-1.0 nvvidconv

EDIT: i did notice that the output shows half the warnings

root@devkit:/# gst-inspect-1.0 nvvidconv
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) 
#folowed by the rest

perhaps a bit more context is useful. any idea of where the problem could be would already be helpful

running “GST_DEBUG=3 gst-launch-1.0 uridecodebin uri=rtsp://192.168.178.109/live/av0 ! nvoverlaysink” opens the stream just fine but with the following warning

0:00:09.223324532    15   0x7f70002f70 WARN          v4l2bufferpool gstv4l2bufferpool.c:1491:gst_v4l2_buffer_pool_dqbuf:<nvv4l2decoder0:pool:sink> v4l2 provided buffer that is too big for the memory it was writing into.  v4l2 claims 1008 bytes used but memory is only 0B.  This is probably a driver bug.

and the opencv pipeline returns

>>> 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:279): GStreamer-CRITICAL **: 09:21:24.312: gst_mini_object_copy: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.312: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.312: gst_structure_copy: assertion 'structure != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.313: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.313: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.313: gst_structure_copy: assertion 'structure != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.314: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.314: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.314: gst_mini_object_ref: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.315: gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps1)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.315: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.315: gst_mini_object_copy: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.315: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.315: gst_structure_copy: assertion 'structure != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.316: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.316: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.316: gst_structure_copy: assertion 'structure != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.316: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.316: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.317: gst_mini_object_ref: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.317: gst_mini_object_copy: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.317: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.317: gst_structure_copy: assertion 'structure != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.317: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.318: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.318: gst_structure_copy: assertion 'structure != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.318: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.318: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.318: gst_mini_object_ref: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.318: gst_caps_can_intersect: assertion 'GST_IS_CAPS (caps2)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.318: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.319: gst_mini_object_copy: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.319: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.319: gst_structure_copy: assertion 'structure != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.319: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.319: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.319: gst_structure_copy: assertion 'structure != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.319: gst_caps_append_structure_full: assertion 'GST_IS_CAPS (caps)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.319: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.319: gst_mini_object_ref: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.320: gst_pad_template_new: assertion 'caps != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.320: gst_mini_object_unref: assertion 'mini_object != NULL' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.320: gst_element_request_compatible_pad: assertion 'GST_IS_PAD_TEMPLATE (templ)' failed

(python3:279): GStreamer-CRITICAL **: 09:21:24.320: gst_object_unref: assertion 'object != NULL' failed
^CTerminated

Hi,
Please check if all nodes in the file are present:

/etc/nvidia-container-runtime/host-files-for-container.d/l4t.csv

Probably some nodes are missing without –runtime.

Hi,

Please try this:

$ sudo docker run -it --rm --device=/dev/nvhost-ctrl --device=/dev/nvhost-ctrl-gpu --device=/dev/nvhost-prof-gpu --device=/dev/nvmap --device=/dev/nvhost-gpu --device=/dev/nvhost-as-gpu --device=/dev/nvhost-vic -v /usr/lib/aarch64-linux-gnu:/usr/lib/aarch64-linux-gnu --network host nvcr.io/nvidia/l4t-tensorflow:r32.4.4-tf2.3-py3
# gst-inspect-1.0 nvvidconv
nvbuf_utils: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR

(gst-plugin-scanner:12): GStreamer-WARNING **: 08:26:07.122: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvideocuda.so': libcuda.so.1: cannot open shared object file: No such file or directory

(gst-plugin-scanner:12): GStreamer-WARNING **: 08:26:07.332: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvarguscamerasrc.so': libcuda.so.1: cannot open shared object file: No such file or directory
nvbuf_utils: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
Factory Details:
  Rank                     primary (256)
  Long-name                NvVidConv Plugin
  Klass                    Filter/Converter/Video/Scaler
  Description              Converts video from one colorspace to another & Resizes
  Author                   amit pandya <apandya@nvidia.com>

Plugin Details:
  Name                     nvvidconv
  Description              video Colorspace conversion & scaler
  Filename                 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvidconv.so
  Version                  1.2.3
  License                  Proprietary
  Source module            gstreamer-nvvconv-plugin
  Binary package           GStreamer nvvconv Plugin
  Origin URL               http://nvidia.com/

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstBaseTransform
                         +----Gstnvvconv

Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-raw(memory:NVMM)
                 format: { (string)I420, (string)I420_10LE, (string)P010_10LE, (string)I420_12LE, (string)UYVY, (string)YUY2, (string)YVYU, (string)NV12, (string)NV16, (string)NV24, (string)GRAY8, (string)BGRx, (string)RGBA }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw
                 format: { (string)I420, (string)UYVY, (string)YUY2, (string)YVYU, (string)NV12, (string)NV16, (string)NV24, (string)P010_10LE, (string)GRAY8, (string)BGRx, (string)RGBA }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
  
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw(memory:NVMM)
                 format: { (string)I420, (string)I420_10LE, (string)P010_10LE, (string)UYVY, (string)YUY2, (string)YVYU, (string)NV12, (string)NV16, (string)NV24, (string)GRAY8, (string)BGRx, (string)RGBA }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw
                 format: { (string)I420, (string)UYVY, (string)YUY2, (string)YVYU, (string)NV12, (string)NV16, (string)NV24, (string)GRAY8, (string)BGRx, (string)RGBA }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]

Element has no clocking capabilities.
Element has no URI handling capabilities.

Pads:
  SINK: 'sink'
    Pad Template: 'sink'
  SRC: 'src'
    Pad Template: 'src'

Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "nvvconv0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  qos                 : Handle Quality-of-Service events
                        flags: readable, writable
                        Boolean. Default: false
  silent              : Produce verbose output ?
                        flags: readable, writable
                        Boolean. Default: false
  flip-method         : video flip methods
                        flags: readable, writable, controllable
                        Enum "GstNvVideoFlipMethod" Default: 0, "none"
                           (0): none             - Identity (no rotation)
                           (1): counterclockwise - Rotate counter-clockwise 90 degrees
                           (2): rotate-180       - Rotate 180 degrees
                           (3): clockwise        - Rotate clockwise 90 degrees
                           (4): horizontal-flip  - Flip horizontally
                           (5): upper-right-diagonal - Flip across upper right/lower left diagonal
                           (6): vertical-flip    - Flip vertically
                           (7): upper-left-diagonal - Flip across upper left/lower right diagonal
  output-buffers      : number of output buffers
                        flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
                        Unsigned Integer. Range: 1 - 4294967295 Default: 4 
  interpolation-method: Set interpolation methods
                        flags: readable, writable, controllable
                        Enum "GstInterpolationMethod" Default: 0, "Nearest"
                           (0): Nearest          - Nearest
                           (1): Bilinear         - Bilinear
                           (2): 5-Tap            - 5-Tap
                           (3): 10-Tap           - 10-Tap
                           (4): Smart            - Smart
                           (5): Nicest           - Nicest
  left                : Pixels to crop at left
                        flags: readable, writable
                        Integer. Range: 0 - 2147483647 Default: 0 
  right               : Pixels to crop at right
                        flags: readable, writable
                        Integer. Range: 0 - 2147483647 Default: 0 
  top                 : Pixels to crop at top
                        flags: readable, writable
                        Integer. Range: 0 - 2147483647 Default: 0 
  bottom              : Pixels to crop at bottom
                        flags: readable, writable
                        Integer. Range: 0 - 2147483647 Default: 0 
  bl-output           : Blocklinear output, applicable only for memory:NVMM NV12 format output buffer
                        flags: readable, writable
                        Boolean. Default: true

Thanks.