.. _camera-guide-imx: Streaming on NXP i.MX modules ============================== Streaming and capturing video from a camera on i.MX8/9 based modules (QS8M, QSXM, QSXP, QS93) with a weston desktop image. See :doc:`index` for enablement. Raspberry Pi Camera (IMX219) on i.MX8M Mini/Nano (qs8m, qsxm) ------------------------------------------------------------- Start the camera stream from the serial terminal: .. prompt:: :prompts: # gst-launch-1.0 -v v4l2src ! \ "video/x-bayer,format=rggb,width=640,height=480,framerate=30/1" ! \ bayer2rgb ! videoconvert ! autovideosink sync=false Capture a single .jpg frame from the camera stream: .. prompt:: :prompts: # gst-launch-1.0 -v v4l2src num-buffers=1 ! \ "video/x-bayer,format=rggb,width=640,height=480,framerate=30/1" ! \ bayer2rgb ! videoconvert ! jpegenc ! filesink location=test-cap.jpg Raspberry Pi Camera (IMX219) on i.MX8M Plus (qsxp-ml81) ------------------------------------------------------- Start the imx8-isp in the background: .. prompt:: :prompts: # /opt/imx8-isp/bin/start_isp.sh & Then start the camera stream: .. prompt:: :prompts: # gst-launch-1.0 v4l2src device=/dev/video2 ! waylandsink Basler cameras (qsxm-mm60, qsxp-ml81 on QSBASE3) ------------------------------------------------ Start the pylon viewer from the serial terminal: .. prompt:: :prompts: # export DISPLAY=:0; pylon Enable the camera and click on the camera icon to stream a live video. **Live-stream** the camera with gstreamer: .. prompt:: :prompts: # gst-launch-1.0 -v v4l2src device=/dev/video2 ! waylandsink You can also **record** the camera stream using the VPU: .. prompt:: :prompts: # gst-launch-1.0 v4l2src device=/dev/video2 ! \ "video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1" ! \ vpuenc_h264 ! mpegtsmux name=mux ! filesink location=test_1080.ts