跳到主要内容

Smart IPC 场景功能搭建

本文将以 V881 BGA PER1 板为示例,演示搭建 Smart IPC 场景功能,包括:

  • RTSP H264 1080p@20fps 预览
  • 1080p@20fps H264 编码视频分段滚动录像
  • 定时拍照

需要准备如下物品:

  • V881 BGA PER1 开发板
  • 单目 GC4663 模组
  • 串口线(用于调试)
  • USB线(用于下载烧录,传输文件)
  • SD 卡(用于保存码流)
  • WIFI天线(用于无线传输)
  • 路由器(用于数据交换)
  • 手机或笔记本电脑(用于播放码流)

硬件连接

准备好摄像头,排线, V881 PER1 开发板,排线需要同向排线

将排线的蓝面朝上,接入摄像头模块

排线另外一边,触点面朝向芯片,接入 PER1 开发板

摄像头安装完成

安装天线,将天线接入天线插口

插入调试串口

准备固件

如果已有固件,可以跳过本章节,从烧录固件开始看

配置方案

首先输入以下命令,配置SDK开发环境

source build/envsetup.sh

然后输入 lunch 命令加载方案

lunch

这里选择 v861-perf1-tina 方案,输入 3,按回车

输入3回车 V881

输入1回车 MX-XXX

可直接回车

配置测试 Sample

输入以下命令,进入配置界面

make menuconfig

配置页面如下

下拉找到 Allwinner 按回车进入

在最下面找到 eyesee-mpp,按回车进入

找到 select mpp sample,按空格选中

找到 mpp sample smartIPC_demo,按空格选中

使用方向键选择 Save

选择 OK

选择 EXIT

选择EXIT 直到退出 conf菜单

编译 SDK

回到控制台,输入 mp -j4 以 4 线程并行方式编译

等待 SDK 编译完成,会在 out 目录下生成固件

将固件拷贝出来,准备烧录

烧写固件

打开 PhoenixSuit,选择一键刷机,点击浏览,打开刚才生成的固件 选择全盘擦除升级

按住 PER1 开发板上的UBOOT按键,插入USB线

烧录工具出现提示,选择是

烧录中,请耐心等待

烧写结束,系统自动启动

配置 Sample

前往 platform\allwinner\eyesee-mpp\middleware\sun252iw1\sample\bin 找到刚才编译出来的Sample

编辑 sample_smartIPC_demo.conf 修改配置文件,需要修改的项目如下(可以在附录获取完整版配置文件):

stream_buf_size = -1 # 使用码流大小推流
main_rtsp_id = 0 # 启用 RTSP
main_src_frame_rate = 20 # 帧率设置 20 帧
main_encode_frame_rate = 20 # 配置编码器20帧
main_2nd_enable = 1 # 开启子码流
main_2nd_src_frame_rate = 20 #子码流帧率20帧
main_2nd_encode_frame_rate = 20 # 子码流编码帧率20帧
main_2nd_take_picture = 1 # 子码流开启拍照功能

将SD卡格式化为 FAT32 格式

将上面编译出来的 sample 和 配置文件复制到 SD 卡里

测试运行 Sample

配置无线网络

使用命令扫描无线网络

wifi -s 

使用命令连接无线网络,连接成功后使用 ifconfig 命令查看连接情况与 IP 地址

wifi -c <SSID> <密码>
ifconfig wlan0

挂载 SD 卡

插入 SD 卡后,可以在日志里看到新生成的卡设备

使用命令挂载 SD 卡

mount /dev/mmcblk0p1 /mnt/extsd

运行 Sample

前往SD卡的挂载目录,查看文件是否存在

cd /mnt/extsd
ls

使用命令,运行 sample

./sample_smartIPC_demo -path sample_smartIPC_demo.conf &

在平板上打开 VLC 播放器。配置日志显示的地址

rtsp://192.168.51.109:8554/ch0

即可打开串流视频

SD 卡插上电脑也可以看到拍到的图片和码流

附录:Sample 配置

########### paramter (ref to tulip_cedarx.conf)############
[parameter]

ve_rec_ref_buf_reduce_enable = 1 #0:disable buf reduce, 1:enable buf reduce
mul_bk_share_one_buf_enable = 0
two_tdm_rx_and_bk_share_one_buf_enable = 0
isp_embed_disable = 0
pdet_multi_share_one_model_enable = 1 # 0: disable share model; 1: enable share model, use main_3rd_pdet params
test_print_enable = 0
pdet_timeout_print_thrs = 0 # 0: no print; >0: print cost time when processing time for a person detect exceeds the threshold; unit: ms

