Tool/software:
We have an opportunity for an AM62A7 design that involves performing encode on an imx462 camera (very similar to the imx290).
We have a setup running on edge AI SDK 10.0 with imx290.c patches to support imx462.
I am able to stream the sensor data to a connected HDMI display using the following pipeline:
gst-launch-1.0 -v v4l2src device=/dev/video3 io-mode=dmabuf-import ! \ video/x-bayer, width=1920, height=1080, framerate=60/1, format=rggb10 ! \ tiovxisp sink_0::device=/dev/v4l-subdev2 sensor-name="SENSOR_SONY_IMX219_RPI" \ dcc-isp-file=/opt/imaging/imx219/linear/dcc_viss_10b.bin sink_0::dcc-2a-file=/opt/imaging/imx219/linear/dcc_2a_10b.bin format-msb=9 ! \ video/x-raw, format=NV12, width=1920, height=1080, framerate=60/1 ! fpsdisplaysink name=fpssink text-overlay=false video-sink="kmssink driver-name=tidss"
Now we are trying to run an encode to stream remotely (or to a file), but the command we are using (below) that is based on the SDK documentation is failing:
root@mitysom-am62ax:~# gst-launch-1.0 v4l2src device=/dev/video3 io-mode=dmabuf-import ! \ video/x-bayer,width=1920,height=1080, framerate=30/1, format=rggb10 ! \ tiovxisp sensor-name=SENSOR_SONY_IMX219_RPI \ dcc-isp-file=/opt/imaging/imx219/linear/dcc_viss.bin \ sink_0::dcc-2a-file=/opt/imaging/imx219/linear/dcc_2a.bin \ sink_0::device=/dev/v4l-subdev2 format-msb=9 ! \ video/x-raw,format=NV12 ! \ v4l2h264enc output-io-mode=dmabuf-import ! \ udpsink port=8081 host=10.0.103.185 APP: Init ... !!! 256986.587068 s: MEM: Init ... !!! 256986.587142 s: MEM: Initialized DMA HEAP (fd=9) !!! 256986.587316 s: MEM: Init ... Done !!! 256986.587331 s: IPC: Init ... !!! 256986.607655 s: IPC: Init ... Done !!! REMOTE_SERVICE: Init ... !!! REMOTE_SERVICE: Init ... Done !!! 256986.613127 s: GTC Frequency = 200 MHz APP: Init ... Done !!! 256986.613277 s: VX_ZONE_INFO: Globally Enabled VX_ZONE_ERROR 256986.613293 s: VX_ZONE_INFO: Globally Enabled VX_ZONE_WARNING 256986.613305 s: VX_ZONE_INFO: Globally Enabled VX_ZONE_INFO 256986.614699 s: VX_ZONE_INFO: [tivxPlatformCreateTargetId:134] Added target MPU-0 256986.615101 s: VX_ZONE_INFO: [tivxPlatformCreateTargetId:134] Added target MPU-1 256986.615452 s: VX_ZONE_INFO: [tivxPlatformCreateTargetId:134] Added target MPU-2 256986.615800 s: VX_ZONE_INFO: [tivxPlatformCreateTargetId:134] Added target MPU-3 256986.615852 s: VX_ZONE_INFO: [tivxInitLocal:126] Initialization Done !!! 256986.615866 s: VX_ZONE_INFO: Globally Disabled VX_ZONE_INFO Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Pipelin[ 5630.968268] imx290 1-001a: imx290_start_streaming e is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock [ 5631.117923] imx290 1-001a: imx290_start_streaming : 0 Redistribute latency... ERROR: from element /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0: Failed to process frame. Additional debug info: /usr/src/debug/gstreamer1.0-plugins-good/1.22.12/sys/v4l2/gstv4l2videoenc.c(901): 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.238726669 Setting pipeline to NULL ... Freeing pipeline ... 256986.998696 s: VX_ZONE_WARNING: [vxReleaseContext:1275] Found a reference 0xffff800ce340 of type 0000080f at external count 1, internal count 0, releasing it 256986.998751 s: VX_ZONE_WARNING: [vxReleaseContext:1277] Releasing reference (name=image_104) now as a part of garbage collection 256986.998777 s: VX_ZONE_WARNING: [vxReleaseContext:1275] Found a reference 0xffff8014bcf0 of type 00000813 at external count 1, internal count 0, releasing it 256986.998792 s: VX_ZONE_WARNING: [vxReleaseContext:1277] Releasing reference (name=object_array_106) now as a part of garbage collection 256986.999170 s: VX_ZONE_WARNING: [vxReleaseContext:1275] Found a reference 0xffff8014bea0 of type 00000813 at external count 1, internal count 0, releasing it 256986.999187 s: VX_ZONE_WARNING: [vxReleaseContext:1277] Releasing reference (name=object_array_108) now as a part of garbage collection APP: Deinit ... !!! REMOTE_SERVICE: Deinit ... !!! REMOTE_SERVICE: Deinit ... Done !!! 256987.004787 s: IPC: Deinit ... !!! 256987.005464 s: IPC: DeInit ... Done !!! 256987.005521 s: MEM: Deinit ... !!! 256987.005786 s: DDR_SHARED_MEM: Alloc's: 25 alloc's of 38823759 bytes 256987.005836 s: DDR_SHARED_MEM: Free's : 25 free's of 38823759 bytes 256987.005848 s: DDR_SHARED_MEM: Open's : 0 allocs of 0 bytes 256987.005868 s: MEM: Deinit ... Done !!! APP: Deinit ... Done !!!
Specifically, we are seeing:
ERROR: from element /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0: Failed to process frame.
Additional debug info:
/usr/src/debug/gstreamer1.0-plugins-good/1.22.12/sys/v4l2/gstv4l2videoenc.c(901): 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.238726669
If I change the pipeline to remove the "output-io-mode" field from the v4l2h264enc, then the pipeline runs but no output is generated (no network packets sent using udpsink, only a header generated using filesink).
Can you help us debug?
Thanks.
MIke