root@imx6ul7d:~# gst-inspect-1.0 imxv4l2src ====== IMXV4L2SRC: 4.9.0 build on May 8 2024 06:06:55. ====== Factory Details: Rank primary + 1 (257) Long-name IMX Video (video4linux2) Source Klass Source/Video Description Capture frames from IMX SoC video4linux2 device Author Multimedia Team Plugin Details: Name imxv4l2 Description IMX SoC v4l2-based video source/sink Filename /usr/lib/gstreamer-1.0/libgstimxv4l2.so Version 4.9.0 License LGPL Source module imx-gst1.0-plugin Binary package Freescle Gstreamer Multimedia Plugins Origin URL http://www.freescale.com GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstBaseSrc +----GstPushSrc +----GstImxV4l2Src Pad Templates: SRC template: 'src' Availability: Always Capabilities: EMPTY Element has no clocking capabilities. Element has no URI handling capabilities. Pads: SRC: 'src' Pad Template: 'src' Element Properties: automatic-eos : Automatically EOS when the segment is done flags: readable, writable Boolean. Default: true blocksize : Size in bytes to read per buffer (-1 = default) flags: readable, writable Unsigned Integer. Range: 0 - 4294967295 Default: 4096 device : Device location flags: readable, writable String. Default: "/dev/video0" do-timestamp : Apply current stream time to buffers flags: readable, writable Boolean. Default: false frame-plus : set number of addtional frames for smoothly recording flags: readable, writable Unsigned Integer. Range: 0 - 16 Default: 3 name : The name of the object flags: readable, writable String. Default: "imxv4l2src0" num-buffers : Number of buffers to output before sending EOS (-1 = unlimited) flags: readable, writable Integer. Range: -1 - 2147483647 Default: -1 parent : The parent of the object flags: readable, writable Object of type "GstObject" typefind : Run typefind before negotiating (deprecated, non-functional) flags: readable, writable, deprecated Boolean. Default: false use-v4l2src-memory : Force allocate video frame buffer by V4L2 capture flags: readable, writable Boolean. Default: true (END) blocksize : Size in bytes to read per buffer (-1 = default) flags: readable, writable Unsigned Integer. Range: 0 - 4294967295 Default: 4096 device : Device location flags: readable, writable String. Default: "/dev/video0" do-timestamp : Apply current stream time to buffers flags: readable, writable Boolean. Default: false frame-plus : set number of addtional frames for smoothly recording flags: readable, writable Unsigned Integer. Range: 0 - 16 Default: 3 name : The name of the object flags: readable, writable String. Default: "imxv4l2src0" num-buffers : Number of buffers to output before sending EOS (-1 = unlimited) flags: readable, writable Integer. Range: -1 - 2147483647 Default: -1 parent : The parent of the object flags: readable, writable Object of type "GstObject" typefind : Run typefind before negotiating (deprecated, non-functional) flags: readable, writable, deprecated Boolean. Default: false use-v4l2src-memory : Force allocate video frame buffer by V4L2 capture flags: readable, writable Boolean. Default: true (END) root@imx6ul7d:~# v4l2-ctl --list-devices i.MX6S_CSI (platform:21c4000.csi): /dev/video0 pxp (pxp_v4l2): /dev/video1 root@imx6ul7d:~# v4l2-ctl --device=/dev/video0 --list-formats ioctl: VIDIOC_ENUM_FMT Type: Video Capture [0]: 'YUYV' (YUYV 4:2:2) [1]: 'UYVY' (UYVY 4:2:2) root@imx6ul7d:~# gst-launch-1.0 imxv4l2src num-buffers=1 device=/dev/video0 ! "video/x-raw,width=640,height=480,format=YUY2" ! jpegenc ! filesink location=test.jpg ====== IMXV4L2SRC: 4.9.0 build on May 8 2024 06:06:55. ====== WARNING: erroneous pipeline: could not link imxv4l2src0 to jpegenc0, imxv4l2src0 can't handle caps video/x-raw, width=(int)640, height=(int)480, format=(string)YUY2 root@imx6ul7d:~# root@imx6ul7d:~# gst-launch-1.0 imxv4l2src num-buffers=1 device=/dev/video0 ! "video/x-raw,width=640,height=480,format=YUY2" ! jpegenc ! filesink location=test.jpg ====== IMXV4L2SRC: 4.9.0 build on May 8 2024 06:06:55. ====== WARNING: erroneous pipeline: could not link imxv4l2src0 to jpegenc0, imxv4l2src0 can't handle caps video/x-raw, width=(int)640, height=(int)480, format=(string)YUY2 root@imx6ul7d:~# gst-launch-1.0 imxv4l2src device=/dev/video0 num-buffers=1 ! jpegenc ! filesink location=sample.jpg ====== IMXV4L2SRC: 4.9.0 build on May 8 2024 06:06:55. ====== WARNING: erroneous pipeline: could not link imxv4l2src0 to jpegenc0 root@imx6ul7d:~# gst-launch-1.0 v4l2src num-buffers=1 device=/dev/video0 ! "video/x-raw,width=640,height=480,format=YUY2" ! jpegenc ! filesink location=test.jpg Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory. Additional debug info: /usr/src/debug/gstreamer1.0-plugins-good/1.24.0.imx/sys/v4l2/gstv4l2src.c(955): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Buffer pool activation failed Execution ended after 0:00:02.214627093 Setting pipeline to NULL ... Freeing pipeline ... root@imx6ul7d:~# v4l2-ctl -v width=640,height=480,pixelformat=YUYV --stream-to=snapshot.raw --stream-count=1 --stream-mmap VIDIOC_STREAMON returned -1 (Timer expired) root@imx6ul7d:~# GST_DEBUG=GST_BUFFER:5 gst-launch-1.0 imxv4l2src device="/dev/video0" num-buffers=1 ! capsfilter caps="video/x-raw, format=YUY2, width=640, height=480, framerate=30/1" ! videoconvert ! filesink location=snapshot.raw ====== IMXV4L2SRC: 4.9.0 build on May 8 2024 06:06:55. ====== WARNING: erroneous pipeline: could not link imxv4l2src0 to capsfilter0 root@imx6ul7d:~# root@imx6ul7d:~# gst-launch-1.0 imxv4l2src device="/dev/video0" num-buffers=1 ! 'video/x-raw,format=YUY2,width=640,height=480, framerate=30/1' ! videoconvert ! filesink location=sample.raw ====== IMXV4L2SRC: 4.9.0 build on May 8 2024 06:06:55. ====== WARNING: erroneous pipeline: could not link imxv4l2src0 to videoconvert0, imxv4l2src0 can't handle caps video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1 root@imx6ul7d:~#