rtsp_net_type = 3 #RTSP Network type, 0: "lo", 1: "eth0", 2: "br0", 3: "wlan0"
stream_buf_size = -1 #0:1/10 yuv420 size(default), -1: vbv buf size, >0: user set buf size, unit:bytes
product_mode = 0 #0:static ipc, 1:moving ipc, 2: doorbell, 3:cdr, 4:sdv, 5:projection, 6:UAV(Unmanned Aerial Vehicle)
vbr_opt_en = 1 #0: old vbr bitrate control, 1:new vbr bitrate control
vbr_opt_rc_priority = 3 #only for vbr opt, balance bitrate and quality, 0:quality priority, 1:bitrate priority, 2:avg bitrate first, 3:instantaneous bitrate first
vbr_opt_rc_qualitylevel = 0 #only for vbr opt, balance bitrate and quality, 0:quality low level, 1:quality middle level, 2:quality high level
rc_mode = 1 #for H264, 0:CBR 1:VBR 2:FIXQP(only for debug), 4:AVBR, 5:CVBR, 6:QVBR, 7:ABR
init_qp = 37
min_i_qp = 35
max_i_qp = 45
min_p_qp = 35
max_p_qp = 45
moving_th = 20
mb_qp_limit_en = 1
quality = 1
p_bits_coef = 10
i_bits_coef = 10
isp_ve_linkage_enable = 1
region_link_enable = 0
region_link_tex_detect_enable = 0
region_link_motion_detect_enable = 0
region_link_motion_detect_inv = 0 # [0~10]
camera_adaptive_moving_and_static_enable = 1
ve_lens_moving_max_qp = 40
wb_yuv_enable = 0
wb_yuv_buf_num = 3
wb_yuv_scaler_ratio = 0 #0:no scaler, 1: 1/8, 2: 1/2, 3: 1/4
wb_yuv_start_index = 0
wb_yuv_total_cnt = 100
wb_yuv_stream_channel = 0 #venc channel id
wb_yuv_file_path = "/mnt/extsd/wb_yuv.yuv"
vi_timeout_reset_disable = 0 #0:enable(default), >0:disable vi timeout reset for debug.
test_trigger_vi_timeout = 0 #0:disable, >0:enable and means time interval, unit is ms.
encpp_sharp_debug_disable = 0
ve_2dnr_disable = 0
ve_3dnr_disable = 0
colorspace = 0 # 0: V4L2_COLORSPACE_REC709, 1: V4L2_COLORSPACE_REC709_PART_RANGE
motion_pdet_sensitivity = 1 # [1, 2, 3] motion pdet sensitivity

test_duration = 0 #unit:s, 0:Infinite duration.

tdm_speed_down_enable = 0
tdm_tx_valid_num = 0
tdm_tx_invalid_num = 0
tdm_tx_valid_num_offset = 0

ir_cut_switch_test_enable = 0
ir_cut_switch_test_mode = 0 #0:auto switch by env, 1: switch by this interval,2:switch to ir, 3:switch to rgb
ir_cut_switch_interval = 100 #unit:ms when mode is 0,unit:s when mode is 1
ir_cut_switch_isp = 0
ir_cut_switch_ir_bin_path = "/mnt/extsd/ir"
ir_cut_switch_rbg_bin_path = "/mnt/extsd/rgb"

audio_test_enable = 0
capture_en = 1
capture_sample_rate = 16000
capture_bit_witdh = 16
capture_channel_cnt = 1
capture_ans_en = 1
capture_agc_en = 1
capture_aec_en = 1
capture_save_file = "/mnt/extsd/capture_"
capture_save_file_max_cnt = 10
capture_save_file_duration = 600
playback_en = 1
playback_volume = 80
playback_file = "/mnt/extsd/test.wav"

motionAlarm_on = 0
motionAlarm_result_print_interval = 50 #fps
motionAlarm_sensitivity = 60 #[20,40,60,80,100]
motionAlarm_support_zone = 1
motionAlarm_left_up_x = 0
motionAlarm_left_up_y = 0
motionAlarm_left_bottom_x = 0
motionAlarm_left_bottom_y = 10000
motionAlarm_right_bottom_x = 10000
motionAlarm_right_bottom_y = 10000
motionAlarm_right_up_x = 10000
motionAlarm_right_up_y = 0
motionAlarm_update_interval = 3 #default:0 means 1fps, only update if(frame_idx % interval == 0)
motionAlarm_useDefaultCfgEnable = 1
motionAlarm_HorizontalRegionNum = 15
motionAlarm_VerticalRegionNum = 8
motionAlarm_Threshold_High = 2
motionAlarm_Threshold_MediumHigh = 3
motionAlarm_Threshold_Default = 5
motionAlarm_Threshold_MediumLow = 10
motionAlarm_Threshold_Low = 36

