Connect to a security camera through RTSP and save the frames in storage. Cameras in the local network (LAN) running RTSP with default port (554) are automatically discovered.
apt install python3-opencv
- Copy
config.json.default
toconfig.json
and set it up to your liking. - Adapt
camera.service
to your Path and user. - Move
camera.service
to/etc/systemd/system/
- Enable service:
sudo systemctl daemon-reload && sudo systemctl enable camera.service
- Start service:
sudo systemctl start camera
Below is an example of a potential config.json
. For every new discovered server, the default credentials are used. A new frame is stored in path
every interval
seconds, with the following format: path/<year>/<month>/<day>/hour.min.sec.jpg
.
Before running the LAN scan, the software will try to connect to the servers in the list, using their credentials or the default ones if there are none.
The servers
key can also be empty ("servers": []
).
{
"default_username": "admin",
"default_password": "admin",
"interval": 3,
"path": "$HOME/frames",
"servers": [
{
"address": "10.0.0.33"
},
{
"address": "1.2.3.4",
"username": "kibHJI8j",
"password": "78gImbEuuCvs4"
}
]
}