Difference between revisions of "AOM-DB3500 Video In(MIPI CSI0/CSI1)——Camera"
Xingxing.li (talk | contribs) (Created page with " === '''Camera''' === AOM-3821 has two MIPI-CSI camera ports. {| border="1" cellpadding="1" cellspacing="1" style="width: 500px;" |- | colspan="4" | '''MIPI-CSI camera ports...") |
Xingxing.li (talk | contribs) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
AOM-3821 has two MIPI-CSI camera ports. | AOM-3821 has two MIPI-CSI camera ports. | ||
| + | |||
| + | Peripheral: ROM-EC50 + CRK8F4403-V1 (IMX415) Cable: 39-pin 0.3mm pitch, unidirectional FPC.<br/> The USB on ROM-EC50 requires external 5V power supply to ensure the camera's voltage level. | ||
{| border="1" cellpadding="1" cellspacing="1" style="width: 500px;" | {| border="1" cellpadding="1" cellspacing="1" style="width: 500px;" | ||
| Line 23: | Line 25: | ||
| CSI1_FPC | | CSI1_FPC | ||
|} | |} | ||
| + | |||
| + | === [[File:AOM-DB3500 CSI0 FPC.png]] === | ||
=== '''View Resolution''' === | === '''View Resolution''' === | ||
| Line 29: | Line 33: | ||
<pre># v4l2-ctl -d /dev/video22 --get-fmt-video | <pre># v4l2-ctl -d /dev/video22 --get-fmt-video | ||
Format Video Capture Multiplanar: | Format Video Capture Multiplanar: | ||
| − | Width/Height : 3840/2160 | + | Width/Height : 3840/2160 |
| − | Pixel Format : 'NV12' (Y/UV 4:2:0) | + | Pixel Format : 'NV12' (Y/UV 4:2:0) |
| − | Field : None | + | Field : None |
| − | Number of planes : 1 | + | Number of planes : 1 |
| − | Flags : | + | Flags : |
| − | Colorspace : sRGB | + | Colorspace : sRGB |
| − | Transfer Function : Rec. 709 | + | Transfer Function : Rec. 709 |
YCbCr/HSV Encoding: Rec. 709 | YCbCr/HSV Encoding: Rec. 709 | ||
| − | Quantization : Full Range | + | Quantization : Full Range |
| − | Plane 0 : | + | Plane 0 : |
| − | Bytes per Line : 3840 | + | Bytes per Line : 3840 |
| − | Size Image : 12441600 </pre> | + | Size Image : 12441600 </pre> |
=== '''Set Resolution''' === | === '''Set Resolution''' === | ||
Taking port 22 as an example, you can enter the following commands to set the resolution to 1920*1080. | Taking port 22 as an example, you can enter the following commands to set the resolution to 1920*1080. | ||
| − | <pre># v4l2-ctl -d /dev/video22 --set-fmt-video=width=1920,height=1080,\ | + | <pre># v4l2-ctl -d /dev/video22 --set-fmt-video=width=1920,height=1080,\pixelformat='NV12'</pre> |
=== '''Preview Camera''' === | === '''Preview Camera''' === | ||
| Line 53: | Line 57: | ||
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/aarch64-linux-gnu/ | # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/aarch64-linux-gnu/ | ||
gstreamer-1.0 | gstreamer-1.0 | ||
| − | #gst-launch-1.0 v4l2src device=/dev/video22 \! video/x-raw, | + | #gst-launch-1.0 v4l2src device=/dev/video22 \! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 \! xvimagesink</pre> |
=== '''Camera Photography''' === | === '''Camera Photography''' === | ||
| Line 59: | Line 63: | ||
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. | 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. | ||
<pre># gst-launch-1.0 v4l2src device=/dev/video22 num-buffers=1 \ | <pre># gst-launch-1.0 v4l2src device=/dev/video22 num-buffers=1 \ | ||
| − | ! video/x-raw,format=NV12,width=1920,height=1080 ! jpegenc ! filesink | + | ! video/x-raw,format=NV12,width=1920,height=1080 ! jpegenc ! filesink location= picture.jpg</pre> |
=== '''Camera Screen Recording''' === | === '''Camera Screen Recording''' === | ||
Latest revision as of 01:48, 5 January 2026
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
