Tool/software:
Hi,
We are using the AM62A32AOMHIAMBR SoM on our custom board and integrated omnivision camera sensror driver (OS02C10) and we are able to get camera stream using below gstreamer pipeline.
gst-launch-1.0 -v v4l2src device=/dev/video3 io-mode=dmabuf-import ! video/x-bayer, width=1920, height=1080, framerate=30/1, format=bggr10 ! tiovxisp sink_0::device=/dev/v4l-subdev2 sensor-name="SENSOR_OV_OS02C10" dcc-isp-file=/opt/imaging/os02c10/linear/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/os02c10/linear/dcc_2a.bin format-msb=9 ! video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 ! kmssink driver-name=tidss
Gstreamer version and linux versions are:-
root@am62axx-evm:~# gst-launch-1.0 --version gst-launch-1.0 version 1.20.7 GStreamer 1.20.7 Unknown package origin root@am62axx-evm:~# uname -a Linux am62axx-evm 6.1.46+ #1 SMP PREEMPT Wed Dec 6 17:54:04 UTC 2023 aarch64 aarch64 aarch64 GNU/Linu
Now we want to stream this mipi camera feed over ethernet using h.264/h.265 encoder.
Below is the pipeline i'm trying:-
GST_DEBUG=3 gst-launch-1.0 v4l2src device=/dev/video3 io-mode=5 ! queue leaky=2 ! video/x-bayer, width=1920, height=1080, framerate=30/1, format=bggr10 ! tiovxisp sink_0::device=/dev/v4l-subdev2 sensor-name="SENSOR_OV_OS02C10" dcc-isp-file=/opt/imaging/os02c10/linear/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/os02c10/linear/dcc_2a.bin format-msb=7 ! video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 ! v4l2h264enc output-io-mode=dmabuf-import extra-controls="controls,h264_i_frame_period=60" ! rtph264pay ! udpsink host=10.42.0.1 port=5000 APP: Init ... !!! MEM: Init ... !!! MEM: Initialized DMA HEAP (fd=6) !!! MEM: Init ... Done !!! IPC: Init ... !!! IPC: Init ... Done !!! REMOTE_SERVICE: Init ... !!! REMOTE_SERVICE: Init ... Done !!! 1357.506479 s: GTC Frequency = 200 MHz APP: Init ... Done !!! 1357.507153 s: VX_ZONE_INIT:Enabled 1357.507353 s: VX_ZONE_ERROR:Enabled 1357.507483 s: VX_ZONE_WARNING:Enabled 1357.509272 s: VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!! 1357.509921 s: VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!! Setting pipeline to PAUSED ... 0:00:00.293041632 1733 0x291a8e30 WARN v4l2 gstv4l2object.c:4701:gst_v4l2_object_probe_caps:<v4l2h264enc0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Invalid argument 0:00:00.299558038 1733 0x291a8860 WARN v4l2src gstv4l2src.c:814:gst_v4l2src_query:<v4l2src0> Can't give latency since framerate isn't fixated ! 0:00:00.299693336 1733 0x291a8860 WARN aggregator gstaggregator.c:2104:gst_aggregator_query_latency_unlocked:<tiovxisp0> Latency query failed Pipeline is live and does not need PREROLL ... 0:00:00.300724742 1733 0x291a8860 WARN v4l2src gstv4l2src.c:814:gst_v4l2src_query:<v4l2src0> Can't give latency since framerate isn't fixated ! 0:00:00.301120637 1733 0x291a8860 WARN aggregator gstaggregator.c:2104:gst_aggregator_query_latency_unlocked:<tiovxisp0> Latency query failed Pipeline is PREROLLED ... Setting pipeline to PLAYING ... 0:00:00.303174516 1733 0x291a8860 WARN v4l2src gstv4l2src.c:814:gst_v4l2src_query:<v4l2src0> Can't give latency since framerate isn't fixated ! 0:00:00.303502581 1733 0x291a8860 WARN aggregator gstaggregator.c:2104:gst_aggregator_query_latency_unlocked:<tiovxisp0> Latency query failed 0:00:00.304752675 1733 0x291a8860 WARN v4l2src gstv4l2src.c:814:gst_v4l2src_query:<v4l2src0> Can't give latency since framerate isn't fixated ! 0:00:00.305206724 1733 0x291a8860 WARN aggregator gstaggregator.c:2104:gst_aggregator_query_latency_unlocked:<tiovxisp0> Latency query failed New clock: GstSystemClock 0:00:00.365142395 1733 0x291a8300 WARN v4l2bufferpool gstv4l2bufferpool.c:1397:gst_v4l2_buffer_pool_dqbuf:<v4l2src0:pool0:src> Driver should never set v4l2_buffer.field to ANY 0:00:00.368003093 1733 0x291a8860 FIXME basesink gstbasesink.c:3395:gst_base_sink_default_event:<udpsink0> stream-start event without group-id. Consider implementing group-id handling in the upstream elements Redistribute latency... 0:00:00.415140240 1733 0x291a8860 ERROR v4l2allocator gstv4l2allocator.c:740:gst_v4l2_allocator_start:<v4l2h264enc0:pool0:sink:allocator> error requesting 4 buffers: Cannot allocate memory 0:00:00.415394297 1733 0x291a8860 ERROR v4l2bufferpool gstv4l2bufferpool.c:957:gst_v4l2_buffer_pool_start:<v4l2h264enc0:pool0:sink> we received 0 buffer from device '/dev/video1', we want at least 4 0:00:00.415629704 1733 0x291a8860 ERROR bufferpool gstbufferpool.c:572:gst_buffer_pool_set_active:<v4l2h264enc0:pool0:sink> start failed 0:00:00.415728228 1733 0x291a8860 WARN v4l2videoenc gstv4l2videoenc.c:849:gst_v4l2_video_enc_handle_frame:<v4l2h264enc0> error: Failed to allocate required memory. 0:00:00.415796027 1733 0x291a8860 WARN v4l2videoenc gstv4l2videoenc.c:849:gst_v4l2_video_enc_handle_frame:<v4l2h264enc0> error: Buffer pool activation failed ERROR: from element /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0: Failed to allocate required memory. Additional debug info: ../gst-plugins-good-1.20.7/sys/v4l2/gstv4l2videoenc.c(849): gst_v4l2_video_enc_handle_frame (): /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0: Buffer pool activation failed 0:00:00.417145559 1733 0x291a8860 FIXME aggregator gstaggregator.c:1412:gst_aggregator_aggregate_func:<tiovxisp0> Subclass should call gst_aggregator_selected_samples() from its aggregate implementation. Execution ended after 0:00:00.113633558 Setting pipeline to NULL ... 0:00:00.424346721 1733 0x291a8860 ERROR tiovxisp gsttiovxisp.c:1801:gst_tiovx_isp_postprocess:<tiovxisp0> Unable to call exposure ioctl: -1 Freeing pipeline ... 1359.862341 s: VX_ZONE_WARNING:[vxReleaseContext:1144] Found a reference 0xffff86fb7708 of type 0000080f at external count 1, internal count 0, releasing it 1359.862416 s: VX_ZONE_WARNING:[vxReleaseContext:1146] Releasing reference (name=image_118) now as a part of garbage collection 1359.862467 s: VX_ZONE_WARNING:[vxReleaseContext:1144] Found a reference 0xffff87025978 of type 00000813 at external count 1, internal count 0, releasing it 1359.862495 s: VX_ZONE_WARNING:[vxReleaseContext:1146] Releasing reference (name=object_array_120) now as a part of garbage collection 1359.863151 s: VX_ZONE_WARNING:[vxReleaseContext:1144] Found a reference 0xffff87025b18 of type 00000813 at external count 1, internal count 0, releasing it 1359.863199 s: VX_ZONE_WARNING:[vxReleaseContext:1146] Releasing reference (name=object_array_122) now as a part of garbage collection 1359.863970 s: VX_ZONE_INIT:[tivxHostDeInitLocal:115] De-Initialization Done for HOST !!! 1359.871294 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: 27 alloc's of 47102830 bytes DDR_SHARED_MEM: Free's : 27 free's of 47102830 bytes DDR_SHARED_MEM: Open's : 0 allocs of 0 bytes MEM: Deinit ... Done !!! APP: Deinit ... Done !!!
i get error saying failed to allocate memory.
How do i get this to stream over Ethernet.
Regards,
Adnan