Gstreamer pipeline occasional segfault

Hi, I’ve put together a gstreamer pipeline that simultaneously composites multiple videos to an RTSP stream with nvcompositor and saves each stream independently to a file. This seems to work ~25% of the time, and other times causes a segfault with no error messages.

Anyone have any idea why I might be getting segfaults randomly, and how to potentially resolve (or debug) this issue?

Pipeline:

gst-rtsp-launch --port=8554 "( \
nvv4l2camerasrc device=/dev/video0 ! video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)3840, height=(int)2160 ! tee name=video0 \
    video0. ! queue ! nvvidconv ! video/x-raw(memory:NVMM),format=(string)RGBA ! comp.sink_0  \
    video0. ! queue ! absolutetimestamps location=sensor0.log ! nvvidconv ! video/x-raw(memory:NVMM), format=(string)I420 ! nvv4l2h265enc bitrate=8000000 ! h265parse ! mp4mux ! perf ! filesink sync=true location=sensor0.mp4 \
nvv4l2camerasrc device=/dev/video1 ! video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)3840, height=(int)2160 ! tee name=video1 \
    video1. ! queue ! nvvidconv ! video/x-raw(memory:NVMM),format=(string)RGBA ! comp.sink_1 \
    video1. ! queue ! absolutetimestamps location=sensor1.log ! nvvidconv ! video/x-raw(memory:NVMM), format=(string)I420 ! nvv4l2h265enc bitrate=8000000 ! h265parse ! mp4mux ! perf ! filesink sync=true location=sensor1.mp4 \
nvv4l2camerasrc device=/dev/video2 ! video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)3840, height=(int)2160 ! tee name=video2 \
    video2. ! queue ! nvvidconv ! video/x-raw(memory:NVMM),format=(string)RGBA ! comp.sink_2 \
    video2. ! queue ! absolutetimestamps location=sensor2.log ! nvvidconv ! video/x-raw(memory:NVMM), format=(string)I420 ! nvv4l2h265enc bitrate=8000000 ! h265parse ! mp4mux ! perf ! filesink sync=true location=sensor2.mp4 \
nvv4l2camerasrc device=/dev/video3 ! video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)3840, height=(int)2160 ! tee name=video3 \
    video3. ! queue ! nvvidconv ! video/x-raw(memory:NVMM),format=(string)RGBA ! comp.sink_3 \
    video3. ! queue ! absolutetimestamps location=sensor3.log ! nvvidconv ! video/x-raw(memory:NVMM), format=(string)I420 ! nvv4l2h265enc bitrate=8000000 ! h265parse ! mp4mux ! perf ! filesink sync=true location=sensor3.mp4 \
nvv4l2camerasrc device=/dev/video4 ! video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)3840, height=(int)2160 ! tee name=video4 \
    video4. ! queue ! nvvidconv ! video/x-raw(memory:NVMM),format=(string)RGBA ! comp.sink_4 \
    video4. ! queue ! absolutetimestamps location=sensor4.log ! nvvidconv ! video/x-raw(memory:NVMM), format=(string)I420 ! nvv4l2h265enc bitrate=8000000 ! h265parse ! mp4mux ! perf ! filesink sync=true location=sensor4.mp4 \
nvv4l2camerasrc device=/dev/video5 ! video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)3840, height=(int)2160 ! tee name=video5 \
    video5. ! queue ! nvvidconv ! video/x-raw(memory:NVMM),format=(string)RGBA ! comp.sink_5 \
    video5. ! queue ! absolutetimestamps location=sensor4.log ! nvvidconv ! video/x-raw(memory:NVMM), format=(string)I420 ! nvv4l2h265enc bitrate=8000000 ! h265parse ! mp4mux ! perf ! filesink sync=true location=sensor5.mp4 \
nvcompositor name=comp  \
   sink_0::xpos=0    sink_0::ypos=0   sink_0::width=1280 sink_0::height=720  \
   sink_1::xpos=1280 sink_1::ypos=0   sink_1::width=1280 sink_1::height=720  \
   sink_2::xpos=2560 sink_2::ypos=0   sink_2::width=1280 sink_2::height=720  \
   sink_3::xpos=0    sink_3::ypos=720 sink_3::width=1280 sink_3::height=720  \
   sink_4::xpos=1280 sink_4::ypos=720 sink_4::width=1280 sink_4::height=720  \
   sink_5::xpos=2560 sink_5::ypos=720 sink_5::width=1280 sink_5::height=720  \
 ! video/x-raw(memory:NVMM),format=RGBA,width=(int)3840,height=(int)1440 ! nvvidconv ! video/x-raw(memory:NVMM), format=NV12 ! nvv4l2h265enc insert-sps-pps=1 idrinterval=15 insert-vui=1 ! h265parse ! rtph265pay name=pay0 )"

Nothing seems too out of the ordinary in jtop, with memory well under control:

Hi,
Please try to link nvv4l2camerasrc ! videorate for a try. There is discussion in the topic and this is suggested for Jetpack 5.0.2:
GStreamer nvvidconv performance/cost (UYVY to NV12 for nvv4l2h264enc) - #13 by DaneLLL

Please give it a try and see if the issue is still present.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.