104 lines
2.6 KiB
YAML
104 lines
2.6 KiB
YAML
############################################
|
|
# GENERAL
|
|
############################################
|
|
logLevel: info
|
|
|
|
############################################
|
|
# Bật tắt API
|
|
############################################
|
|
api: true
|
|
apiAddress: :9997
|
|
authMethod: internal
|
|
authInternalUsers:
|
|
- user: dashboard
|
|
pass: password
|
|
ips: ['127.0.0.1', '::1', '192.168.88.0/24', '172.16.0.0/12']
|
|
permissions:
|
|
- action: api
|
|
|
|
- user: any
|
|
ips: ['127.0.0.1', '::1', '192.168.88.0/24', '172.16.0.0/12']
|
|
permissions:
|
|
- action: read
|
|
|
|
############################################
|
|
# RTSP
|
|
############################################
|
|
rtsp: true
|
|
rtspAddress: :8554
|
|
rtspTransports: [tcp] # tối ưu cho IP camera
|
|
|
|
############################################
|
|
# HLS
|
|
############################################
|
|
hls: false
|
|
hlsAddress: :8888
|
|
hlsVariant: lowLatency
|
|
hlsSegmentDuration: 1s
|
|
hlsPartDuration: 200ms
|
|
|
|
############################################
|
|
# WEBRTC
|
|
############################################
|
|
webrtc: true
|
|
webrtcAddress: :8889
|
|
webrtcAllowOrigin: '*'
|
|
webrtcLocalUDPAddress: :8189
|
|
webrtcLocalTCPAddress: :8189
|
|
|
|
webrtcAdditionalHosts:
|
|
- 192.168.88.5
|
|
- ipcopd.ttcorp.net
|
|
|
|
############################################
|
|
# PLAYBACK (optional - có thể bật sau)
|
|
############################################
|
|
playback: false
|
|
|
|
############################################
|
|
# PATH DEFAULTS (QUAN TRỌNG NHẤT)
|
|
############################################
|
|
pathDefaults:
|
|
|
|
##########################################
|
|
# SOURCE
|
|
##########################################
|
|
sourceOnDemand: false
|
|
|
|
##########################################
|
|
# RTSP SOURCE SETTINGS
|
|
##########################################
|
|
rtspTransport: tcp
|
|
|
|
##########################################
|
|
# RECORDING (NEW STRUCTURE)
|
|
##########################################
|
|
record: true
|
|
recordPath: /recordings/%path/%Y-%m-%d_%H-%M-%S-%f
|
|
recordFormat: fmp4
|
|
recordPartDuration: 1s
|
|
recordSegmentDuration: 5m
|
|
recordDeleteAfter: 3600s # 0s là không tự động xóa, đặt thời gian xóa nếu ổ cứng có giới hạn
|
|
|
|
############################################
|
|
# CAMERA PATHS
|
|
############################################
|
|
|
|
paths:
|
|
|
|
cam1:
|
|
source: rtsp://admin:password@192.168.88.126:554/h264_stream
|
|
|
|
cam2:
|
|
source: rtsp://admin:password@192.168.88.127:554/h264_stream
|
|
|
|
cam3:
|
|
source: rtsp://admin:password@192.168.88.76:554/h264_stream
|
|
|
|
cam4:
|
|
source: rtsp://admin:password@192.168.88.179:554/h264_stream
|
|
|
|
# Nếu có cam thứ 5 thì thêm tương tự
|
|
# cam5:
|
|
# source: rtsp://...
|