I am trying to process MJPEG streams with gstreamer. Doing it in software it works:
gst-launch-1.0 videotestsrc ! jpegenc ! jpegdec ! autovideosink
Unfortunately, it leaks memory. When we saw the same under h264, we fixed it with hardware decoding. The following attempts just display the first frame and freeze:
gst-launch-1.0 videotestsrc ! jpegenc ! nvjpegdec ! autovideosink
gst-launch-1.0 videotestsrc ! nvjpegenc ! nvjpegdec ! videoconvert ! autovideosink
gst-launch-1.0 videotestsrc ! nvjpegenc ! jpegparse ! nvjpegdec ! videoconvert ! autovideosink
The same happens with nvv4l2decoder
gst-launch-1.0 videotestsrc ! jpegenc ! nvv4l2decoder ! nvvidconv ! videoconvert ! autovideosink
gst-launch-1.0 videotestsrc ! jpegenc ! jpegparse ! nvv4l2decoder ! nvvidconv ! videoconvert ! autovideosink
There are no error messages, and the hardware decoders turn on, but the pipeline is frozen. I have checked the capabilities with gst-inspect, and they should match.
Any ideas?
Jetson Orin Nano dev kit:
GStreamer 1.16.3
L4J: 35.4.1
Jetpack: 5.1.2
Also tried, following the advice from Honey_Patouceul](Gstreamer pipeline for MJPEG RTSP stream):
Stuck on first frame:
gst-launch-1.0 videotestsrc ! jpegenc ! jpegparse ! nvjpegdec ! 'video/x-raw(memory:NVMM),format=I420' ! nvvidconv ! autovideosink
gst-launch-1.0 videotestsrc ! nvjpegenc ! jpegparse ! nvjpegdec ! 'video/x-raw(memory:NVMM),format=I420' ! nvvidconv ! autovideosink
gst-launch-1.0 videotestsrc ! nvjpegenc ! jpegparse ! nvjpegdec ! 'video/x-raw(memory:NVMM),format=I420' ! nvvidconv ! videoconvert ! autovideosink
Data stream error:
gst-launch-1.0 videotestsrc ! nvjpegenc ! nvv4l2decoder mjpeg=1 ! nvvidconv ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw,format=BGR ! autovideosink
gst-launch-1.0 videotestsrc ! nvjpegenc ! jpegparse ! nvjpegdec ! 'video/x-raw(memory:NVMM),format=I420' ! nvvidconv ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw,format=BGR ! autovideosink
Erroneous pipeline:
gst-launch-1.0 videotestsrc ! jpegenc ! jpegparse ! nvvidconv ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw,format=BGR ! autovideosink
gst-launch-1.0 videotestsrc ! jpegenc ! nvvidconv ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw,format=BGR ! autovideosink
gst-launch-1.0 videotestsrc ! nvjpegenc ! jpegparse ! nvvidconv ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw,format=BGR ! autovideosink
gst-launch-1.0 videotestsrc ! nvjpegenc ! nvvidconv ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw,format=BGR ! autovideosink