Difference between revisions of "AFE-R761 GMSL & AHD"

From ESS-WIKI
Jump to: navigation, search
Line 69: Line 69:
  
 
[[File:AFE-R761 AHD Number.png]]
 
[[File:AFE-R761 AHD Number.png]]
 +
  
 
== '''SW Function''' ==
 
== '''SW Function''' ==
 +
 +
=== '''View Resolution''' ===
 +
 +
Taking port 0 as an example, you can enter the following instructions to view information such as the resolution, pixel format, Field, Number of planes, Flags, Colorspace,<br/> Transfer Function, YCbCr/HSV Encoding, Quantization, Bytes per Line and Size&nbsp;Image.
 +
<pre># v4l2-ctl -d /dev/video0 --get-fmt-video
 +
Format Video Capture Multiplanar:
 +
&nbsp;Width/Height : 1920/1080
 +
&nbsp;Pixel Format : 'NV12' (Y/UV 4:2:0)
 +
&nbsp;Field : None
 +
&nbsp;Number of planes : 1
 +
&nbsp;Flags :
 +
&nbsp;Colorspace : Rec. 709
 +
&nbsp;Transfer Function : Rec. 709
 +
&nbsp;YCbCr/HSV Encoding: Rec. 709
 +
&nbsp;Quantization : Default
 +
&nbsp;Plane 0 :
 +
&nbsp;Bytes per Line : 1920
 +
&nbsp;Size Image : 3110400</pre>
 +
 +
=== '''Set Resolution''' ===
 +
 +
Taking port 0 as an example, you can enter the following commands to set the resolution to 1920*1080.
 +
<pre># v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat='NV12'</pre>
 +
 +
=== '''Preview camera''' ===
 +
 +
Taking port 0 as an example, you can set the preview of the camera video by using&nbsp;the following command.
 +
<pre># 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/video0 \
 +
! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! xvimage�sink</pre>
 +
 +
=== '''Camera photography''' ===
 +
 +
Taking port 0 as an example, the following command can be used to take a camera&nbsp;photo, and the save address is picture.jpg in the current directory.
 +
<pre># gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=10 \
 +
! video/x-raw,format=NV12,width=1920,height=1080 ! jpegenc \
 +
! multifilesink location=picture_%02d.jpg && \
 +
rm picture_0{0..8}.jpg && mv picture_09.jpg picture.jpg</pre>
 +
 +
=== '''Camera screen recording''' ===
 +
 +
Taking port 0 as an example, the following command can be used to record videos&nbsp;with the camera, and the save address is video.mp4 in the current directory.
 +
<pre># gst-launch-1.0 -e \
 +
v4l2src device=/dev/video0 \
 +
! 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</pre>
  
 
&nbsp;
 
&nbsp;

Revision as of 05:03, 16 January 2026

GMSL

AFE-R761-UxC1 can support 4 ~ 6 GMSL Cameras via AFE-RM02-xPA1 expansion board. The default supported resolution is 1920 x 1080 @ 30fps.
Please note that the supported voltage is 12V.

AFE-R761 GMSL.jpg

Hardware pin definition:

GMSL:GMSL Camera Connector
Pin Pin Name
1 GMSL_IN_P (12V)
2 GND
3 GND
4 GND
5 GND


SW Number

AFE-R761 GMSL Number.png

AHD

AFE-R761-UxB1 can support 4 ~ 6 AHD Cameras via AFE-RM01 expansion board. The default supported resolution is 1920 x 1080 @ 30fps.

Please note that the supported voltage/current is 12V/200mA.

AFE-R761 AHD.jpg

Hardware pin definition:

AHD:AHD Camera Connector
Pin Pin Name
1 AHD_GND
2 AHD_VIN
3 12V
4 GND

SW Number:

AFE-R761 AHD Number.png


SW Function

View Resolution

Taking port 0 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/video0 --get-fmt-video
Format Video Capture Multiplanar:
 Width/Height : 1920/1080
 Pixel Format : 'NV12' (Y/UV 4:2:0)
 Field : None
 Number of planes : 1
 Flags :
 Colorspace : Rec. 709
 Transfer Function : Rec. 709
 YCbCr/HSV Encoding: Rec. 709
 Quantization : Default
 Plane 0 :
 Bytes per Line : 1920
 Size Image : 3110400

Set Resolution

Taking port 0 as an example, you can enter the following commands to set the resolution to 1920*1080.

# v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat='NV12'

Preview camera

Taking port 0 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/video0 \
! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! xvimage�sink

Camera photography

Taking port 0 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/video0 num-buffers=10 \
! video/x-raw,format=NV12,width=1920,height=1080 ! jpegenc \
! multifilesink location=picture_%02d.jpg && \
rm picture_0{0..8}.jpg && mv picture_09.jpg picture.jpg

Camera screen recording

Taking port 0 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/video0 \
! 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