main_enable = 1
main_rtsp_id = 0 #-1:disable main rtsp
main_isp = 0
main_isp_algo_freq = 0 #ISP algorithm setting interval
main_isp_d3d_lbc_ratio = 0 #[100,400], 0:not set but use default, 100:lossless, 125:1.25x, 150:1.5x(default), 400:4x
main_isp_iqfile_bin_mode = -1 #-1:default(not use iq bin file), 0:rgb, 1:ir
main_isp_iqfile_path = "/mnt/extsd/iqpath"
main_vipp = 0
main_src_width = 1920
main_src_height = 1080
main_pixel_format = "aw_lbc_2_5x" #yu12,yv12;aw_lbc_2_5x,aw_lbc_2_0x,aw_lbc_1_5x,aw_lbc_1_0x
main_wdr_enable = 0
main_vi_buf_num = 3
main_src_frame_rate = 20 #fps
main_vi_stitch_mode = 0 # 0: DMA_STITCH_NONE, 1: DMA_STITCH_2IN1_LINEAR, 2: DMA_STITCH_HORIZONTAL, 3: DMA_STITCH_VERTICAL
main_vi_stitch_scaler_en = 0 # only DMA_STITCH_HORIZONTAL and DMA_STITCH_VERTICAL support, it must set SensorA SensorB scaler width and height after scaler
main_vi_stitch_sorA_scaler_width = 0
main_vi_stitch_sorA_scaler_height = 0
main_vi_stitch_sorB_scaler_width = 0
main_vi_stitch_sorB_scaler_height = 0
main_viChn = 0
main_venc_chn = 0
main_encode_type = "H.265"
main_encode_width = 1920 #1280x720->720p, 1920x1080->1080p, 2304x1296->3M, 2560×1440->2k, 3840x2160->4k, 7680x4320->8k
main_encode_height = 1080
main_encode_frame_rate = 20 #fps
main_encode_bitrate = 819200 #5M:5242880, 2.5M:2621440, 2M:2097152, 1.5M:1572864, 1M:1048576, 0.5M:524288, 0.25M:262144
main_online_en = 1
main_online_share_buf_num = 1
main_encpp_enable = 1
main_ve_ref_frame_lbc_mode = 16 #0:default(1.5x), 1:1.5x, 2:2.0x, 3:2.5x, 4:no lossy, 16:2.3x
main_key_frame_interval = 60
main_file_path = #"/mnt/extsd/mainStream" #if no path is specified, it will not be saved.
main_save_one_file_duration = 60 #unit:s, 0:Infinite duration.
main_save_max_file_cnt = 10
main_draw_osd_text = "main stream"
main_vi_sync_ctrl_enable = 0 #0:disable bind sm_sync(default), 1:enable bind sm_sync
main_vi_mirror = 0
main_vi_flip = 0

main_isp_test_enable = 0
main_isp_test_interval_ms = 2000
main_detect_mipi_desk_en = 0
main_detect_mipi_interv_ms = 1000
main_detect_mipi_channel = 0 # MIPI0/MIPIA: 0, MIPI1/MIPIB: 1

main_venc_recreate_enable = 0
main_venc_recreate_loop_cnt = -1 # loop count, -1:infinite
main_venc_recreate_interval = 10 #unit:s
main_venc_recreate_encoder = "H.265"
main_venc_recreate_framerate = 15
main_venc_recreate_bitrate = 1048576
main_venc_recreate_dst_width = 1280
main_venc_recreate_dst_height = 720
main_venc_recreate_key_frame_interval = 30

main_isp_tdm_raw_process_type = -1 #-1:disable, 0:dump 8bit, 1:dump 10bit, 2:dump 8bit for tools, 3:dump 10bit for tools, 4:send 8bit, 5:send 10bit
main_isp_tdm_raw_width = 1280
main_isp_tdm_raw_height = 720
main_isp_tdm_raw_rxbuf_num = 5
main_isp_tdm_raw_process_frame_cnt_min = 0
main_isp_tdm_raw_process_frame_cnt_max = 5
main_isp_tdm_raw_file_path = "/mnt/extsd/tdm_raw.bin"

