Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sondregronas/cam2lapse
A simple python script to capture timelapse images from an RTSP stream + a webserver for embedding the latest capture.
https://github.com/sondregronas/cam2lapse
Last synced: 8 days ago
JSON representation
A simple python script to capture timelapse images from an RTSP stream + a webserver for embedding the latest capture.
- Host: GitHub
- URL: https://github.com/sondregronas/cam2lapse
- Owner: sondregronas
- License: mit
- Created: 2023-07-05T15:04:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-14T12:46:34.000Z (about 1 month ago)
- Last Synced: 2024-11-14T13:39:32.691Z (about 1 month ago)
- Language: Python
- Size: 90.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cam2Lapse off-site RTSP to "live"stream / timelapse storage (WIP)
### NOTE: This project is not ready for public use, and will probably not meet your needs as-is. (its a bit of a mess)
A simple python script to capture timelapse images from an RTSP stream. Plus a webserver, in order to embed the latest
capture in a webpage.There's a couple of docker containers in folders for temporary use that currently don't work with the script as-is, will
work on implementing this properly later (maybe).Status: needs work, not ready for public use - but feel free to use it if you want to :), code's a bit messy and needs a
rewrite.## Requirements
* Python 3 (https://www.python.org/)
* FFmpeg (https://ffmpeg.org/)## Installation
* Clone the repository
* `pip install -r requirements.txt`
* Run both `Cam2Lapse.py` and `Web.py` at the same time (or use the provided start script## Configuration
The configuration is done in the `config.py` file. It's important that you update the `RTSP_URL` variable with the URL
of your camera stream. Use environment variables to override the values in `config.py`.Using Receiver.py you can also get a frontend to view the latest image + extra archival of images - just serve the
folder it provides with a webserver like nginx or apache.## Usage with Receiver running (web server to receive images)
* Run `Receiver.py` on the receiver machine
On the sender machines (where the cameras are connected):
```sh
# NOTE: CAM set to '' will result in "latest" being used, saves in folder "1" in the receiver
export RTSP_URL="rtsp://"
export SEND_TO_RECEIVER="y"
export CAM="CAM1"
export URL="https://"
export TOKEN="1234567890"docker run -d \
-e RTSP_URL=$RTSP_URL \
-e SEND=$SEND_TO_RECEIVER \
-e CAM=$CAM \
-e URL=$URL \
-e TOKEN=$TOKEN \
--restart unless-stopped \
--name cam2lapse \
-p 80:80 \
-p 443:443 \
-p 8080:8080 \
-p 8081:8081 \
ghcr.io/sondregronas/cam2lapse:latest
```Alt: `curl -fsSL https://raw.githubusercontent.com/sondregronas/Cam2Lapse/main/setup-client.sh | sh`
Update:
`sudo docker pull ghcr.io/sondregronas/cam2lapse:latest && sudo docker stop cam2lapse && sudo docker rm cam2lapse && sudo sh run.sh`