This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-TDA4VM: Gstreamer h264 encoding using tiovx

Part Number: SK-TDA4VM

I have connected raspicam v2 camera connected via MIPI port to the device and it was loaded successfully:

CSI Camera 1 detected
    device = /dev/video2
    name = imx219
    format = [fmt:SRGGB8_1X8/1920x1080]
    subdev_id = /dev/v4l-subdev2
    isp_required = yes

I was able to read the video stream from it and save it to the mp4 file using:

$ sudo gst-launch-1.0 v4l2src num-buffers=200 device=/dev/video2 ! video/x-bayer, width=1920, height=1080, format=rggb, framerate=\(fraction\)25/1 ! bayer2rgb ! videoconvert ! x264enc tune=zerolatency ! mp4mux ! filesink location=a.mp4


I want to utilize tda's video codec to encode efficiently in h264 using the next command:

sudo gst-launch-1.0 -vvv v4l2src device=/dev/video2 io-mode=dmabuf ! video/x-bayer,width=1920,height=1080, framerate=30/1, format=bggr ! \
  tiovxisp sensor-name=SENSOR_SONY_IMX219_RPI \
  dcc-isp-file=/opt/imaging/imx219/dcc_viss_1920x1080.bin \
  sink_0::dcc-2a-file=/opt/imaging/imx219/dcc_2a_1920x1080.bin \
  sink_0::device=/dev/v4l-subdev2 ! \
  video/x-raw,format=NV12 ! \
  v4l2h264enc output-io-mode=dmabuf-import extra-controls="controls,h264_i_frame_period=60" ! \
  rtph264pay ! fakesink


However, I am getting the next error:

APP: Init ... !!!
MEM: Init ... !!!
MEM: Initialized DMA HEAP (fd=5) !!!
MEM: Init ... Done !!!
IPC: Init ... !!!
IPC: Init ... Done !!!
REMOTE_SERVICE: Init ... !!!
REMOTE_SERVICE: Init ... Done !!!
   913.528686 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
   913.528751 s:  VX_ZONE_INIT:Enabled
   913.528760 s:  VX_ZONE_ERROR:Enabled
   913.528769 s:  VX_ZONE_WARNING:Enabled
   913.530261 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
   913.531523 s:  VX_ZONE_INIT:[tivxHostInitLocal:93] Initialization Done for HOST !!!
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-bayer, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)bggr, colorimetry=(string)sRGB, interlace-mode=(string)progressive
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-bayer, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)bggr, colorimetry=(string)sRGB, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstTIOVXISP:tiovxisp0.GstTIOVXIspPad:sink_0: caps = video/x-bayer, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)bggr, colorimetry=(string)sRGB, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-bayer, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)bggr, colorimetry=(string)sRGB, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstTIOVXISP:tiovxisp0.GstTIOVXMisoPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
/GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)baseline, level=(string)1, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)baseline, level=(string)1, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
Redistribute latency...
/GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstTIOVXISP:tiovxisp0.GstTIOVXMisoPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601
ERROR: from element /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0: Failed to process frame.
Additional debug info:
../gst-plugins-good-1.16.3/sys/v4l2/gstv4l2videoenc.c(810): gst_v4l2_video_enc_handle_frame (): /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0:
Maybe be due to not enough memory or failing driver
Execution ended after 0:00:00.187052413
Setting pipeline to NULL ...
Freeing pipeline ...
   913.795456 s:  VX_ZONE_WARNING:[vxReleaseContext:1055] Found a reference 0xffffb9e741a0 of type 0000080f at external count 1, internal count 0, releasing it
   913.795482 s:  VX_ZONE_WARNING:[vxReleaseContext:1057] Releasing reference (name=image_113) now as a part of garbage collection
   913.795495 s:  VX_ZONE_WARNING:[vxReleaseContext:1055] Found a reference 0xffffb9ee1710 of type 00000813 at external count 1, internal count 0, releasing it
   913.795506 s:  VX_ZONE_WARNING:[vxReleaseContext:1057] Releasing reference (name=object_array_115) now as a part of garbage collection
   913.796000 s:  VX_ZONE_WARNING:[vxReleaseContext:1055] Found a reference 0xffffb9ee18b0 of type 00000813 at external count 1, internal count 0, releasing it
   913.796011 s:  VX_ZONE_WARNING:[vxReleaseContext:1057] Releasing reference (name=object_array_117) now as a part of garbage collection
   913.796490 s:  VX_ZONE_INIT:[tivxHostDeInitLocal:107] De-Initialization Done for HOST !!!
   913.800848 s:  VX_ZONE_INIT:[tivxDeInitLocal:193] De-Initialization Done !!!
APP: Deinit ... !!!
REMOTE_SERVICE: Deinit ... !!!
REMOTE_SERVICE: Deinit ... Done !!!
IPC: Deinit ... !!!
IPC: DeInit ... Done !!!
MEM: Deinit ... !!!
DDR_SHARED_MEM: Alloc's: 23 alloc's of 15976187 bytes
DDR_SHARED_MEM: Free's : 23 free's  of 15976187 bytes
DDR_SHARED_MEM: Open's : 0 allocs  of 0 bytes
DDR_SHARED_MEM: Total size: 536870912 bytes
MEM: Deinit ... Done !!!
APP: Deinit ... Done !!!


What can the source of problem ? I am using the latest processor sdk image