Error while building the latest gstjpeg_src (L4T sources, version 32.3.1)

When I compile the latest version of gstjpeg_src (L4T sources, version 32.3.1) with the patch applied I get the following error during the make step:

gstjpegenc.c: In function ‘gst_jpegenc_term_destination’:
gstjpegenc.c:300:21: error: ‘struct jpeg_compress_struct’ has no member named ‘IsVendorbuf’
   if(!jpegenc->cinfo.IsVendorbuf)
                     ^
gstjpegenc.c: In function ‘gst_video_enc_check_nvfeatures’:
gstjpegenc.c:356:19: error: ‘struct jpeg_compress_struct’ has no member named ‘IsVendorbuf’
         enc->cinfo.IsVendorbuf = TRUE;
                   ^
gstjpegenc.c: In function ‘gst_jpegenc_handle_frame’:
gstjpegenc.c:498:21: error: ‘struct jpeg_compress_struct’ has no member named ‘IsVendorbuf’
   if(!jpegenc->cinfo.IsVendorbuf)
                     ^
gstjpegenc.c:509:20: error: ‘struct jpeg_compress_struct’ has no member named ‘IsVendorbuf’
   if(jpegenc->cinfo.IsVendorbuf)
                    ^
gstjpegenc.c:514:21: error: ‘struct jpeg_compress_struct’ has no member named ‘pVendor_buf’
       jpegenc->cinfo.pVendor_buf = map.data; /* TODO:Try to copy to base[i] and line instead of pNv_buf*/
                     ^
gstjpegenc.c:544:17: error: ‘struct jpeg_compress_struct’ has no member named ‘outputBuffSize’
   jpegenc->cinfo.outputBuffSize = jpegenc->bufsize + (512 << 10);
                 ^
gstjpegenc.c:546:66: error: ‘struct jpeg_compress_struct’ has no member named ‘outputBuffSize’
   jpegenc->output_mem = gst_allocator_alloc (NULL, jpegenc->cinfo.outputBuffSize, &params);
                                                                  ^
gstjpegenc.c:559:17: error: ‘struct jpeg_compress_struct’ has no member named ‘bMeasure_ImageProcessTime’
   jpegenc->cinfo.bMeasure_ImageProcessTime = jpegenc->bMeasure_ImageProcessTime;
                 ^
gstjpegenc.c:587:20: error: ‘struct jpeg_compress_struct’ has no member named ‘IsVendorbuf’
   if(jpegenc->cinfo.IsVendorbuf)

Has anyone encountered this issue before? If so, then how did you resolve it?

Hi,
Do you hit the issue in building default gstjpeg_src code? It looks like it does not refer to correct header files in

gstjpeg_src\nv_headers\jpeglib.h

It turns out that I was supposed to move the gstjpeg_src directory into $HOME. Moving the directory into $HOME fixed the jpeg_compress_struct errors. Thank you for your help!

@DaneLLL, quick question: do you know by any chance how to fix the following error? I have applied your patch (https://devtalk.nvidia.com/default/topic/1049311/jetson-agx-xavier/nvjpegdec-slower-then-jpegdec-in-gstreamer) to make nvjpegdec output directly to NVMM memory. Here is my pipeline:

GST_DEBUG=2 gst-launch-1.0 -v v4l2src device=/dev/video0 io-mode=2 ! "image/jpeg,width=1920,height=1080, framerate=30/1" ! nvjpegdec ! 'video/x-raw(memory:NVMM),format=NV12' ! nvivafilter cuda-process=true customer-lib-name="./libcustom.so" ! 'video/x-raw(memory:NVMM),format=NV12' ! fakesink

However, I get this error:

0:00:00.295351843 23110   0x55b758e640 ERROR           GST_PIPELINE grammar.y:721:gst_parse_perform_link: could not link nvjpegdec0 to nvivafilter0, nvjpegdec0 can't handle caps video/x-raw(memory:NVMM), format=(string)NV12

If I change my pipeline and use I420 as the output format for nvjpegdec everything works properly:

GST_DEBUG=2 gst-launch-1.0 -v v4l2src device=/dev/video0 io-mode=2 ! "image/jpeg,width=1920,height=1080, framerate=30/1" ! nvjpegdec ! 'video/x-raw(memory:NVMM),format=I420' ! nvivafilter cuda-process=true customer-lib-name="./libcustom.so" ! 'video/x-raw(memory:NVMM),format=NV12' ! fakesink

Hi,
The default capability is I420. It is possible to customize it to NV12. You may modify

#ifdef USE_TARGET_TEGRA
static GstStaticPadTemplate gst_jpeg_dec_src_pad_template =
GST_STATIC_PAD_TEMPLATE ("src",
    GST_PAD_SRC,
    GST_PAD_ALWAYS,
    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
    (GST_CAPS_FEATURE_MEMORY_RMSURFACE, "{ " "<b>NV12</b>, GRAY8 }") ";"
    GST_VIDEO_CAPS_MAKE
        ("{ I420, RGB, BGR, RGBx, xRGB, BGRx, xBGR, GRAY8 }"))
    );