main_offline_raw_simulate_type = -1 #-1:disable, 0:after reaching the end, start over from the beginning, 1: after reaching the end, read backwards.
main_offline_raw_type = 43 #39:BGGR8, 40:GBRG8, 41:GRBG8, 42:RGGB8, 43:BGGR10, 44:GBRG10, 45:GRBG10, 46:RGGB10, 47:BGGR12, 48:GBRG12, 49:GRBG12, 50:RGGB12
main_offline_raw_simulate_cnt_start = 0
main_offline_raw_simulate_cnt_end = 19
main_offline_raw_file_path = "/mnt/extsd/test.bin"

main_aiisp_enable = 0
main_aiisp_tdm_isp_mode = 2
main_aiisp_switch = 1
main_aiisp_offset = 0
main_aiisp_mode = 0
main_aiisp_cfg_path = "/mnt/extsd/sc235hai"

main_2nd_enable = 1
main_2nd_vipp = 4
main_2nd_src_width = 640
main_2nd_src_height = 480
main_2nd_pixel_format = "aw_lbc_2_5x"
main_2nd_vi_buf_num = 3
main_2nd_src_frame_rate = 20
main_2nd_vi_stitch_mode = 0 # 0: DMA_STITCH_NONE, 1: DMA_STITCH_2IN1_LINEAR, 2: DMA_STITCH_HORIZONTAL, 3: DMA_STITCH_VERTICAL
main_2nd_vi_stitch_scaler_en = 0 # only DMA_STITCH_HORIZONTAL and DMA_STITCH_VERTICAL support, it must set SensorA SensorB scaler width and height after scaler
main_2nd_vi_stitch_sorA_scaler_width = 0
main_2nd_vi_stitch_sorA_scaler_height = 0
main_2nd_vi_stitch_sorB_scaler_width = 0
main_2nd_vi_stitch_sorB_scaler_height = 0
main_2nd_viChn = 0
main_2nd_venc_chn = 4
main_2nd_encode_type = "H.265"
main_2nd_encode_width = 640
main_2nd_encode_height = 480
main_2nd_encode_frame_rate = 20
main_2nd_encode_bitrate = 262144
main_2nd_online_en = 0
main_2nd_online_share_buf_num = 2
main_2nd_encpp_enable = 1
main_2nd_ve_ref_frame_lbc_mode = 16
main_2nd_key_frame_interval = 60
main_2nd_file_path = #"/mnt/extsd/main2ndStream"
main_2nd_save_one_file_duration = 60
main_2nd_save_max_file_cnt = 10

main_2nd_take_picture = 1
main_2nd_take_picture_online = 0
main_2nd_take_picture_viChn = 1
main_2nd_take_picture_venc_chn = 8
main_2nd_take_picture_interval = 10 #unit:s
main_2nd_take_picture_file = "/mnt/extsd/main_2nd_pic"
main_2nd_take_picture_file_cnt = 10
main_2nd_take_picture_only_capture_yuv = 0

main_3rd_enable = 0
main_3rd_vipp = 8
main_3rd_viChn = 0
main_3rd_src_width = 352
main_3rd_src_height = 224
main_3rd_pixel_format = "rgb888"
main_3rd_vi_buf_num = 3
main_3rd_src_frame_rate = 15
main_3rd_vi_stitch_mode = 0 # 0: DMA_STITCH_NONE, 1: DMA_STITCH_2IN1_LINEAR, 2: DMA_STITCH_HORIZONTAL, 3: DMA_STITCH_VERTICAL
main_3rd_vi_stitch_scaler_en = 0 # only DMA_STITCH_HORIZONTAL and DMA_STITCH_VERTICAL support, it must set SensorA SensorB scaler width and height after scaler
main_3rd_vi_stitch_sorA_scaler_width = 0
main_3rd_vi_stitch_sorA_scaler_height = 0
main_3rd_vi_stitch_sorB_scaler_width = 0
main_3rd_vi_stitch_sorB_scaler_height = 0
main_3rd_pdet_input_width = 352
main_3rd_pdet_input_height = 224
main_3rd_pdet_conf_thres = 0.3
main_3rd_pdet_run_device = "npu"
main_3rd_pdet_model_type = 1
main_3rd_pdet_model_pathname = "/mnt/extsd/person_detection_352x224_v4.3.1_rlion_ipu"
main_3rd_pdet_run_interval = 3 #unit:fps, default: 1frame/s

