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
propertiessegment_timeseconds, is the time of splits between stream segments;auto_cleanenabledAuto clean old backup history? (enable auto cleanup... see Here);keep_daysdays to keep history;
streamsList of streams to backup, with the following properties:aliasName to help identification;urlRtsp url with full configuration to read from (like host, port, user and password);directoryUsed 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 stopWant 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