{{indexmenu_n>40}} ====== Edge-2L MIPI camera usage ====== ===== Linux ===== All camera interfaces on the Edge-2L support 4K@60fps recording. ==== Video node ==== You can find the video nodes from the table below. | ^ Video Node ^ ^ CAM1 | /dev/video22 | ^ CAM2 | /dev/video31 | ==== Record video with gstreamer ==== Record video from ''CAM2'': ```shell gst-launch-1.0 v4l2src device=/dev/video31 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/video31.mp4 ``` Record video from ''CAM1'': ```shell gst-launch-1.0 v4l2src device=/dev/video22 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/video22.mp4 ``` ==== Capture frame with V4L2 utils ==== Follow the steps below to install ''v4l-utils'': ```shell sudo apt update sudo apt install v4l-utils ``` Capture frame from ''CAM2'': ```shell v4l2-ctl -d /dev/video31 --set-fmt-video=width=3840,height=2160,pixelformat=NV12 --stream-mmap=3 --stream-skip=3 --stream-to=/tmp/data31.yuv --stream-count=1 --stream-poll ``` Capture frame from ''CAM1'': ```shell v4l2-ctl -d /dev/video22 --set-fmt-video=width=3840,height=2160,pixelformat=NV12 --stream-mmap=3 --stream-skip=3 --stream-to=/tmp/data22.yuv --stream-count=1 --stream-poll ``` Preview the captured file: ```shell $ ffplay -f rawvideo -pixel_format nv12 -video_size 3840x2160 /tmp/dataXX.yuv ``` ==== Camera interfaces performance ==== * Connect one camera separately: | ^ frame rate ^ ^ CAM1 | 4K@60fps | ^ CAM2 | 4K@60fps | * Connect two cameras simultaneously: | ^ frame rate ^ ^ CAM1 | 4K@60fps | ^ CAM2 | 4K@60fps | * Connect one camera separately: | ^ frame rate ^ ^ CAM1 | 4K@60fps | ^ CAM2 | 4K@60fps | * Connect two cameras simultaneously: | ^ frame rate ^ ^ CAM1 | 4K@60fps | ^ CAM2 | 4K@60fps | * Connect one camera separately: | ^ frame rate ^ ^ CAM1 | 4K@60fps | ^ CAM2 | 4K@60fps | * Connect two cameras simultaneously: | ^ frame rate ^ ^ CAM1 | 4K@60fps | ^ CAM2 | 4K@60fps | * Connect one camera separately: | ^ frame rate ^ ^ CAM1 | 4K@60fps | ^ CAM2 | 4K@60fps | * Connect two cameras simultaneously: | ^ frame rate ^ ^ CAM1 | 4K@60fps | ^ CAM2 | 4K@60fps | ===== Android ===== WIP: