Skip to content

Commit a3f937b

Browse files
authored
Merge pull request #912 from roflcoopter/feature/trigger-event-recording
Rename /recordings to /event_clips
2 parents 4de04f5 + 011a665 commit a3f937b

File tree

26 files changed

+3568
-1298
lines changed

26 files changed

+3568
-1298
lines changed

docker/Dockerfile.dev

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ RUN python3 -m pip install -r requirements_test.txt \
2525
&& yes | mypy --install-types || true \
2626
&& rm -rf requirements_test.txt
2727

28-
RUN rm -r /etc/services.d/viseron
28+
RUN rm -r /etc/services.d/viseron \
29+
&& mkdir -p /config \
30+
&& mkdir -p /event_clips \
31+
&& mkdir -p /segments \
32+
&& mkdir -p /snapshots\
33+
&& mkdir -p /thumbnails
2934

3035
# Ensure at least the en_US.UTF-8 UTF-8 locale is available.
3136
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment \

docker/Dockerfile.tests

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ ADD requirements_test.txt requirements_test.txt
1010
RUN \
1111
python3 -m pip install -r requirements_test.txt
1212

13-
RUN rm -r /etc/services.d/viseron
13+
RUN rm -r /etc/services.d/viseron \
14+
&& mkdir -p /config \
15+
&& mkdir -p /event_clips \
16+
&& mkdir -p /segments \
17+
&& mkdir -p /snapshots\
18+
&& mkdir -p /thumbnails
1419

1520
COPY .coveragerc /src/
1621
COPY viseron /src/viseron/

docs/docs/documentation/configuration/recordings.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Example configuration to set retention rules for all cameras:
100100
storage:
101101
recorder:
102102
tiers:
103-
- path: / # Files will be stored in the /recordings directory
103+
- path: / # Video segments will be stored in the /segments directory
104104
events:
105105
max_age:
106106
days: 14
@@ -175,10 +175,10 @@ ffmpeg: # or any other camera component
175175
username: !secret camera_one_username
176176
password: !secret camera_one_password
177177
// highlight-start
178-
recorder:
179-
storage: # Store events for 14 days and 10gb of continuous recordings
178+
storage: # Store events for 14 days and 10gb of continuous recordings
179+
recorder:
180180
tiers:
181-
- path: / # Files will be stored in the /recordings directory
181+
- path: / # Video segments will be stored in the /segments directory
182182
events:
183183
max_age:
184184
days: 14
@@ -261,6 +261,6 @@ ffmpeg: # or any other camera component
261261

262262
This will create `.mp4` files for all event recordings, which will be stored in addition to the `.m4s` files.
263263

264-
THe `.mp4` files will be created in the `/clips` directory, unless you have set a different path in the [storage component](/components-explorer/components/storage).
264+
THe `.mp4` files will be created in the `/event_clips` directory, unless you have set a different path in the [storage component](/components-explorer/components/storage).
265265

266266
:::

docs/docs/documentation/installation.mdx

Lines changed: 66 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ You have to change the values between the brackets `{}` to match your setup.
5151

