I’ve successfully followed the steps at nvjpegdec slower then jpegdec in gstreamer to add DMA support to JPEG decoding. gst-inspect-1.0 nvjpegdec
shows NVMM support as expected. However, I’ve encountered two issues:
- I get a segmentation when trying to pair up nvjpegdec and omxh264enc:
$ gst-launch-1.0 filesrc location=src.mjpeg ! 'image/jpeg,framerate=200/1,width=192,height=192' ! nvjpegdec ! 'video/x-raw(memory:NVMM),format=I420' ! omxh264enc ! 'video/x-h264' ! fakesink -ve
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = image/jpeg, width=(int)192, height=(int)192, framerate=(fraction)200/1
/GstPipeline:pipeline0/GstNvJpegDec:nvjpegdec0.GstPad:sink: caps = image/jpeg, width=(int)192, height=(int)192, framerate=(fraction)200/1
/GstPipeline:pipeline0/GstNvJpegDec:nvjpegdec0.GstPad:src: caps = video/x-raw(memory:NVMM), format=(string)I420, width=(int)192, height=(int)192, 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)jpeg, colorimetry=(string)1:4:0:0, framerate=(fraction)200/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw(memory:NVMM), format=(string)I420, width=(int)192, height=(int)192, 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)jpeg, colorimetry=(string)1:4:0:0, framerate=(fraction)200/1
Framerate set to : 200 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
H264: Profile = 66, Level = 40
/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:sink: caps = video/x-raw(memory:NVMM), format=(string)I420, width=(int)192, height=(int)192, 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)jpeg, colorimetry=(string)1:4:0:0, framerate=(fraction)200/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw(memory:NVMM), format=(string)I420, width=(int)192, height=(int)192, 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)jpeg, colorimetry=(string)1:4:0:0, framerate=(fraction)200/1
NvMMLiteVideoEncDoWork: Surface resolution (0 x 0) smaller than encode resolution (192 x 192)
VENC: NvMMLiteVideoEncDoWork: 4231: BlockSide error 0x4
Event_BlockError from 0BlockAvcEnc : Error code - 4
Sending error event from 0BlockAvcEncERROR: from element /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0: GStreamer encountered a general supporting library error.
Additional debug info:
/dvs/git/dirty/git-master_linux/3rdparty/gst/gst-omx/omx/gstomxvideoenc.c(1331): gst_omx_video_enc_loop (): /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0:
OpenMAX component in error state Bad parameter (0x80001005)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Caught SIGSEGV
#0 0x0000007f9bd85ce4 in __waitpid (pid=<optimized out>, stat_loc=0x7ff220de54, options=<optimized out>) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1 0x0000007f9bdc12a0 in g_on_error_stack_trace ()
#2 0x0000005560735c3c in ()
#3 0x00000055764ab0d0 in ()
Spinning. Please run 'gdb gst-launch-1.0 19936' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
- jpegdec has stopped working after patching,
gst-inspect-1.0 jpegdec
gives meBus error (core dumped)
, same when I try to use it.
Sending to nvoverlaysink
after decoding to NVMM works fine.
I’m on 32.3.1, Nano dev kit.