Make backups from your rtsp live streams (like wifi security cameras).
This repository is used to build Docker image available Here
The recommended method is to use Docker image, the following guide is to run the standalone/manual mode.
This set of scripts needs some linux libraries to work:
- bash: Script interpreter. Is included in most of popular Linux distributions;
- ffmpeg: tool-set used to read, encode and decode audio and video streams;
- jq: manipulates json easily;
The config sample is here
Where
properties
segment_time
seconds, is the time of splits between stream segments;auto_clean
enabled
Auto clean old backup history? (enable auto cleanup... see Here);keep_days
days to keep history;
streams
List of streams to backup, with the following properties:alias
Name to help identification;url
Rtsp url with full configuration to read from (like host, port, user and password);directory
Used to identify inside DATA_DIR, the backups from this stream
Want to start backup? Just start daemon script, passing to it, the built configuration, like this:
CONFIGURATION=$(jq -c . conf/config.json) ./daemon/daemon start &
Stop?
./daemon/daemon stop
Want to dele older backups? Just configure the cron job to execute daily
CONFIGURATION=$(jq -c . conf/config.json) /cron/cleanup
- CONFIGURATION: json with configuration
- DATA_DIR: directory where store files