Intended to provide OctoPrint with an MJPEG stream and JPG snapshots via an RTSP/RTMP feed.
There are, however, options to add security including nginx, traefik, authelia, and many many more solutions.
USER BEWARE! The developers are NOT liable for any security issues imposed by you deploying this solution!
- http://<ip>:8000/mjpg.cgi
- Outputs MJPG Stream via HTTP
- http://<ip>:8000/jpg.cgi
- Outputs JPG via HTTP
- http://<ip>:8000/layer.cgi
- Saves JPG to /data/timelapse for processing
- This is intended to be used in conjunction with Octoprint.
- Octoprint Setup:
- In Octoprint UI:
- Click on Setup
- Navigate to Event Manager
- Add an Event by clicking +Add
- Select ZChange for Event
- Enter the following into Command:
- curl http://<rtsp2mjpg_ip>:<port>/layer.cgi
- Select 'system' for type
- Ensure 'Enabled' is checked.
- Click Close
- Click Save
- Restart OctoPrint
- http://<ip>:8000/timelapse.cgi
- This will eventually generate a timelapse from snapshots in /data/timelapse folder
git clone https://github.com/beardedtek-com/rtsp2mjpg
cp example.env .env
Edit the contents of the .env file SOURCE_URL can be any valid video source (or should be able to) ffmpeg will automatically scale the resolution according to the original's aspect ratio.
MJPG_RESOLUTION=720
MJPG_FPS=5
JPG_RESOLUTION=720
SOURCE_URL=rtsp://WYZE-BRIDGE:8554/camera-name
docker-compose up -d
http://:8880/cgi-bin/mjpg.cgi
http://:8880/cgi-bin/jpg.cgi
No support is implied. This worked when I wrote it and I intend to update it as I have time. Feel free to submit a PR or an issue if something doesn't work, but this is low on my priority list unless it breaks for me.
Feel free to fork this and submit a PR. I will get to it eventually.