5252
```shell
5353
docker run --rm \
54-
-v {recordings path}:/recordings \
55-
-v {recordings path}:/segments \
56-
-v {recordings path}:/snapshots \
57-
-v {recordings path}:/thumbnails \
54+
-v {segments path}:/segments \
55+
-v {snapshots path}:/snapshots \
56+
-v {thumbnails path}:/thumbnails \
57+
-v {event clips path}:/event_clips \
5858
-v {config path}:/config \
5959
-v /etc/localtime:/etc/localtime:ro \
6060
-p 8888:8888 \
@@ -75,10 +75,10 @@ services:
7575
container_name: viseron
7676
shm_size: "1024mb"
7777
volumes:
78-
- {recordings path}:/recordings
79-
- {recordings path}:/segments
80-
- {recordings path}:/snapshots
81-
- {recordings path}:/thumbnails
78+
- {segments path}:/segments \
79+
- {snapshots path}:/snapshots \
80+
- {thumbnails path}:/thumbnails \
81+
- {event clips path}:/event_clips \
8282
- {config path}:/config
8383
- /etc/localtime:/etc/localtime:ro
8484
ports:
@@ -97,10 +97,10 @@ services:
9797
9898
```shell
9999
docker run --rm \
100-
-v {recordings path}:/recordings \
101-
-v {recordings path}:/segments \
102-
-v {recordings path}:/snapshots \
103-
-v {recordings path}:/thumbnails \
100+
-v {segments path}:/segments \
101+
-v {snapshots path}:/snapshots \
102+
-v {thumbnails path}:/thumbnails \
103+
-v {event clips path}:/event_clips \
104104
-v {config path}:/config \
105105
-v /etc/localtime:/etc/localtime:ro \
106106
-p 8888:8888 \
@@ -122,10 +122,10 @@ services:
122122
container_name: viseron
123123
shm_size: "1024mb"
124124
volumes:
125-
- {recordings path}:/recordings
126-
- {recordings path}:/segments
127-
- {recordings path}:/snapshots
128-
- {recordings path}:/thumbnails
125+
- {segments path}:/segments \
126+
- {snapshots path}:/snapshots \
127+
- {thumbnails path}:/thumbnails \
128+
- {event clips path}:/event_clips \
129129
- {config path}:/config
130130
- /etc/localtime:/etc/localtime:ro
131131
ports:
@@ -146,10 +146,10 @@ services:
146146
147147
```shell
148148
docker run --rm \
149-
-v {recordings path}:/recordings \
150-
-v {recordings path}:/segments \
151-
-v {recordings path}:/snapshots \
152-
-v {recordings path}:/thumbnails \
149+
-v {segments path}:/segments \
150+
-v {snapshots path}:/snapshots \
151+
-v {thumbnails path}:/thumbnails \
152+
-v {event clips path}:/event_clips \
153153
-v {config path}:/config \
154154
-v /etc/localtime:/etc/localtime:ro \
155155
-p 8888:8888 \
@@ -171,10 +171,10 @@ services:
171171
container_name: viseron
172172
shm_size: "1024mb"
173173
volumes:
174-
- {recordings path}:/recordings
175-
- {recordings path}:/segments
176-
- {recordings path}:/snapshots
177-
- {recordings path}:/thumbnails
174+
- {segments path}:/segments \
175+
- {snapshots path}:/snapshots \
176+
- {thumbnails path}:/thumbnails \
177+
- {event clips path}:/event_clips \
178178
- {config path}:/config
179179
- /etc/localtime:/etc/localtime:ro
180180
ports:
@@ -201,10 +201,10 @@ Make sure [NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-container-
201201
202202
```shell
203203
docker run --rm \
204-
-v {recordings path}:/recordings \
205-
-v {recordings path}:/segments \
206-
-v {recordings path}:/snapshots \
207-
-v {recordings path}:/thumbnails \
204+
-v {segments path}:/segments \
205+
-v {snapshots path}:/snapshots \
206+
-v {thumbnails path}:/thumbnails \
207+
-v {event clips path}:/event_clips \
208208
-v {config path}:/config \
209209
-v /etc/localtime:/etc/localtime:ro \
210210
-p 8888:8888 \
@@ -234,10 +234,10 @@ services:
234234
container_name: viseron
235235
shm_size: "1024mb"
236236
volumes:
237-
- {recordings path}:/recordings
238-
- {recordings path}:/segments
239-
- {recordings path}:/snapshots
240-
- {recordings path}:/thumbnails
237+
- {segments path}:/segments \
238+
- {snapshots path}:/snapshots \
239+
- {thumbnails path}:/thumbnails \
240+
- {event clips path}:/event_clips \
241241
- {config path}:/config
242242
- /etc/localtime:/etc/localtime:ro
243243
ports:
@@ -266,10 +266,10 @@ You can probably get around this by manually mounting all the needed devices but
266266
```shell
267267
docker run --rm \
268268
--privileged \
269-
-v {recordings path}:/recordings \
270-
-v {recordings path}:/segments \
271-
-v {recordings path}:/snapshots \
272-
-v {recordings path}:/thumbnails \
269+
-v {segments path}:/segments \
270+
-v {snapshots path}:/snapshots \
271+
-v {thumbnails path}:/thumbnails \
272+
-v {event clips path}:/event_clips \
273273
-v {config path}:/config \
274274
-v /etc/localtime:/etc/localtime:ro \
275275
-v /dev/bus/usb:/dev/bus/usb \
@@ -295,10 +295,10 @@ services:
295295
container_name: viseron
296296
shm_size: "1024mb"
297297
volumes:
298-
- {recordings path}:/recordings
299-
- {recordings path}:/segments
300-
- {recordings path}:/snapshots
301-
- {recordings path}:/thumbnails
298+
- {segments path}:/segments \
299+
- {snapshots path}:/snapshots \
300+
- {thumbnails path}:/thumbnails \
301+
- {event clips path}:/event_clips \
302302
- {config path}:/config
303303
- /etc/localtime:/etc/localtime:ro
304304
devices:
@@ -338,10 +338,10 @@ Configure a substream if you plan on running Viseron on an RPi.
338338
```shell
339339
docker run --rm \
340340
--privileged \
341-
-v {recordings path}:/recordings \
342-
-v {recordings path}:/segments \
343-
-v {recordings path}:/snapshots \
344-
-v {recordings path}:/thumbnails \
341+
-v {segments path}:/segments \
342+
-v {snapshots path}:/snapshots \
343+
-v {thumbnails path}:/thumbnails \
344+
-v {event clips path}:/event_clips \
345345
-v {config path}:/config \
346346
-v /etc/localtime:/etc/localtime:ro \
347347
-v /opt/vc/lib:/opt/vc/lib \
@@ -365,10 +365,10 @@ services:
365365
container_name: viseron
366366
shm_size: "1024mb"
367367
volumes:
368-
- {recordings path}:/recordings
369-
- {recordings path}:/segments
370-
- {recordings path}:/snapshots
371-
- {recordings path}:/thumbnails
368+
- {segments path}:/segments \
369+
- {snapshots path}:/snapshots \
370+
- {thumbnails path}:/thumbnails \
371+
- {event clips path}:/event_clips \
372372
- {config path}:/config
373373
- /etc/localtime:/etc/localtime:ro
374374
- /opt/vc/lib:/opt/vc/lib
@@ -409,6 +409,16 @@ Configure a substream if you plan on running Viseron on an RPi.
409409
Viseron will start up immediately and serve the Web UI on port `8888`.<br />
410410
Please proceed to the next chapter on [how to configure Viseron.](configuration)
411411

