Cannot get nvjpegenc to work with nvdsosd

This works (no nvjpegenc):
uridecodebin ! nvvideoconvert ! nvstreammux ! plugin1 ! nvtracker ! plugin2 ! nvvideoconvert ! nvdsosd ! fakesink

This crashes:
uridecodebin ! nvvideoconvert ! nvstreammux ! plugin1 ! nvtracker ! plugin2 ! nvvideoconvert ! nvdsosd ! nvvideoconvert ! nvjpegenc ! fakesink

This gives errors:
uridecodebin ! nvvideoconvert ! nvstreammux ! plugin1 ! nvtracker ! plugin2 ! nvvideoconvert ! nvdsosd ! nvvidconv ! nvjpegenc ! fakesink

nvbuf_utils: nvbuffer Payload Type not supported
NvBufferGetParams failed for src_dmabuf_fd
nvbuffer_transform Failed
gst_nvvconv_transform: NvBufferTransform Failed
nvbuf_utils: nvbuffer Payload Type not supported
NvBufferGetParams failed for src_dmabuf_fd
nvbuffer_transform Failed
gst_nvvconv_transform: NvBufferTransform Failed
nvbuf_utils: nvbuffer Payload Type not supported
NvBufferGetParams failed for src_dmabuf_fd
nvbuffer_transform Failed
gst_nvvconv_transform: NvBufferTransform Failed
nvbuf_utils: nvbuffer Payload Type not supported
NvBufferGetParams failed for src_dmabuf_fd
nvbuffer_transform Failed

Hi,
Please try

$ gst-launch-1.0 uridecodebin uri=file:///home/nvidia/sample_720p.mp4 ! nvvideoconvert ! 'video/x-raw(memory:NVMM),format=NV12,width=640,height=360' ! m.sink_0 nvstreammux name=m batch-size=1 width=640 height=480 ! nvvideoconvert ! nvdsosd ! nvvideoconvert ! video/x-raw,format=I420 ! nvjpegenc ! multifilesink location=cap%05d.jpg

Thanks, your command line works.

The source and sink specs of nvvideoconvert and nvjpegenc suggest that they
can be piped directly through (memory:NVMM).

Is this considered a bug that will eventually be fixed? Or we just have to use this workaround.

Hi,
Please use the workaround on DS4.0. We will check for improvement in future releases.

Problem not fixed in Nano JetPack 4.2.2 / DS4.0.1

Hi,
#2 is the solution for this case. For continuous encoding, we would suggest you use h264/h265 encoder.