Unexpected nvjpegenc behavior when taking single snapshots


• Hardware Platform: Jetson Xavier NX
• JetPack Version: 5.0.2

I’m using the following pipeline to take single snapshots from appsrc to JPEG file:

appsrc name=appsrc ! video/x-raw(memory:NVMM),format=RGBA,width=1920,height=1080,framerate=0/1 ! nvvidconv ! nvjpegenc quality=100 ! filesink name=filesink

For each snapshot the process is:

gst_buffer_copy_deep -> state PLAYING -> push copied buffer to appsrc -> EOS called on pipeline -> state NULL to finalize

The issue is that once every 3-4 snapshots I’m getting a file with a previously pushed buffer (!), and if I change nvjpegenc to jpegenc (the only change) then everything works perfectly.

Any idea? Can this be a bug in nvjpegenc?

Further observations:

appsrc blocksize=2073600 format=4 num-buffers=1 ! ...

Didn’t help, same issue with mixed frames/buffers.

appsrc ! video/x-raw(memory:NVMM),format=... ! nvvidconv ! video/x-raw ! nvjpegenc quality=100 ! filesink

No issue. Adding video/x-raw makes nvjpegenc process buffers from CPU memory.

It seems nvjpegenc has some issue with NVMM buffers, am I wrong?

Please upgrade to latest Jetpack 5.1.2 and try. Certain issues are fixed in later releases.

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