jetson-inference icon indicating copy to clipboard operation
jetson-inference copied to clipboard

no element "nvv4l2decoder" in Docker

Open poett1 opened this issue 1 year ago • 4 comments

I'm trying to run the detectnet tracking example using docker on Xavier AGX (L4T 35.2.1). It seems like the nvv4l2decoder is not installed in the container.

root@xavieragx:/jetson-inference/build/aarch64/bin# detectnet --model=peoplenet --tracking pedestrians.mp4 pedestrians_tracking.mp4
[gstreamer] initialized gstreamer, version 1.16.3.0
[gstreamer] gstDecoder -- creating decoder for pedestrians.mp4
[gstreamer] gstDecoder -- discovered video resolution: 960x540  (framerate 29.970030 Hz)
[gstreamer] gstDecoder -- discovered video caps:  video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3.1, profile=(string)high, codec_data=(buffer)0164001fffe100196764001facd940f0117ef01100000303e90000ea608f18319601000668ebe132c8b0, width=(int)960, height=(int)540, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
[gstreamer] gstDecoder -- pipeline string:
[gstreamer] filesrc location=pedestrians.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder name=decoder enable-max-performance=1 ! video/x-raw(memory:NVMM) ! nvvidconv name=vidconv ! video/x-raw ! appsink name=mysink
[gstreamer] gstDecoder -- failed to create pipeline
[gstreamer]    (no element "nvv4l2decoder")
[gstreamer] failed to create decoder pipeline
[gstreamer] gstDecoder -- failed to create decoder for file:///jetson-inference/build/aarch64/bin/pedestrians.mp4
detectnet:  failed to create input stream

Gstreamer is unable to find the plugin:

root@xavieragx:/jetson-inference/build/aarch64/bin# gst-inspect-1.0 nvv4l2decoder
No such element or plugin 'nvv4l2decoder'

Any hints?

poett1 avatar Sep 12 '23 09:09 poett1

Is you run gst-inspect outside container, can nvv4l2decoder be found? These plug-ins get mounted into container by gstreamer


