Part Number: TDA4VH-Q1
Other Parts Discussed in Thread: TDA4VH
Tool/software:
TDA4VH
SDK 11.0 linux+freertos
We are using gstreamer-plugin v4l2h264enc to encode video stream. Everything works properly when we use the following the gst pipeline conmmand.
[2025-06-13 12:08:11] gst_wrapper: GstCmdString:
[2025-06-13 12:08:11] appsrc format=GST_FORMAT_TIME is-live=true do-timestamp=true block=false name=myAppSrc0 ! queue
[2025-06-13 12:08:11] ! video/x-raw, width=(int)1536, height=(int)1728, framerate=(fraction)30/1, format=(string)NV12, interlace-mode=(string)progressive, colorimetry=(string)smpte240m
[2025-06-13 12:08:11] ! v4l2h264enc
[2025-06-13 12:08:11] ! video/x-h264
[2025-06-13 12:08:11] ! h264parse config-interval=-1
[2025-06-13 12:08:11] ! queue ! appsink name=myAppSink0 max-buffers=50 drop=true
[2025-06-13 12:08:11]
[2025-06-13 12:08:11] GstPipe init status 0!
Through the log, we can confirm that the data pushed by appsrc uses the memory of DMA-BUF, Therefore, we added the output-io-mode=5 configuration for v4l2h264enc in order to reduce the CPU load.
[2025-06-13 13:40:22] gst_wrapper: GstCmdString:
[2025-06-13 13:40:22] appsrc format=GST_FORMAT_TIME is-live=true do-timestamp=true block=false name=myAppSrc0 ! queue
[2025-06-13 13:40:22] ! video/x-raw, width=(int)1536, height=(int)1728, framerate=(fraction)30/1, format=(string)NV12, interlace-mode=(string)progressive, colorimetry=(string)smpte240m
[2025-06-13 13:40:22] ! v4l2h264enc output-io-mode=dmabuf-import
[2025-06-13 13:40:22] ! video/x-h264
[2025-06-13 13:40:22] ! h264parse config-interval=-1
[2025-06-13 13:40:22] ! queue ! appsink name=myAppSink0 max-buffers=50 drop=true
[2025-06-13 13:40:22]
[2025-06-13 13:40:22] GstPipe init status 0!
But the v4l2h264enc plugin runs with the error:
[2025-06-13 14:22:21] tivxTivxkernelpadimageProcess start !!!!
[2025-06-13 14:22:21] 0:00:13.155022482 1036 0xffff3c000d70 WARN v4l2bufferpool gstv4l2bufferpool.c:850:gst_v4l2_buffer_pool_start:<v4l2h264enc0:pool0:src> Uncertain or not enough buffers, enabling copy threshold
[2025-06-13 14:22:21] 0:00:13.156372645 1036 0xffff3c000d70 ERROR v4l2allocator gstv4l2allocator.c:1147:gst_v4l2_allocator_import_dmabuf:<v4l2h264enc0:pool0:sink:allocator> Got 2 dmabuf but needed 1
[2025-06-13 14:22:21] 0:00:13.156446342 1036 0xffff3c000d70 ERROR v4l2bufferpool gstv4l2bufferpool.c:389:gst_v4l2_buffer_pool_import_dmabuf:<v4l2h264enc0:pool0:sink> failed to import dmabuf
[2025-06-13 14:22:21] 0:00:13.156492308 1036 0xffff3c000d70 WARN bufferpool gstbufferpool.c:1246:default_reset_buffer:<v4l2h264enc0:pool0:sink> Buffer 0xffff3800a3f0 without the memory tag has maxsize (0) that is smaller than the configured buffer pool size (3981312). The buffer will be not be reused. This is most likely a bug in this GstBufferPool subclass
[2025-06-13 14:22:21] 0:00:13.156748290 1036 0xffff3c000d70 ERROR v4l2bufferpool gstv4l2bufferpool.c:2211:gst_v4l2_buffer_pool_process:<v4l2h264enc0:pool0:sink> failed to prepare data
[2025-06-13 14:22:21] 0:00:13.156832573 1036 0xffff3c000d70 WARN v4l2videoenc gstv4l2videoenc.c:901:gst_v4l2_video_enc_handle_frame:<v4l2h264enc0> error: Failed to process frame.
[2025-06-13 14:22:21] 0:00:13.156868849 1036 0xffff3c000d70 WARN v4l2videoenc gstv4l2videoenc.c:901:gst_v4l2_video_enc_handle_frame:<v4l2h264enc0> error: Maybe be due to not enough memory or failing driver
[2025-06-13 14:22:21] tivxTivxkernelpadimageProcess start !!!!
Is our current configuration correct? If correct, how should the above-mentioned problems be solved?





