-
Notifications
You must be signed in to change notification settings - Fork 32
/
config.yaml
146 lines (132 loc) · 4.79 KB
/
config.yaml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# Optional HTTP server configuration and authentication.
http:
port: 8080
# username: !env_var "USERNAME john"
# password: !env_var "PASSWORD qwerty"
# Optional MQTT client configuration and authentication.
mqtt:
host: localhost
# port: 1883
# username: !secret mqtt_username
# password: !secret mqtt_password
# Default FFmpeg arguments for decoding video stream before detection and encoding back afterwards.
# Optional, can be overwritten per camera.
ffmpeg:
decoder:
- -hide_banner
- -loglevel
- error
- -nostdin
- -hwaccel # These options enable hardware acceleration of
- vaapi # video de/encoding. You need to check what methods
- -hwaccel_device # (if any) are supported by running the command:
- /dev/dri/renderD128 # ffmpeg -hwaccels
- -hwaccel_output_format # Then refer to the documentation of the method
- yuv420p # to enable it in ffmpeg. Remove if not sure.
- -fflags
- nobuffer
- -flags
- low_delay
- -fflags
- +genpts+discardcorrupt
- -i # camera input field will follow '-i' ffmpeg argument automatically
- -f
- rawvideo
- -pix_fmt
- rgb24
encoder: # Encoder is optional, remove the entire list to disable.
- -hide_banner
- -loglevel
- error
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- -hwaccel_output_format
- yuv420p
- -f
- rawvideo
- -pix_fmt
- rgb24
- -i # detection output stream will follow '-i' ffmpeg argument automatically
- -an
- -f
- mpegts
- -vcodec
- libx264
- -pix_fmt
- yuv420p
- -vf
- "drawtext='text=%{localtime\\:%c}': x=w-tw-lh: y=h-2*lh: fontcolor=white: box=1: boxcolor=black@0.55"
# Detect the following labels of the object detection model.
# Optional, can be overwritten per camera.
detect:
- person:
area: 20 # Minimum area of the bounding box an object should have in
# order to be detected. Defaults to 10% of entire video resolution.
confidence: 60 # Confidence threshold that a detection is what it's guessed to be,
# otherwise it's ruled out. 50% if not set.
- car:
zones: [1, 3, 5] # Limit the zones on mask image, where detection is allowed.
# If not set or empty, all zones are allowed.
# Run `zones.py -m mask.png` to figure out a zone number.
- truck:
# List of cameras and their configurations.
cameras:
- porch: # Camera name
width: 640 #
height: 480 # Video feed resolution in pixels
input: !ENV "rtsp://${RTSP_USERNAME}:${RTSP_PASSWORD}@192.168.0.10:554/cam/realmonitor?channel=1&subtype=2"
mask: porch.png # Optional mask. Must be the same size as your video feed.
detect: # The values below override
- person: # detection defaults for just
- car: # this camera
- backyard: # Camera name
width: 640 #
height: 480 # Video feed resolution in pixels
input: !ENV "rtsp://${RTSP_USERNAME}:${RTSP_PASSWORD}@192.168.0.20:554/cam/realmonitor?channel=1&subtype=2"
output: !ENV "${HOME}/Videos/backyard.mp4"
ffmpeg: # These values override FFmpeg defaults
decoder: # for just # this camera
- -hide_banner
- -loglevel
- error
- -nostdin
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- -hwaccel_output_format
- yuv420p
- -i # camera input field will follow '-i' ffmpeg argument automatically
- -filter:v
- fps=fps=15
- -f
- rawvideo
- -pix_fmt
- rgb24
encoder:
- -hide_banner
- -loglevel
- error
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- -hwaccel_output_format
- yuv420p
- -f
- rawvideo
- -pix_fmt
- rgb24
- -i # detection output stream will follow '-i' ffmpeg argument automatically
- -an
- -f
- mp4
- -vcodec
- libx264
- -pix_fmt
- yuv420p
- -vf
- "drawtext='text=%{localtime\\:%c}': x=w-tw-lh: y=h-2*lh: fontcolor=white: box=1: boxcolor=black@0.55"
- -y