NvBufferCreate(&dmabuf_fd, width, height, NvBufferLayout_Pitch, <b>NvBufferColorFormat_NV12</b>);

Hi @DaneLLL, thank you for your tips.

1.
I tried making the suggested edits to the patch. However, the src pad format doesn’t get replaced by NV12 when I run:

gst-inspect-1.0 nvjpegdec

Output:

SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw(memory:NVMM)
                 format: { (string)I420, (string)GRAY8 }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]
      video/x-raw
                 format: { (string)I420, (string)RGB, (string)BGR, (string)RGBx, (string)xRGB, (string)BGRx, (string)xBGR, (string)GRAY8 }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]

I think that I somehow have to replace /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvjpeg.so as well in order to get the NV12 src format for nvjpegdec.

2.
Also, when I run the original patch (with the I420 format):

GST_DEBUG=2 gst-launch-1.0 -v v4l2src device=/dev/video0 io-mode=2 ! "image/jpeg,width=1920,height=1080, framerate=30/1" ! nvjpegdec ! 'video/x-raw(memory:NVMM), format=I420' ! nvivafilter cuda-process=true customer-lib-name="./aarch64/lib/libtest_share_lib_proj.so" ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! fakesink

I get an internal stream error, reason (-5):

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = image/jpeg, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = image/jpeg, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstNvJpegDec:nvjpegdec0.GstPad:sink: caps = image/jpeg, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = image/jpeg, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
0:00:00.321233941 26079   0x558dfad590 WARN          v4l2bufferpool gstv4l2bufferpool.c:790:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> Uncertain or not enough buffers, enabling copy threshold
/GstPipeline:pipeline0/GstNvJpegDec:nvjpegdec0.GstPad:src: caps = video/x-raw(memory:NVMM), format=(string)I420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)1:4:0:0, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw(memory:NVMM), format=(string)I420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)1:4:0:0, framerate=(fraction)30/1
/GstPipeline:pipeline0/Gstnvivafilter:nvivafilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, format=(string)NV12
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, format=(string)NV12
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, format=(string)NV12
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, format=(string)NV12
/GstPipeline:pipeline0/Gstnvivafilter:nvivafilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), format=(string)I420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)1:4:0:0, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw(memory:NVMM), format=(string)I420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)1:4:0:0, framerate=(fraction)30/1
0:00:00.737791182 26079   0x558dfad590 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<v4l2src0> <b>error: Internal data stream error.</b>
0:00:00.737848059 26079   0x558dfad590 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<v4l2src0> <b>error: streaming stopped, reason error (-5)</b>
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason error (-5)
Execution ended after 0:00:00.427761074
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

However, when I insert “! video/x-raw ! nvvidconv” it works perfectly:

GST_DEBUG=2 gst-launch-1.0 -v v4l2src device=/dev/video0 io-mode=2 ! "image/jpeg,width=1920,height=1080, framerate=30/1" ! nvjpegdec !  video/x-raw ! nvvidconv ! 'video/x-raw(memory:NVMM), format=I420' ! nvivafilter cuda-process=true customer-lib-name="./aarch64/lib/libtest_share_lib_proj.so" ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! fakesink

