| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- # ============================================================
- # 通过海康 ISAPI 批量配置主码流/子码流 示例
- #
- # 特点:
- # 1) 只需填写每台相机的 IP / 账号 / 密码 / 登录通道号,
- # 程序自动拼出 主码流(Channels/101) / 子码流(Channels/102)
- # RTSP URL,无需手写一长串 URL。
- # 2) 启动时通过 ISAPI 读取每台相机编码参数(分辨率/码率/帧率),
- # 写入故障日志。
- # 3) 可选:通过 [isapi_write] 把指定通道的分辨率/帧率/码率写回相机。
- #
- # 注意:ISAPI 走 HTTP(默认80),RTSP 走 554;两者端口分开配。
- # 运行: ./build/rtsp_multi_view -c channels_isapi.conf
- # ============================================================
- [output]
- 1920 1080
- letterbox = 0 ; 少黑边:4:3 画面轻微拉伸铺满各自格子
- grid_lines = 1 ; 画面之间画分隔线
- # ------------------------------------------------------------
- # [camera_list] 批量相机清单(自动生成主/子码流 URL)
- # 格式: <id> <ip> <user> <pass> [login_chan] [rtsp_port] [http_port]
- # id : 布局/流 里用的编号(0-7)
- # ip : 相机 IP 或域名
- # user/pass : 相机登录账号密码
- # login_chan : 海康登录通道号,默认 1(可留空)
- # rtsp_port : RTSP 端口,默认 554
- # http_port : ISAPI HTTP 端口,默认 80
- #
- # 生成规则(海康固定协议):
- # 子码流 = rtsp://user:pass@ip:rtsp_port/Streaming/Channels/{chan*100+2}
- # 主码流 = rtsp://user:pass@ip:rtsp_port/Streaming/Channels/{chan*100+1}
- #
- # 一旦配置了 [camera_list],它会**取代** [streams] 和 [main_streams];
- # 未配置时仍按旧的 [streams]/[main_streams] 方式。
- # ------------------------------------------------------------
- [camera_list]
- 0 192.168.1.121 admin hd135792468 1 554 80
- 1 192.168.1.122 admin hd135792468 1 554 80
- 2 192.168.1.123 admin hd135792468 1 554 80
- 3 192.168.1.124 admin hd135792468 1 554 80
- 4 192.168.1.125 admin hd135792468 1 554 80
- 5 192.168.1.126 admin hd135792468 1 554 80
- 6 192.168.1.129 admin hd135792468 1 554 80
- 7 192.168.1.130 admin hd135792468 1 554 80
- # ------------------------------------------------------------
- # [isapi_write] 可选:启动时通过 ISAPI 把指定通道改成给定规格。
- # 格式: <id> <main|sub> <width> <height> <fps> <bitrate_kbps>
- # - 只改你填的字段;width/height 必填,fps/bitrate 填 0 表示不改
- # - fps 用"帧率"(程序会自动 x100 换算为海康的 maxFrameRate)
- # - 危险:会真实修改相机!默认不启用,需要时去掉下面的注释。
- # 示例(把相机0主码流改成 1280x720 @ 10fps 2048kbps):
- # 0 main 1280 720 10 2048
- # ------------------------------------------------------------
- [isapi_write]
- 0 sub 640 360 25 2048
- 1 sub 640 360 25 2048
- 2 sub 640 360 25 2048
- 3 sub 640 360 25 2048
- 4 sub 640 360 25 2048
- 5 sub 640 360 25 2048
- 6 sub 640 360 25 2048
- 7 sub 640 360 25 2048
- [layout]
- 0 1 2
- 3 4 5
- 6 7 x
- [layout0]
- 0 0 0 0 3
- 0 0 0 0 4
- 0 0 0 0 5
- 0 0 0 0 6
- 0 0 0 0 7
- [layout1]
- 1 1 1 1 3
- 1 1 1 1 4
- 1 1 1 1 5
- 1 1 1 1 6
- 1 1 1 1 7
- [layout2]
- 2 2 2 2 3
- 2 2 2 2 4
- 2 2 2 2 5
- 2 2 2 2 6
- 2 2 2 2 7
- [layout3]
- 1 1 2 2 3
- 1 1 2 2 4
- 1 1 2 2 5
- x x x x 6
- x x x x 7
- [layout4]
- 0 0 1 1 3
- 0 0 1 1 4
- 2 2 x x 5
- 2 2 x x 6
- x x x x 7
- # ---------- 标题栏 ----------
- [title]
- enable = 1
- type = overlay
- height = 80
- text = 法兰泰克 · 多路视频随动监控
- logo = fltk.png
- logo_pad = 8
- opacity = 200
- font = /usr/share/fonts/truetype/wqy/wqy-microhei.ttc
- font_size = 48
- color = 0xFFFFFF
- # ---------- 故障日志 ----------
- [log]
- file = flog_isapi.txt
- rotate_ms = 3600000
- max_bytes = 1048576
- [plc]
- enable = 1
- ip = 192.168.1.240
- port = 102
- area = db ; m | i | q | db
- db = 1000 ; 仅 area=db 时有效
- read_start = 0 ; 轮询块的起始字节
- read_len = 16 ; 每次轮询读取的字节数
- poll_ms = 100
- reconnect_ms = 3000
- tsap_local = 0x0000
- tsap_remote = 0x0000
- # ---------- PLC 位 -> 布局切换规则 ----------
- [plc_rules]
- 0 : 1000.6.6,1000.6.7
- 1 : 1000.8.4,1000.8.5
- 2 : 1000.8.6,1000.8.7
- 3 : 1000.6.6,1000.6.7;1000.8.4,1000.8.5
- 4 : 1000.6.6,1000.8.4,1000.8.5;1000.8.6,1000.8.7
|