Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


Sidebar

products:sbc:edge-2l:add-ons:edge-2l-mipi-camera

This is an old revision of the document!


Edge-2L MIPI Camera Usage

Linux

Edge-2L all camera interfaces support 4K@60fps record.

Video Node

You can find the video nodes from the table below.

Video Node
CAM0 /dev/video33
CAM1 /dev/video21

Record Video with Gstreamer

Record video from CAM0:

gst-launch-1.0 v4l2src device=/dev/video33 io-mode=dmabuf min-buffers=64 num-buffers=300 ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! mpph264enc ! h264parse ! qtmux ! filesink location=/tmp/video33.mp4

Record video from CAM1:

gst-launch-1.0 v4l2src device=/dev/video21 io-mode=dmabuf min-buffers=64 num-buffers=300 ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! mpph264enc ! h264parse ! qtmux ! filesink location=/tmp/video21.mp4

Capture Frame with V4L2 Utils

Follow the steps below to install v4l-utils:

sudo apt update
sudo apt install v4l-utils

Capture frame from CAM0:

v4l2-ctl -d /dev/video33 --set-fmt-video=width=3840,height=2160,pixelformat=NV12 --stream-mmap=3 --stream-skip=3 --stream-to=/tmp/data33.yuv --stream-count=1 --stream-poll

Capture frame from CAM1:

v4l2-ctl -d /dev/video21 --set-fmt-video=width=3840,height=2160,pixelformat=NV12 --stream-mmap=3 --stream-skip=3 --stream-to=/tmp/data21.yuv --stream-count=1 --stream-poll

Preview the file:

$ ffplay -f rawvideo -pixel_format nv12 -video_size 3840x2160 /tmp/dataXX.yuv

Camera Interfaces Performance

IMX415

  • connect one camera separately:
frame rate
CAM0 4K@60fps
CAM1 4K@60fps
  • connect two cameras simultaneously
frame rate
CAM2 4K@60fps
CAM3 4K@60fps

OS08A10

  • connect one camera separately:

| ^ frame rate ^

CAM0 4K@60fps
CAM1 4K@60fps
  • connect two cameras simultaneously
frame rate
CAM2 4K@60fps
CAM3 4K@60fps

IMX585

  • connect one camera separately:
frame rate
CAM0 4K@60fps
CAM1 4K@60fps
  • connect two cameras simultaneously
frame rate
CAM2 4K@60fps
CAM3 4K@60fps

IMX678

  • connect one camera separately:
frame rate
CAM0 4K@60fps
CAM1 4K@60fps
  • connect two cameras simultaneously
frame rate
CAM2 4K@60fps
CAM3 4K@60fps

Android

WIP:

Last modified: 2025/12/01 05:05 by gray