I am experiencing a JPEG parameter struct mismatch
error when trying to encode images using jpegenc
in GStreamer on my Jetson AGX Orin. The error occurs when capturing frames from a GMSL2-connected camera using the following GStreamer pipeline:
gst-launch-1.0 v4l2src io-mode=2 device=/dev/video0 do-timestamp=false ! \
"video/x-raw, width=2880, height=1860, format=UYVY" ! \
jpegenc quality=50 ! fpsdisplaysink video-sink=fakesink sync=false
Output
JPEG parameter struct mismatch: library thinks size is 720, caller expects 584
Library dependencies (ldd
output)
ldd $(which gst-launch-1.0) | grep jpeg
/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so (0x0000ffff92cd8000)
System Information
- Jetson Model: Jetson AGX Orin
- Camera Interface: GMSL2
- GStreamer Version: (please specify your GStreamer version using
gst-launch-1.0 --version
) - L4T Version:
35.4.1
(Output fromdpkg -l | grep nvidia-l4t-core
)
Troubleshooting Attempts
- Checked linked libraries using
ldd
, and it showslibnvjpeg.so
as the linked JPEG library. - Tried
nvjpegenc
instead ofjpegenc
, butnvjpegenc
does not support the UYVY format directly. - Reinstalled
libjpeg-turbo8
andlibjpeg-turbo8-dev
, but the issue persists. - Tested with different resolutions and formats, but the error remains.
- Checked for mixed linking to
libjpeg.so
andlibnvjpeg.so
, and onlylibnvjpeg.so
appears linked.
Questions
- Could this issue be caused by a mismatch between
jpegenc
andlibnvjpeg.so
? - Should I force
jpegenc
to uselibjpeg.so
instead oflibnvjpeg.so
? - Is there a recommended way to encode UYVY → JPEG on Jetson AGX Orin without
nvvidconv
? (nvvidconv
halves my FPS) - Are there any known issues with
jpegenc
on Jetson Orin?
Thanks for the help!