Running the following pipeline:
USE_NEW_NVSTREAMMUX=yes gst-launch-1.0 rtspsrc drop-on-latency=True latency=3000 protocols=tcp timeout=0 tcp-timeout=0 teardown-timeout=0 location='rtsp://<user>:<pwd>@<cam-ip>:<port>' ! rtph264depay ! h264parse ! tee ! queue ! decodebin ! tee ! m.sink_0 nvstreammux name=m batch-size=1 sync-inputs=True ! queue ! nvvideoconvert ! 'video/x-raw(memory:NVMM),format=(string)RGBA' ! queue ! nvmultistreamtiler rows=1 columns=1 width=1280 height=720 ! nvdsosd process-mode=1 ! nvvideoconvert ! x264enc tune=zerolatency ! h264parse ! qtmux ! filesink location=video.mp4
where rtspsrc streams from a camera and save to file. Our complete pipeline includes nvinfer and nvtracker elements between the first nvvideoconvert and nvmultistreamtiler, but since the issue can be reproduced without these two elements, we omitted it here for convenience, but kept the two nvvideoconvert.
The pipeline usually runs for about ten minutes and would crash into the following failure:
/dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform_copy.cpp:438: => Failed in mem copy
libnvosd (1386):(ERROR) : cuGraphicsEGLRegisterImage failed : 700
ERROR: from element /GstPipeline:pipeline0/GstNvDsOsd:nvdsosd0: Unable to draw shapes onto video frame by GPU
Additional debug info:
/dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvdsosd/gstnvdsosd.c(645): gst_nvds_osd_transform_ip (): /GstPipeline:pipeline0/GstNvDsOsd:nvdsosd0
Execution ended after 0:01:29.781287790
Setting pipeline to NULL ...
The exact time it crashes is not deterministic, ranging from about 1 to 10 minutes.
We have tested on Jetson Orin Nano devices with JetPack 6.2 and 6.1, both having the same issue. The docker image in use is nvcr.io/nvidia/deepstream-l4t:7.1-triton-multiarch, we installed x264 elements by running:
apt-get update \
&& apt-get install -y --no-install-recommends \
libcairo2-dev \
python3-opencv \
ffmpeg \
&& apt-get install -y --reinstall --no-install-recommends \
libx264-dev \
libx264-163 \
gstreamer1.0-plugins-ugly \
libavcodec58 \
libavutil56 \
libvpx7 \
libmp3lame0 \
libx265-199 \
libxvidcore4 \
libmpg123-0 \
libflac8
Complete system platform info:
- JetPack: 6.2
- Release: 5.15.148
- CUDA: 12.6.68
- cuDNN: 9.3.0.75
- TensorRT: 10.3.0.30
- VPI: 3.2.4
- Vulkan: 1.3.204
The JetPack 6.1 we tested has all the same specs as above except for the JetPack version.
The workaround provided in Failed in mem copy - #24 by yuweiw to use nvvideoconvert compute-hw=1 nvbuf-memory-type=3 didn’t work for our pipeline, it runs into error:
/dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform.cpp:3929: => Transformation Failed -1
We need the pipeline to stably run at least one to two hours to save a video file long enough for our purpose. Please advice what’s the best approach to fix or workaround the issue. Thank you.