sub_enable = 0
sub_rtsp_id = 1 #-1:disable sub rtsp
sub_isp = 1
sub_isp_algo_freq = 0 #ISP algorithm setting interval
sub_isp_d3d_lbc_ratio = 0 #[100,400], 0:not set but use default, 100:lossless, 125:1.25x, 150:1.5x(default), 400:4x
sub_isp_iqfile_bin_mode = -1 #-1:default(not use iq bin file), 0:rgb, 1:ir
sub_isp_iqfile_path = "/mnt/extsd/iqpath"
sub_vipp = 1
sub_src_width = 1920
sub_src_height = 1080
sub_pixel_format = "aw_lbc_2_5x" #yu12,yv12;aw_lbc_2_5x,aw_lbc_2_0x,aw_lbc_1_5x,aw_lbc_1_0x
sub_wdr_enable = 0
sub_vi_buf_num = 3
sub_src_frame_rate = 15 #fps
sub_vi_stitch_mode = 0 # 0: DMA_STITCH_NONE, 1: DMA_STITCH_2IN1_LINNER, 2: DMA_STITCH_HORIZONTAL, 3: DMA_STITCH_VERTICAL
sub_vi_stitch_scaler_en = 0 # only DMA_STITCH_HORIZONTAL and DMA_STITCH_VERTICAL support, it must set SensorA SensorB scaler width and height after scaler
sub_vi_stitch_sorA_scaler_width = 0
sub_vi_stitch_sorA_scaler_height = 0
sub_vi_stitch_sorB_scaler_width = 0
sub_vi_stitch_sorB_scaler_height = 0
sub_viChn = 0
sub_venc_chn = 1
sub_encode_type = "H.265"
sub_encode_width = 1920 #1280x720->720p, 1920x1080->1080p, 2304x1296->3M, 2560×1440->2k, 3840x2160->4k, 7680x4320->8k
sub_encode_height = 1080
sub_encode_frame_rate = 15 #fps
sub_encode_bitrate = 819200 #5M:5242880, 2.5M:2621440, 2M:2097152, 1.5M:1572864, 1M:1048576, 0.5M:524288, 0.25M:262144
sub_online_en = 1
sub_online_share_buf_num = 1
sub_encpp_enable = 1
sub_ve_ref_frame_lbc_mode = 16 #0:default(1.5x), 1:1.5x, 2:2.0x, 3:2.5x, 4:no lossy, 16:2.3x
sub_key_frame_interval = 60
sub_file_path = "/mnt/extsd/subStream" #if no path is specified, it will not be saved.
sub_save_one_file_duration = 60 #unit:s, 0:Infinite duration.
sub_save_max_file_cnt = 10
sub_draw_osd_text = "sub stream"
sub_vi_mirror = 0
sub_vi_flip = 0

sub_venc_recreate_enable = 0
sub_venc_recreate_loop_cnt = -1 # loop count, -1:infinite
sub_venc_recreate_interval = 10 #unit:s
sub_venc_recreate_encoder = "H.265"
sub_venc_recreate_framerate = 15
sub_venc_recreate_bitrate = 1048576
sub_venc_recreate_dst_width = 1280
sub_venc_recreate_dst_height = 720
sub_venc_recreate_key_frame_interval = 30

sub_isp_tdm_raw_process_type = -1 #-1:disable, 0:dump 8bit, 1:dump 10bit, 2:dump 8bit for tools, 3:dump 10bit for tools, 4:send 8bit, 5:send 10bit
sub_isp_tdm_raw_width = 1280
sub_isp_tdm_raw_height = 720
sub_isp_tdm_raw_rxbuf_num = 5
sub_isp_tdm_raw_process_frame_cnt_min = 0
sub_isp_tdm_raw_process_frame_cnt_max = 5
sub_isp_tdm_raw_file_path = "/mnt/extsd/tdm_raw.bin"

sub_aiisp_enable = 0
sub_aiisp_tdm_isp_mode = 2
sub_aiisp_switch = 1
sub_aiisp_offset = 0
sub_aiisp_mode = 0
sub_aiisp_cfg_path = "/mnt/extsd/sc235hai"

