NVJPEGDEC gives segmentation fault (core dumped) on MJPEG http stream Jetpack 5.1 L4T 35.2.1

I have used the nvjpegdec element on xavier nx (Jetpack 4.6 - L4T 32.6.1).
I am using a gstreamer pipeline to visualize a camera in Qt

Xavier nx pipeline to visualize MJPEG http stream:

souphttpsrc location=http://192.168.1.2:8084/mjpeg  is-live=1 timeout=3 do-timestamp=true ! multipartdemux ! nvjpegdec ! qtvideosink sync=0

To use gst-launch-1.0 xvimagesink can be used instead of qtvideosink
I have never had a problem with this pipeline and it works perfectly

I have upgraded from Xavier NX to Orin NX. The Orin NX has jetpack 5.1 and L4t 35.2.1

When I use the pipeline I get a segmentation fault.
This segmentation fault is not always occurring, and I have not been able to pinpoint why it is occurring.

souphttpsrc location=http://192.168.1.2:8084/mjpeg  is-live=1 timeout=3 do-timestamp=true ! multipartdemux ! nvjpegdec ! qtvideosink sync=0

When I change the nvjpegdec to jpegdec (base gstreamer jpeg decoding). The segmentation fault never occurs

souphttpsrc location=http://192.168.1.2:8084/mjpeg  is-live=1 timeout=3 do-timestamp=true ! multipartdemux ! jpegdec ! qtvideosink sync=0

Furthermore I have also tested the nvv4l2decoder:
This pipeline also works perfectly and renders the camera.

souphttpsrc location=http://192.168.1.2:8084/mjpeg  is-live=1 timeout=3 do-timestamp=true  ! multipartdemux ! jpegparse !   nvv4l2decoder mjpeg=1  ! nvvidconv !   qtvideosink sync=0

What is the error with nvjpegdec? I would love to keep using nvjpegdec instead of nvv4l2decoder because the nvv4l2decoder has a somewhat slower startup time.

Hi,
Please try the pipeline and see if it works:

$ souphttpsrc location=http://192.168.1.2:8084/mjpeg  is-live=1 timeout=3 do-timestamp=true ! multipartdemux ! nvjpegdec ! video/x-raw ! videoconvert ! xvimagesink sync=0
$ souphttpsrc location=http://192.168.1.2:8084/mjpeg  is-live=1 timeout=3 do-timestamp=true ! multipartdemux ! nvjpegdec ! video/x-raw ! videoconvert ! qtvideosink sync=0

Hello DaneLLL,

I have tested these but NVjpegdec keeps giving segmentation errors at random times.
When using Nvv4l2decoder this does not happen.
Is there a patch for NVJPEGDEC?

Thanks in advance!

Hi,
We also support MJPEG decoding in nvv4l2decoder. Please try:

... ! nvv4l2decoder mjpeg=1 ! ...

And would be great if you can upgrade to latest Jetpack 5.1.2

nvv4l2decoder works perfect but has a slow load time.
I will upgrade to jetpack 5.1.2 and repost my findings regarding the NVJPEGDEC gstreamer plugin.
This can take a few weeks.

Hi,
Please note there is a known issue on Jetpack 5.1.2:
Issues with nvjpegdec on live HTTP streams - #3 by DaneLLL

We would suggest use nvv4l2decoder for MJPEG decoding, and wait for next Jetpack 5.1.3.

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