From: poett1 @.> Sent: Tuesday, September 12, 2023 5:40:37 AM To: dusty-nv/jetson-inference @.> Cc: Subscribed @.***> Subject: [dusty-nv/jetson-inference] no element "nvv4l2decoder" in Docker (Issue #1727)

I'm trying to run the detectnet tracking example using docker on Xavier AGX (L4T 35.2.1). It seems like the nvv4l2decoder is not installed in the container.

@.***:/jetson-inference/build/aarch64/bin# detectnet --model=peoplenet --tracking pedestrians.mp4 pedestrians_tracking.mp4 [gstreamer] initialized gstreamer, version 1.16.3.0 [gstreamer] gstDecoder -- creating decoder for pedestrians.mp4 [gstreamer] gstDecoder -- discovered video resolution: 960x540 (framerate 29.970030 Hz) [gstreamer] gstDecoder -- discovered video caps: video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3.1, profile=(string)high, codec_data=(buffer)0164001fffe100196764001facd940f0117ef01100000303e90000ea608f18319601000668ebe132c8b0, width=(int)960, height=(int)540, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true [gstreamer] gstDecoder -- pipeline string: [gstreamer] filesrc location=pedestrians.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder name=decoder enable-max-performance=1 ! video/x-raw(memory:NVMM) ! nvvidconv name=vidconv ! video/x-raw ! appsink name=mysink [gstreamer] gstDecoder -- failed to create pipeline [gstreamer] (no element "nvv4l2decoder") [gstreamer] failed to create decoder pipeline [gstreamer] gstDecoder -- failed to create decoder for file:///jetson-inference/build/aarch64/bin/pedestrians.mp4 detectnet: failed to create input stream

Gstreamer is unable to find the plugin:

@.***:/jetson-inference/build/aarch64/bin# gst-inspect-1.0 nvv4l2decoder No such element or plugin 'nvv4l2decoder'

Any hints?

— Reply to this email directly, view it on GitHubhttps://github.com/dusty-nv/jetson-inference/issues/1727, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADVEGK7IWNA4DYKR3A2HLG3X2AUZLANCNFSM6AAAAAA4USKUTE. You are receiving this because you are subscribed to this thread.Message ID: @.***>

dusty-nv avatar Sep 12 '23 12:09 dusty-nv

user@xavieragx:~/Dev$ gst-inspect-1.0 nvv4l2decoder
Factory Details:
  Rank                     primary + 11 (267)
  Long-name                NVIDIA v4l2 video decoder
  Klass                    Codec/Decoder/Video
  Description              Decode video streams via V4L2 API
  Author                   Nicolas Dufresne <[email protected]>, Viranjan Pagar <[email protected]>

Plugin Details:
  Name                     nvvideo4linux2
  Description              Nvidia elements for Video 4 Linux
  Filename                 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvideo4linux2.so
  Version                  1.14.0
  License                  LGPL
  Source module            nvvideo4linux2
  Binary package           nvvideo4linux2
  Origin URL               http://nvidia.com/
[...]

Outside the container everything looks good so far.

poett1 avatar Sep 12 '23 18:09 poett1

Hmm, does your /etc/nvidia-container-runtime/host-files-for-container.d/l4t.csv file look like this?

cat /etc/nvidia-container-runtime/host-files-for-container.d/l4t.csv | grep gst
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvarguscamerasrc.so
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvcompositor.so
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvdrmvideosink.so
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnveglglessink.so
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnveglstreamsrc.so
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvegltransform.so
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvivafilter.so
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvjpeg.so
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvtee.so
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvv4l2camerasrc.so
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvidconv.so
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvideo4linux2.so
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvideosink.so
lib, /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvideosinks.so
lib, /usr/lib/aarch64-linux-gnu/libgstnvegl-1.0.so.0
lib, /usr/lib/aarch64-linux-gnu/libgstnvexifmeta.so
lib, /usr/lib/aarch64-linux-gnu/libgstnvivameta.so
lib, /usr/lib/aarch64-linux-gnu/tegra/libgstnvcustomhelper.so.1.0.0
lib, /usr/lib/aarch64-linux-gnu/tegra/libgstnvdsseimeta.so.1.0.0
sym, /usr/lib/aarch64-linux-gnu/tegra/libgstnvcustomhelper.so
sym, /usr/lib/aarch64-linux-gnu/tegra/libgstnvdsseimeta.so

dusty-nv avatar Sep 13 '23 00:09 dusty-nv

No, its different.

--- dusty	2023-09-13 15:47:16.478150365 +0200
+++ my	2023-09-13 15:47:26.586610374 +0200
@@ -15,7 +15,8 @@
 lib, /usr/lib/aarch64-linux-gnu/libgstnvegl-1.0.so.0
 lib, /usr/lib/aarch64-linux-gnu/libgstnvexifmeta.so
 lib, /usr/lib/aarch64-linux-gnu/libgstnvivameta.so
-lib, /usr/lib/aarch64-linux-gnu/tegra/libgstnvcustomhelper.so.1.0.0
 lib, /usr/lib/aarch64-linux-gnu/tegra/libgstnvdsseimeta.so.1.0.0
-sym, /usr/lib/aarch64-linux-gnu/tegra/libgstnvcustomhelper.so
-sym, /usr/lib/aarch64-linux-gnu/tegra/libgstnvdsseimeta.so
\ No newline at end of file
+lib, /usr/lib/aarch64-linux-gnu/tegra/libnvgstreamer-1.0.so
+sym, /usr/lib/aarch64-linux-gnu/libgstreamer-1.0.so.0.1603.99999
+sym, /usr/lib/aarch64-linux-gnu/tegra/libgstnvdsseimeta.so
+sym, /usr/lib/aarch64-linux-gnu/tegra/libgstreamer-1.0.so.0
\ No newline at end of file

poett1 avatar Sep 13 '23 14:09 poett1

I'm having the same issue, @poett1 did you manage to make it work?

tonynajjar avatar Jun 14 '24 16:06 tonynajjar

I solved it by setting /etc/docker/daemon.json to:

{
    "runtimes": {
        "nvidia": {
            "path": "/usr/bin/nvidia-container-runtime",
            "runtimeArgs": []
        }
    },
	"default-runtime": "nvidia"
}

Otherwise the Nividia libraries are not mounted into the container.

poett1 avatar Jun 16 '24 14:06 poett1