sub_2nd_enable = 0
sub_2nd_vipp = 5
sub_2nd_src_width = 640
sub_2nd_src_height = 480
sub_2nd_pixel_format = "aw_lbc_2_5x"
sub_2nd_vi_buf_num = 3
sub_2nd_src_frame_rate = 15
sub_2nd_vi_stitch_mode = 0 # 0: DMA_STITCH_NONE, 1: DMA_STITCH_2IN1_LINEAR, 2: DMA_STITCH_HORIZONTAL, 3: DMA_STITCH_VERTICAL
sub_2nd_vi_stitch_scaler_en = 0 # only DMA_STITCH_HORIZONTAL and DMA_STITCH_VERTICAL support, it must set SensorA SensorB scaler width and height after scaler
sub_2nd_vi_stitch_sorA_scaler_width = 0
sub_2nd_vi_stitch_sorA_scaler_height = 0
sub_2nd_vi_stitch_sorB_scaler_width = 0
sub_2nd_vi_stitch_sorB_scaler_height = 0
sub_2nd_viChn = 0
sub_2nd_venc_chn = 5
sub_2nd_encode_type = "H.265"
sub_2nd_encode_width = 640
sub_2nd_encode_height = 480
sub_2nd_encode_frame_rate = 15
sub_2nd_encode_bitrate = 262144
sub_2nd_online_en = 0
sub_2nd_online_share_buf_num = 2
sub_2nd_encpp_enable = 1
sub_2nd_ve_ref_frame_lbc_mode = 16
sub_2nd_key_frame_interval = 60
sub_2nd_file_path = #"/mnt/extsd/sub2ndStream"
sub_2nd_save_one_file_duration = 60
sub_2nd_save_max_file_cnt = 10

sub_2nd_take_picture = 0
sub_2nd_take_picture_online = 0
sub_2nd_take_picture_viChn = 1
sub_2nd_take_picture_venc_chn = 9
sub_2nd_take_picture_interval = 10 #unit:s
sub_2nd_take_picture_file = "/mnt/extsd/sub_2nd_pic"
sub_2nd_take_picture_file_cnt = 10
sub_2nd_take_picture_only_capture_yuv = 0

sub_3rd_enable = 0
sub_3rd_vipp = 9
sub_3rd_viChn = 0
sub_3rd_src_width = 352
sub_3rd_src_height = 224
sub_3rd_pixel_format = "rgb888"
sub_3rd_vi_buf_num = 3
sub_3rd_src_frame_rate = 15
sub_3rd_vi_stitch_mode = 0 # 0: DMA_STITCH_NONE, 1: DMA_STITCH_2IN1_LINEAR, 2: DMA_STITCH_HORIZONTAL, 3: DMA_STITCH_VERTICAL
sub_3rd_vi_stitch_scaler_en = 0 # only DMA_STITCH_HORIZONTAL and DMA_STITCH_VERTICAL support, it must set SensorA SensorB scaler width and height after scaler
sub_3rd_vi_stitch_sorA_scaler_width = 0
sub_3rd_vi_stitch_sorA_scaler_height = 0
sub_3rd_vi_stitch_sorB_scaler_width = 0
sub_3rd_vi_stitch_sorB_scaler_height = 0
sub_3rd_pdet_input_width = 352
sub_3rd_pdet_input_height = 224
sub_3rd_pdet_conf_thres = 0.3
sub_3rd_pdet_run_device = "npu"
sub_3rd_pdet_model_type = 1
sub_3rd_pdet_model_pathname = "/mnt/extsd/person_detection_352x224_v4.3.1_rlion_ipu"
sub_3rd_pdet_run_interval = 3 #unit:fps, default: 1frame/s

three_enable = 0
three_rtsp_id = 2 #-1:disable three rtsp
three_isp = 2
three_isp_algo_freq = 0 #ISP algorithm setting interval
three_isp_d3d_lbc_ratio = 0 #[100,400], 0:not set but use default, 100:lossless, 125:1.25x, 150:1.5x(default), 400:4x
three_isp_iqfile_bin_mode = -1 #-1:default(not use iq bin file), 0:rgb, 1:ir
three_isp_iqfile_path = "/mnt/extsd/iqpath"
three_vipp = 2
three_src_width = 1920
three_src_height = 1080
three_pixel_format = "aw_lbc_2_5x" #yu12,yv12;aw_lbc_2_5x,aw_lbc_2_0x,aw_lbc_1_5x,aw_lbc_1_0x
three_wdr_enable = 0
three_vi_buf_num = 3
three_src_frame_rate = 15 #fps
three_viChn = 0
three_venc_chn = 2
three_encode_type = "H.265"
three_encode_width = 1920 #1280x720->720p, 1920x1080->1080p, 2304x1296->3M, 2560×1440->2k, 3840x2160->4k, 7680x4320->8k
three_encode_height = 1080
three_encode_frame_rate = 15 #fps
three_encode_bitrate = 819200 #5M:5242880, 2.5M:2621440, 2M:2097152, 1.5M:1572864, 1M:1048576, 0.5M:524288, 0.25M:262144
three_online_en = 1
three_online_share_buf_num = 1
three_encpp_enable = 1
three_ve_ref_frame_lbc_mode = 16 #0:default(1.5x), 1:1.5x, 2:2.0x, 3:2.5x, 4:no lossy, 16:2.3x
three_key_frame_interval = 60
three_file_path = "/mnt/extsd/threeStream" #if no path is specified, it will not be saved.
three_save_one_file_duration = 60 #unit:s, 0:Infinite duration.
three_save_max_file_cnt = 10
three_draw_osd_text = "three stream"
three_vi_mirror = 0
three_vi_flip = 0