412+
:::info Mounted Volumes
413+
414+
- `/config` - Where the configuration file, database, etc is stored
415+
- `/segments` - Where the recordings (video segments) are stored
416+
- `/snapshots` - Where the snapshots from object detection, motion detection, etc are stored
417+
- `/thumbnails` - Where the thumbnails for recordings triggered by `trigger_event_recording` are stored
418+
- `/event_clips` - Where the event clips created by `create_event_clip` are stored
419+
420+
:::
421+
412422
:::tip VAAPI
413423

414424
VAAPI hardware acceleration support is built into every `amd64` container.<br />
@@ -433,10 +443,10 @@ To solve this, you can specify the user `PUID` and group `PGID` as environment v
433443

434444
```shell
435445
docker run --rm \
436-
-v {recordings path}:/recordings \
437-
-v {recordings path}:/segments \
438-
-v {recordings path}:/snapshots \
439-
-v {recordings path}:/thumbnails \
446+
-v {segments path}:/segments \
447+
-v {snapshots path}:/snapshots \
448+
-v {thumbnails path}:/thumbnails \
449+
-v {event clips path}:/event_clips \
440450
-v {config path}:/config \
441451
-v /etc/localtime:/etc/localtime:ro \
442452
-p 8888:8888 \
@@ -463,10 +473,10 @@ services:
463473
container_name: viseron
464474
shm_size: "1024mb"
465475
volumes:
466-
- {recordings path}:/recordings
467-
- {recordings path}:/segments
468-
- {recordings path}:/snapshots
469-
- {recordings path}:/thumbnails
476+
- {segments path}:/segments \
477+
- {snapshots path}:/snapshots \
478+
- {thumbnails path}:/thumbnails \
479+
- {event clips path}:/event_clips \
470480
- {config path}:/config
471481
- /etc/localtime:/etc/localtime:ro
472482
ports:

0 commit comments

Comments
 (0)