-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
65 lines (58 loc) · 2.87 KB
/
config.example.yaml
File metadata and controls
65 lines (58 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# RTSP Recorder 設定檔
# 複製此檔案為 config.yaml 並修改設定
# ============================================================================
# RTSP 設定
# ============================================================================
rtsp:
streams:
- name: "cam1"
url: "rtsp://admin:password@192.168.1.100:554/ch1"
# resolution: "1920x1080" # 可選:此串流的輸出解析度(留空用全域設定)
- name: "cam2"
url: "rtsp://admin:password@192.168.1.100:554/ch2"
resolution: "1280x720" # 此串流強制縮放至 720p
# 可自由新增更多串流:
# - name: "cam3"
# url: "rtsp://10.8.60.55:8553/cam3"
# resolution: "original" # 保持原始解析度
segment_duration: 600 # 每段錄製時長(秒)
# ============================================================================
# 排程設定
# ============================================================================
schedule:
record_start_hour: 8 # 錄製開始時間(24 小時制)
record_end_hour: 1 # 錄製結束時間
# ============================================================================
# 輸出設定
# ============================================================================
output:
dir: "~/rtsp-recorder/videos" # 輸出目錄
resolution: "1920x1080" # 全域預設解析度(個別串流未設定時使用)
# ============================================================================
# GCS 上傳設定
# ============================================================================
gcs:
bucket: "syncai-rtsp-recordings"
prefix: "" # 前綴路徑,會自動加上日期 YYYY/MM/DD
credentials: "gcs-credentials.json" # 相對於程式目錄,或絕對路徑
# ============================================================================
# 網路流量設定(避免影響店家網路)
# ============================================================================
network:
interface: "auto" # 網卡名稱:auto=自動偵測 或指定如 eth0, enp0s3
idle_threshold_mbps: 8 # 低於此值視為閒置,才會背景上傳
# ============================================================================
# 本地保留設定
# ============================================================================
retention:
max_hours: 6 # 已上傳檔案最多保留幾小時(供異常回滾)
# ============================================================================
# 日誌設定
# ============================================================================
log:
dir: "~/rtsp-recorder/videos/logs" # 日誌目錄
rotation: "time" # 輪轉方式:"time"=按天 或 "size"=按大小
retention_days: 30 # 保留天數(rotation=time 時生效)
max_size_mb: 10 # 單檔最大 MB(rotation=size 時生效)
backup_count: 7 # 保留數量(rotation=size 時生效)
to_file: true # 是否寫入檔案