AM6 CSI

From Variscite Wiki
Revision as of 22:20, 14 March 2023 by Nate (talk | contribs) (Created page with "<!-- Set release according to "release" parameter in URL and use am62-yocto-dunfell-5.10.140_08.06.00.42-v1.0 as default --> {{INIT_RELEASE_PARAM|am62-yocto-dunfell-5.10.140_0...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Warning: This page is designed to be used with a 'release' URL parameter.

This page is using the default release am62-yocto-dunfell-5.10.140_08.06.00.42-v1.0.
To view this page for a specific Variscite SoM and software release, please follow these steps:

  1. Visit variwiki.com
  2. Select your SoM
  3. Select the software release
Camera

Testing MIPI-CSI2 cameras

Before running any of the pipelines below make sure you have camera(s) connected. AM6 family of processors uses gstreamer as multimedia framework. Please refer to https://gstreamer.freedesktop.org/

Camera Probe

Run the following command to see if you have the camera(s) detected

# v4l2-ctl --list-devices

This should produce the following output

j721e-csi2rx (platform:30102000.ticsi2rx):
        /dev/video0
        /dev/video1
        /dev/video2
        /dev/video3
        /dev/media0

The camera interface is /dev/video0

Testing Camera Preview on Display

  • VGA 640x480@30fps:
# media-ctl --set-v4l2 '"ov5640 0-003c":0 [fmt:Expression error: Unexpected < operator./640x480@1/30]'
# XDG_RUNTIME_DIR="/run/user/0" gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480,framerate=30/1,format=YUY2 ! waylandsink sync=false


  • NTSC 480p 720x480@30fps:
# media-ctl --set-v4l2 '"ov5640 0-003c":0 [fmt:Expression error: Unexpected < operator./720x480@1/30]'
# XDG_RUNTIME_DIR="/run/user/0" gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=720,height=480,framerate=30/1,format=YUY2 ! waylandsink sync=false


  • HD 720p 1280x720@30fps:
# media-ctl --set-v4l2 '"ov5640 0-003c":0 [fmt:Expression error: Unexpected < operator./1280x720@1/30]'
# XDG_RUNTIME_DIR="/run/user/0" gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720,framerate=30/1,format=YUY2 ! waylandsink sync=false


  • Full HD 1280p 1920x1080@30fps:
# media-ctl --set-v4l2 '"ov5640 0-003c":0 [fmt:Expression error: Unexpected < operator./1920x1080@1/30]'
# XDG_RUNTIME_DIR="/run/user/0" gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,framerate=30/1,format=YUY2 ! waylandsink sync=false


  • QSXGA 1944p 2592x1944@30fps:
# media-ctl --set-v4l2 '"ov5640 0-003c":0 [fmt:Expression error: Unexpected < operator./2592x1944@1/30]'
# XDG_RUNTIME_DIR="/run/user/0" gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=2592,height=1944,framerate=30/1,format=YUY2 ! waylandsink sync=false


Testing Camera JPEG Snapshot

To capture JPEG snapshot run one of the pipelines below depending upon the required picture resolution.


  • VGA 640x480:
# media-ctl --set-v4l2 '"ov5640 0-003c":0 [fmt:Expression error: Unexpected < operator./640x480@1/30]'
# XDG_RUNTIME_DIR="/run/user/0" gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=5 ! video/x-raw,width=640,height=480 ! jpegenc ! multifilesink max-files=1 location=/tmp/test_640x480.jpg


  • NTSC 480p 720x480:
# media-ctl --set-v4l2 '"ov5640 0-003c":0 [fmt:Expression error: Unexpected < operator./720x480@1/30]'
# XDG_RUNTIME_DIR="/run/user/0" gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=5 ! video/x-raw,width=720,height=480 ! jpegenc ! multifilesink max-files=1 location=/tmp/test_720x480.jpg


  • HD 720p 1280x720:
# media-ctl --set-v4l2 '"ov5640 0-003c":0 [fmt:Expression error: Unexpected < operator./1280x720@1/30]'
# XDG_RUNTIME_DIR="/run/user/0" gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=5 ! video/x-raw,width=1280,height=720 ! jpegenc ! multifilesink max-files=1 location=/tmp/test_1280x720.jpg


  • Full HD 1280p 1920x1080:
# media-ctl --set-v4l2 '"ov5640 0-003c":0 [fmt:Expression error: Unexpected < operator./1920x1080@1/30]'
# XDG_RUNTIME_DIR="/run/user/0" gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=5 ! video/x-raw,width=1920,height=1080 ! jpegenc ! multifilesink max-files=1 location=/tmp/test_1920x1080.jpg


  • QSXGA 1944p 2592x1944:
# media-ctl --set-v4l2 '"ov5640 0-003c":0 [fmt:Expression error: Unexpected < operator./2592x1944@1/30]'
# XDG_RUNTIME_DIR="/run/user/0" gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=5 ! video/x-raw,width=2592,height=1944 ! jpegenc ! multifilesink max-files=1 location=/tmp/test_2592x1944.jpg