I think it is somehow related to the flow of data between nvjpegdec and nvivafilter (because if I just output nvjpegdec to a fakesink it works). Also, my libtest_share_lib_proj.so is compiled from the original nvsample_cudaprocess.cu from the public sources (L4T sources, version 32.3.1).

Do you know how to fix these issues by any chance?

Hi,
Please add dummy prints and replace

/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvjpeg.so

See if you successfully replace with the self-built one.

Hi, @DaneLLL. Thank you for the prompt replies!

I replaced the default format in gstjpegdec.c with GST_VIDEO_FORMAT_NV12:

static gboolean
gst_jpeg_dec_negotiate (GstJpegDec * dec, gint width, gint height, gint clrspc)
{
  GstVideoCodecState *outstate;
  GstVideoInfo *info;
  GstVideoFormat format;

  GstCaps *templ_caps, *intersection;
  GstCaps *comp_supported_caps;
  GstCapsFeatures *ift;

  switch (clrspc) {
    case JCS_RGB:
      format = GST_VIDEO_FORMAT_RGB;
      break;
    case JCS_GRAYSCALE:
      format = GST_VIDEO_FORMAT_GRAY8;
      break;
    default:
      format = <b>GST_VIDEO_FORMAT_NV12</b>;
      break;
  }
 ...
}

After that replacing the /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvjpeg.so with libgstjpeg.so and running the following pipeline:

GST_DEBUG=2 gst-launch-1.0 -v v4l2src device=/dev/video0 io-mode=2 ! "image/jpeg,width=1920,height=1080, framerate=30/1" ! nvjpegdec ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! omxh265enc ! matroskamux ! fakesink

I am getting this error:

