AOM-DB3500 Video In(MIPI CSI0/CSI1)——Camera
Contents
Camera
AOM-3821 has two MIPI-CSI camera ports.
Peripheral: ROM-EC50 + CRK8F4403-V1 (IMX415) Cable: 39-pin 0.3mm pitch, unidirectional FPC.
The USB on ROM-EC50 requires external 5V power supply to ensure the camera's voltage level.
| MIPI-CSI camera ports | |||
| Camera Number | Video Port | Note | AOM-DB3500 Number |
| Camera1 | 22 | (I2C 4)4 Lane | CSI0_FPC |
| Camera2 | 31 | (I2C 8)4 Lane | CSI1_FPC |
View Resolution
Taking port 22 as an example, you can enter the following instructions to view information such as the resolution, pixel format, Field, Number of planes, Flags, Colorspace, Transfer Function, YCbCr/HSV Encoding, Quantization, Bytes per Line and
Size Image.
# v4l2-ctl -d /dev/video22 --get-fmt-video Format Video Capture Multiplanar: Width/Height : 3840/2160 Pixel Format : 'NV12' (Y/UV 4:2:0) Field : None Number of planes : 1 Flags : Colorspace : sRGB Transfer Function : Rec. 709 YCbCr/HSV Encoding: Rec. 709 Quantization : Full Range Plane 0 : Bytes per Line : 3840 Size Image : 12441600
Set Resolution
Taking port 22 as an example, you can enter the following commands to set the resolution to 1920*1080.
# v4l2-ctl -d /dev/video22 --set-fmt-video=width=1920,height=1080,\pixelformat='NV12'
Preview Camera
Taking port 22 as an example, you can set the preview of the camera video by using the following command.
# export DISPLAY=:0.0 # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/aarch64-linux-gnu/ gstreamer-1.0 #gst-launch-1.0 v4l2src device=/dev/video22 \! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 \! xvimagesink
Camera Photography
Taking port 22 as an example, the following command can be used to take a camera photo, and the save address is picture.jpg in the current directory.
# gst-launch-1.0 v4l2src device=/dev/video22 num-buffers=1 \ ! video/x-raw,format=NV12,width=1920,height=1080 ! jpegenc ! filesink location= picture.jpg
Camera Screen Recording
Taking port 22 as an example, the following command can be used to record videos with the camera, and the save address is video.mp4 in the current directory.
# gst-launch-1.0 -e \ v4l2src device=/dev/video22 \ ! video/x-raw,format=NV12,width=1920,height=1080,framerate=25/1 \ ! videoconvert \ ! x264enc bitrate=5000 speed-preset=ultrafast tune=zerolatency \ ! h264parse \ ! mp4mux \ ! filesink location= video.mp4