three_venc_recreate_enable = 0
three_venc_recreate_loop_cnt = -1 # loop count, -1:infinite
three_venc_recreate_interval = 10 #unit:s
three_venc_recreate_encoder = "H.265"
three_venc_recreate_framerate = 15
three_venc_recreate_bitrate = 1048576
three_venc_recreate_dst_width = 1280
three_venc_recreate_dst_height = 720
three_venc_recreate_key_frame_interval = 30

three_isp_tdm_raw_process_type = -1 #-1:disable, 0:dump 8bit, 1:dump 10bit, 2:dump 8bit for tools, 3:dump 10bit for tools, 4:send 8bit, 5:send 10bit
three_isp_tdm_raw_width = 1280
three_isp_tdm_raw_height = 720
three_isp_tdm_raw_rxbuf_num = 5
three_isp_tdm_raw_process_frame_cnt_min = 0
three_isp_tdm_raw_process_frame_cnt_max = 5
three_isp_tdm_raw_file_path = "/mnt/extsd/tdm_raw.bin"

three_aiisp_enable = 0
three_aiisp_tdm_isp_mode = 2
three_aiisp_switch = 1
three_aiisp_offset = 0
three_aiisp_mode = 0
three_aiisp_cfg_path = "/mnt/extsd/sc235hai"

three_2nd_enable = 0
three_2nd_vipp = 6
three_2nd_src_width = 640
three_2nd_src_height = 480
three_2nd_pixel_format = "aw_lbc_2_5x"
three_2nd_vi_buf_num = 3
three_2nd_src_frame_rate = 15
three_2nd_viChn = 0
three_2nd_venc_chn = 6
three_2nd_encode_type = "H.265"
three_2nd_encode_width = 640
three_2nd_encode_height = 480
three_2nd_encode_frame_rate = 15
three_2nd_encode_bitrate = 262144
three_2nd_online_en = 0
three_2nd_online_share_buf_num = 2
three_2nd_encpp_enable = 1
three_2nd_ve_ref_frame_lbc_mode = 16
three_2nd_key_frame_interval = 60
three_2nd_file_path = #"/mnt/extsd/three2ndStream"
three_2nd_save_one_file_duration = 60
three_2nd_save_max_file_cnt = 10

three_2nd_take_picture = 0
three_2nd_take_picture_online = 0
three_2nd_take_picture_viChn = 1
three_2nd_take_picture_venc_chn = 10
three_2nd_take_picture_interval = 10 #unit:s
three_2nd_take_picture_file = "/mnt/extsd/three_2nd_pic"
three_2nd_take_picture_file_cnt = 10
three_2nd_take_picture_only_capture_yuv = 0

three_3rd_enable = 0
three_3rd_vipp = 10
three_3rd_viChn = 0
three_3rd_src_width = 352
three_3rd_src_height = 224
three_3rd_pixel_format = "rgb888"
three_3rd_vi_buf_num = 3
three_3rd_src_frame_rate = 15
three_3rd_pdet_input_width = 352
three_3rd_pdet_input_height = 224
three_3rd_pdet_conf_thres = 0.3
three_3rd_pdet_run_device = "npu"
three_3rd_pdet_model_type = 1
three_3rd_pdet_model_pathname = "/mnt/extsd/person_detection_352x224_v4.3.1_rlion_ipu"
three_3rd_pdet_run_interval = 3 #unit:fps, default: 1frame/s

