<div dir="ltr"><div>Hi All,</div><div><br></div><div>I am attempting to use gstreamer with a camera I've had to write the driver for on a relatively untested arm board (an Allwinner S3). And guess what - I've got issues :)</div><div><br></div><div>The camera has an onboard ISP, so produces UYVY 422p on Mipi CSI, and the MIPI peripheral has the capability to convert between different YUV formats In fact interleaved UYVY comes out in a really weird byte order, so I've been using NV12 or NV16 as it is correct. When I use v4l2-ctl to produce the stream, all is well:</div><div><br></div><div>v4l2-ctl --set-fmt-video=width=1280,height=720,pixelformat=NV12 --stream-mmap --stream-count=600 --silent -d /dev/video0 --stream-to=MyFile.raw</div><div><br></div><div>However when I try to do similar things with gstreamer, I have issues:</div><div>gst-launch-1.0 -ve v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720,framerate=60/1,format=NV12 ! queue ! filesink location=GstNV12Raw.raw</div><div><br></div><div>gives:</div><div>ot@openhd-x20dev:/home/openhd# gst-launch-1.0 -ve v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720,framerate=60/1,format=NV12 ! queue ! filesink location=GstNV12Raw.raw<br>[ 2048.216638] hdzerocam_open(816)<br>[ 2048.219869] hdzerocam_fill_fmt(805): HDZero fill<br>Setting pipeline to PAUSED ...<br>Pipeline is live and does not need PREROLL ...<br>Pipeline is PREROLLED ...<br>Setting pipeline to PLAYING ...<br>New clock: GstSystemClock<br>/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)60/1, format=(string)NV12, interlace-m[ 2048.274807] hdzerocam_get_fmt(710)<br>ode=(string)progressive, colorimetry=(string)2:0:0:0<br>/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/[ 2048.290307] hdzerocam_s_stream(755)<br>x-raw, width=(int)1280, height=(int)720, framerate=(fraction)60/1, format=(string)NV12, interlace-mode=(string)progressive, colorimetry=(string)2:0:0:0<br>/GstPipeline:pipeline0/GstQueue:queue0.[ 2048.309943] hdzerocam_s_stream(755)<br>GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)60/1, format=(string)NV12, interlace-mode=(string)progressive, colorimetry=(string)2:0:0:0<br>/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)60/1, format=(string)NV12, interlace-mode=(string)progressive, colorimetry=(string)2:0:0:0<br>/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)60/1, format=(string)NV12, interlace-mode=(string)progressive, colorimetry=(string)2:0:0:0<br>/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)60/1, format=(string)NV12, interlace-mode=(string)progressive, colorimetry=(string)2:0:0:0<br>0:00:00.159656333   443   0x5b4c58 WARN              video-info video-info.c:204:validate_colorimetry: Need to specify a color matrix when using YUV format (NV12)<br>0:00:00.159812875   443   0x5b4c58 WARN              video-info video-info.c:520:gst_video_info_from_caps: invalid colorimetry, using default<br>0:00:00.161243625   443   0x5b4c58 WARN              video-info video-info.c:204:validate_colorimetry: Need to specify a color matrix when using YUV format (NV12)<br>0:00:00.161350333   443   0x5b4c58 WARN              video-info video-info.c:520:gst_video_info_from_caps: invalid colorimetry, using default<br>0:00:00.161923083   443   0x5b4c58 WARN              video-info video-info.c:204:validate_colorimetry: Need to specify a color matrix when using YUV format (NV12)<br>0:00:00.162008667   443   0x5b4c58 WARN              video-info video-info.c:520:gst_video_info_from_caps: invalid colorimetry, using default<br>0:00:00.162248167   443   0x5b4c58 WARN              video-info video-info.c:204:validate_colorimetry: Need to specify a color matrix when using YUV format (NV12)<br>0:00:00.162310958   443   0x5b4c58 WARN              video-info video-info.c:520:gst_video_info_from_caps: invalid colorimetry, using default<br>0:00:00.172358583   443   0x5b4c58 WARN          v4l2bufferpool gstv4l2bufferpool.c:814:gst_v4l2_buffer_pool_start:<v4l2src0:pool0:src> Uncertain or not enough buffers, enabling copy threshold<br>0:00:00.205794042   443   0x5b4c58 ERROR              videometa gstvideometa.c:242:default_map: plane 1, no memory at offset 1382400<br>0:00:00.205912917   443   0x5b4c58 ERROR                default video-frame.c:168:gst_video_frame_map_id: failed to map video frame plane 1<br>0:00:00.206110167   443   0x5b4c58 ERROR         v4l2bufferpool gstv4l2bufferpool.c:161:gst_v4l2_buffer_pool_copy_buffer:<v4l2src0:pool0:src> could not map buffer<br>0:00:00.206237458   443   0x5b4c58 ERROR         v4l2bufferpool gstv4l2bufferpool.c:2071:gst_v4l2_buffer_pool_process:<v4l2src0:pool0:src> failed to copy buffer<br>0:00:00.206398958   443   0x5b4c58 WARN                 basesrc gstbasesrc.c:3127:gst_base_src_loop:<v4l2src0> error: Internal data stream error.<br>0:00:00.206471292   443   0x5b4c58 WARN                 basesrc gstbasesrc.c:3127:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason error (-5)<br>ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.<br>Additional debug info:<br>../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:<br>streaming stopped, reason error (-5)<br>Execution ended after 0:00:00.057735709<br>Setting pipeline to NULL ...<br>Freeing pipeline ...<br></div><div><br></div><div>----------------------------------------------------</div><div>i'm well aware that this might not be gstreamer's issue, but I'm really struggling to understand what  is going on with gstvideometa.c:242:default_map: plane 1, no memory at offset 1382400</div><div><br></div><div>Full GST_DEBUG_LEVEL=4 attached in case it helps.</div><div><br></div><div>Can anyone shed some light?</div><div>Thank you</div><div>Pete<br></div></div>