0:00:00.297942447 13456   0x55cb5aef90 WARN                     omx gstomx.c:2826:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/ben/.config:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = image/jpeg, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = image/jpeg, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstNvJpegDec:nvjpegdec0.GstPad:sink: caps = image/jpeg, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = image/jpeg, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
0:00:00.320576449 13456   0x55cb615d90 WARN          v4l2bufferpool gstv4l2bufferpool.c:790:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> Uncertain or not enough buffers, enabling copy threshold
/GstPipeline:pipeline0/GstNvJpegDec:nvjpegdec0.GstPad:src: caps = video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)1:4:0:0, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)1:4:0:0, framerate=(fraction)30/1
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 8 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 8 
0:00:00.502141756 13456   0x55cb615d90 WARN             omxvideoenc gstomxvideoenc.c:1860:gst_omx_video_enc_set_format:<omxh265enc-omxh265enc0> Error setting temporal_tradeoff 0 : Vendor specific error (0x00000001)
NVMEDIA: H265 : Profile : 1 
/GstPipeline:pipeline0/GstOMXH265Enc-omxh265enc:omxh265enc-omxh265enc0.GstPad:sink: caps = video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)1:4:0:0, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)1:4:0:0, framerate=(fraction)30/1
NvMMLiteVideoEncDoWork: Surface resolution (0 x 0) smaller than encode resolution (1920 x 1080)
VENC: NvMMLiteVideoEncDoWork: 4231: BlockSide error 0x4
Event_BlockError from 0BlockHevcEnc : Error code - 4
Sending error event from 0BlockHevcEnc0:00:00.544215551 13456   0x7f980014d0 ERROR                    omx gstomx.c:496:EventHandler:<omxh265enc-omxh265enc0> encoder got error: Bad parameter (0x80001005)
0:00:00.544361282 13456   0x7fa8004c00 ERROR                    omx gstomx.c:268:gst_omx_component_handle_messages:<omxh265enc-omxh265enc0> encoder got error: Bad parameter (0x80001005)
0:00:00.544412793 13456   0x7fa8004c00 ERROR                    omx gstomx.c:1285:gst_omx_port_acquire_buffer:<omxh265enc-omxh265enc0> Component encoder is in error state: Bad parameter
0:00:00.544440762 13456   0x7fa8004c00 WARN             omxvideoenc gstomxvideoenc.c:1331:gst_omx_video_enc_loop:<omxh265enc-omxh265enc0> error: OpenMAX component in error state Bad parameter (0x80001005)
ERROR: from element /GstPipeline:pipeline0/GstOMXH265Enc-omxh265enc:omxh265enc-omxh265enc0: GStreamer encountered a general supporting library error.
0:00:00.544686547 13456   0x7fa8004c00 WARN             matroskamux matroska-mux.c:2875:gst_matroska_mux_start:<matroskamux0> downstream is not seekable, but streamable=false. Will ignore that and create streamable output instead
Additional debug info:
/dvs/git/dirty/git-master_linux/3rdparty/gst/gst-omx/omx/gstomxvideoenc.c(1331): gst_omx_video_enc_loop (): /GstPipeline:pipeline0/GstOMXH265Enc-omxh265enc:omxh265enc-omxh265enc0:
OpenMAX component in error state Bad parameter (0x80001005)
Execution ended after 0:00:00.234830450
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
0:00:00.545256294 13456   0x55cb5aef90 ERROR                    omx gstomx.c:1507:gst_omx_port_set_flushing:<omxh265enc-omxh265enc0> Component encoder is in error state: Bad parameter (0x80001005)
0:00:00.545295982 13456   0x55cb5aef90 ERROR                    omx gstomx.c:1507:gst_omx_port_set_flushing:<omxh265enc-omxh265enc0> Component encoder is in error state: Bad parameter (0x80001005)
0:00:00.545350671 13456   0x55cb5aef90 ERROR                    omx gstomx.c:1507:gst_omx_port_set_flushing:<omxh265enc-omxh265enc0> Component encoder is in error state: Bad parameter (0x80001005)
0:00:00.545382129 13456   0x55cb5aef90 ERROR                    omx gstomx.c:1507:gst_omx_port_set_flushing:<omxh265enc-omxh265enc0> Component encoder is in error state: Bad parameter (0x80001005)
0:00:00.545459214 13456   0x55cb5aef90 ERROR                    omx gstomx.c:862:gst_omx_component_get_state:<omxh265enc-omxh265enc0> Component encoder in error state: Bad parameter (0x80001005)
0:00:00.545502235 13456   0x55cb5aef90 ERROR                    omx gstomx.c:862:gst_omx_component_get_state:<omxh265enc-omxh265enc0> Component encoder in error state: Bad parameter (0x80001005)
0:00:00.545535152 13456   0x55cb5aef90 ERROR                    omx gstomx.c:1839:gst_omx_port_deallocate_buffers_unlocked:<omxh265enc-omxh265enc0> Component encoder in error state: Bad parameter (0x80001005)
0:00:00.545563225 13456   0x55cb5aef90 ERROR                    omx gstomx.c:1854:gst_omx_port_deallocate_buffers_unlocked:<omxh265enc-omxh265enc0> Trying to free used buffer 0x7fa800d680 of encoder port 0
0:00:00.545932814 13456   0x55cb5aef90 ERROR                    omx gstomx.c:1839:gst_omx_port_deallocate_buffers_unlocked:<omxh265enc-omxh265enc0> Component encoder in error state: Bad parameter (0x80001005)
Caught SIGSEGV
#0  0x0000007fb43d8ce4 in __waitpid (pid=<optimized out>, stat_loc=0x7fec27b6d4, options=<optimized out>) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1  0x0000007fb44142a0 in g_on_error_stack_trace ()
#2  0x0000005594450c3c in  ()
#3  0x00000055cb6224c0 in  ()
Spinning.  Please run 'gdb gst-launch-1.0 13456' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

Looks like the modified nvjpegdec produces some bad parameter.

Hi,
if you need to have NV12 in your usecase, it is open source code and please go ahead tracing and debugging.

Or you simply use nvvidconv for I420 to NV12 conversion.