3.3. Image output settings via CUI#
In this section, we configure the GMSL board by using the command line.
Attention
This setting must be done at the GMSL2-10GbE conversion module side.
3.3.1. Image output configuration#
The configuration files are stored in the Workspace/config_streaming_v2
directory.
cd Workspace/config_streaming_v2
Then configure the board depending on the connected camera.
Caution
Up to v8
image, all GMSL ports will be assigned to either C1 or C2 camera. Combination of the C1 camera and C2 camera is not allowed.
./media_cfg_des12_v2_isx021.sh
./set_num_lines
./set_num_px_p_line
./media_cfg_des12_v2_imx490.sh
./set_num_lines_imx490
./set_num_px_p_line_imx490
In the case of C1 camera configuration, the following output will appear after you run media_cfg_des12_v2_isx021.sh
. In the case you connect less than 8 cameras, some error message will appear but configuration itself will be done without any problem.
./media_cfg_des12_v2_isx021.sh
[sudo] password for analog:
No XFCP interface available: No module named 'xfcp'
[2024-08-06 09:34:09,523] npap_enum.board (discover_structure) INFO:
Found base wrapper: erd_info_block
[2024-08-06 09:34:09,564] npap_enum.board (discover_structure) INFO:
Found block: tcp_udp_netperf_npap_support_wrapper
[2024-08-06 09:34:09,568] npap_enum.board (initialise) INFO:
Found 1 NPAP instances
[2024-08-06 09:34:09,603] npap_enum.board (discover_structure) INFO:
Found base wrapper: tcp_udp_netperf_npap_support_wrapper
[2024-08-06 09:34:09,639] npap_enum.board (discover_structure) INFO:
Found block: npap_support_wrapper
[2024-08-06 09:34:09,644] npap_enum.board (discover_structure) INFO:
Found block: tcp_udp_support_wrapper
[2024-08-06 09:34:09,672] npap_enum.board (discover_structure) INFO:
Found block: tcp_gen_support_wrapper
[2024-08-06 09:34:09,677] npap_enum.board (discover_structure) INFO:
Found block: udp_gen_support_wrapper_0
[2024-08-06 09:34:09,706] npap_enum.board (discover_structure) INFO:
Found block: udp_support_wrapper_0
[2024-08-06 09:34:09,711] npap_enum.board (discover_structure) INFO:
Found block: udp_support_wrapper_1
[2024-08-06 09:34:09,716] npap_enum.board (discover_structure) INFO:
Found block: udp_support_wrapper_2
[2024-08-06 09:34:09,721] npap_enum.board (discover_structure) INFO:
Found block: udp_support_wrapper_3
[2024-08-06 09:34:09,726] npap_enum.board (discover_structure) INFO:
Found block: udp_support_wrapper_4
[2024-08-06 09:34:09,731] npap_enum.board (discover_structure) INFO:
Found block: udp_support_wrapper_5
[2024-08-06 09:34:09,736] npap_enum.board (discover_structure) INFO:
Found block: udp_support_wrapper_6
[2024-08-06 09:34:09,741] npap_enum.board (discover_structure) INFO:
Found block: udp_support_wrapper_7
[2024-08-06 09:34:09,831] npap_enum.board (discover_structure) INFO:
Found block: udp_demo_application_7
[2024-08-06 09:34:09,920] npap_enum.board (discover_structure) INFO:
Found block: udp_demo_application_6
[2024-08-06 09:34:10,008] npap_enum.board (discover_structure) INFO:
Found block: udp_demo_application_5
[2024-08-06 09:34:10,097] npap_enum.board (discover_structure) INFO:
Found block: udp_demo_application_4
[2024-08-06 09:34:10,186] npap_enum.board (discover_structure) INFO:
Found block: udp_demo_application_3
[2024-08-06 09:34:10,275] npap_enum.board (discover_structure) INFO:
Found block: udp_demo_application_2
[2024-08-06 09:34:10,364] npap_enum.board (discover_structure) INFO:
Found block: udp_demo_application_1
[2024-08-06 09:34:10,452] npap_enum.board (discover_structure) INFO:
Found block: udp_demo_application_0
[2024-08-06 09:34:10,553] npap_enum.board (discover_structure) INFO:
Found block: npap_configuration_block
[2024-08-06 09:34:10,582] npap_enum.board (discover_structure) INFO:
Found block: priority_manager_configuration_block
Configure MAC for packet direction infrastructrure.
Read MAC address 0X20A35088080, default: 0X20A35088080
Read MAC address 0XAABBCCDDEE12, default: 0X20A35088080
Successfully set MAC address for packet steering
NPAP subsystem build date: 2024-05-23 14:59:52
NPAP subsystem git hash: 43390C65
Now exiting...
3.3.2. Outputting the image#
Finally, the image is output by using the following commands.
To output the image data from P2 port (UDP port 5008-5011)
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1280,pixelformat=UYVY --stream-mmap
To output the image data from P1 port (UDP port 5004-5007)
v4l2-ctl -d /dev/video1 --set-fmt-video=width=1920,height=1280,pixelformat=UYVY --stream-mmap
To output the image data from both P1 and P2 port
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1280,pixelformat=UYVY --stream-mmap &
v4l2-ctl -d /dev/video1 --set-fmt-video=width=1920,height=1280,pixelformat=UYVY --stream-mmap &
To output the image data from P1 port (UDP port 5004-5007)
v4l2-ctl -d /dev/video0 --set-fmt-video=width=2880,height=1860,pixelformat=UYVY --stream-mmap &
Warning
Up to v8
image, the configuration that outputs the images from P1 port is supported. Outputting the images from P2 port is not supported.
3.3.3. Stopping the image stream#
To stop the image stream, press Ctrl-C
in case you start streaming without &
. In the case you start the image stream with &
, the process runs in the background. In this case, you can find the corresponding process by using the pidof
command, then you can kill that process by using the kill
command.
pidof v4l2-ctl
sudo kill <displayed numbers>