four_enable = 0
four_rtsp_id = 3 #-1:disable four rtsp
four_isp = 3
four_isp_algo_freq = 0 #ISP algorithm setting interval
four_isp_d3d_lbc_ratio = 0 #[100,400], 0:not set but use default, 100:lossless, 125:1.25x, 150:1.5x(default), 400:4x
four_isp_iqfile_bin_mode = -1 #-1:default(not use iq bin file), 0:rgb, 1:ir
four_isp_iqfile_path = "/mnt/extsd/iqpath"
four_vipp = 3
four_src_width = 1920
four_src_height = 1080
four_pixel_format = "aw_lbc_2_5x" #yu12,yv12;aw_lbc_2_5x,aw_lbc_2_0x,aw_lbc_1_5x,aw_lbc_1_0x
four_wdr_enable = 0
four_vi_buf_num = 3
four_src_frame_rate = 15 #fps
four_viChn = 0
four_venc_chn = 3
four_encode_type = "H.265"
four_encode_width = 1920 #1280x720->720p, 1920x1080->1080p, 2304x1296->3M, 2560×1440->2k, 3840x2160->4k, 7680x4320->8k
four_encode_height = 1080
four_encode_frame_rate = 15 #fps
four_encode_bitrate = 819200 #5M:5242880, 2.5M:2621440, 2M:2097152, 1.5M:1572864, 1M:1048576, 0.5M:524288, 0.25M:262144
four_online_en = 1
four_online_share_buf_num = 1
four_encpp_enable = 1
four_ve_ref_frame_lbc_mode = 16 #0:default(1.5x), 1:1.5x, 2:2.0x, 3:2.5x, 4:no lossy, 16:2.3x
four_key_frame_interval = 60
four_file_path = "/mnt/extsd/fourStream" #if no path is specified, it will not be saved.
four_save_one_file_duration = 60 #unit:s, 0:Infinite duration.
four_save_max_file_cnt = 10
four_draw_osd_text = "four stream"
four_vi_mirror = 0
four_vi_flip = 0

four_venc_recreate_enable = 0
four_venc_recreate_loop_cnt = -1 # loop count, -1:infinite
four_venc_recreate_interval = 10 #unit:s
four_venc_recreate_encoder = "H.265"
four_venc_recreate_framerate = 15
four_venc_recreate_bitrate = 1048576
four_venc_recreate_dst_width = 1280
four_venc_recreate_dst_height = 720
four_venc_recreate_key_frame_interval = 30

four_isp_tdm_raw_process_type = -1 #-1:disable, 0:dump 8bit, 1:dump 10bit, 2:dump 8bit for tools, 3:dump 10bit for tools, 4:send 8bit, 5:send 10bit
four_isp_tdm_raw_width = 1280
four_isp_tdm_raw_height = 720
four_isp_tdm_raw_rxbuf_num = 5
four_isp_tdm_raw_process_frame_cnt_min = 0
four_isp_tdm_raw_process_frame_cnt_max = 5
four_isp_tdm_raw_file_path = "/mnt/extsd/tdm_raw.bin"

four_aiisp_enable = 0
four_aiisp_tdm_isp_mode = 2
four_aiisp_switch = 1
four_aiisp_offset = 0
four_aiisp_mode = 0
four_aiisp_cfg_path = "/mnt/extsd/sc235hai"

four_2nd_enable = 0
four_2nd_vipp = 7
four_2nd_src_width = 640
four_2nd_src_height = 480
four_2nd_pixel_format = "aw_lbc_2_5x"
four_2nd_vi_buf_num = 3
four_2nd_src_frame_rate = 15
four_2nd_viChn = 0
four_2nd_venc_chn = 7
four_2nd_encode_type = "H.265"
four_2nd_encode_width = 640
four_2nd_encode_height = 480
four_2nd_encode_frame_rate = 15
four_2nd_encode_bitrate = 262144
four_2nd_online_en = 0
four_2nd_online_share_buf_num = 2
four_2nd_encpp_enable = 1
four_2nd_ve_ref_frame_lbc_mode = 16
four_2nd_key_frame_interval = 60
four_2nd_file_path = #"/mnt/extsd/four2ndStream"
four_2nd_save_one_file_duration = 60
four_2nd_save_max_file_cnt = 10

four_2nd_take_picture = 0
four_2nd_take_picture_online = 0
four_2nd_take_picture_viChn = 1
four_2nd_take_picture_venc_chn = 11
four_2nd_take_picture_interval = 10 #unit:s
four_2nd_take_picture_file = "/mnt/extsd/four_2nd_pic"
four_2nd_take_picture_file_cnt = 10
four_2nd_take_picture_only_capture_yuv = 0

four_3rd_enable = 0
four_3rd_vipp = 11
four_3rd_viChn = 0
four_3rd_src_width = 352
four_3rd_src_height = 224
four_3rd_pixel_format = "rgb888"
four_3rd_vi_buf_num = 3
four_3rd_src_frame_rate = 15
four_3rd_pdet_input_width = 352
four_3rd_pdet_input_height = 224
four_3rd_pdet_conf_thres = 0.3
four_3rd_pdet_run_device = "npu"
four_3rd_pdet_model_type = 1
four_3rd_pdet_model_pathname = "/mnt/extsd/person_detection_352x224_v4.3.1_rlion_ipu"
four_3rd_pdet_run_interval = 3 #unit:fps, default: 1frame/s