Skip to content

Commit 7e6b4ef

Browse files
authored
Create README.md
1 parent eae8ab1 commit 7e6b4ef

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# recording-scripts
2+
This repository holds the scripts and a systemd service template I have used when making my bash-based NVR system. You can find a link to the presentation
3+
outlining the project [here](https://bit.ly/3n8DRRl).
4+
5+
The scripts are written in bash.
6+
7+
I will outline their purpose here in short.
8+
9+
1. cleanup.sh - This will take remove any video files in X path after the given X days that are specified as a command line argument
10+
2. location-room.servie - this system service will execute the recording script and make sure it restarts in case of system reboot
11+
3. record-location-room.sh - this is the main recording script. it calls ffmpeg and creates an apendable video file for the whole day
12+
4. remux.sh - this script will convert the previous days recording into an mp4 file extension
13+
5. watchdog.sh - this script serves a watchdog function that will check if the ffmpeg recording has stalled and restart it
14+
15+
Another possible approach when recording is to use the build in segmentation feature of ffmpeg and have it record in smaller chunks with
16+
a non-appendable format. That way you can still recover from errors and use less space. The drawback is that you will have to concatenate
17+
these small chunks at one point. The operation itself is not resource intensive but it means you need to have additional space available
18+
for that short amount of time, write a script for it and schedule it with crontab.

0 commit comments

Comments
 (0)