mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
1.2 KiB
1.2 KiB
Room camera snapshot service
Lightweight systemd service that serves a JPEG snapshot from any MJPEG-capable webcam (most USB webcams) at 4 fps. The server pulls http://<host>:8080/snapshot.jpg for room cams.
Files
room-cam-snapshot.sh– ffmpeg + simple HTTP server wrapperroom-cam.service– systemd unit template
Usage
- Copy the service into place (adjust path/env as needed):
sudo cp roomcam-service/room-cam.service /etc/systemd/system/room-cam.service sudo systemctl daemon-reload sudo systemctl enable --now room-cam.service - Override defaults via
Environment=in the unit or drop-ins:DEVICE=/dev/video0RESOLUTION=640x480QUALITY=5(ffmpeg MJPEG quality; lower is higher quality)PORT=8080WORKDIR=/run/roomcamINPUT_FORMAT=mjpeg(usebayer_grbg8for OV534/raw Bayer cams; aliasesGRBG/grbgare accepted)
- Point the server
roomCameras[].urltohttp://<host>:8080/snapshot.jpg.
Notes:
- The camera runs at its native MJPEG frame rate; the server polls snapshots at ~4 fps, so no extra filtering is applied here.
To run outside systemd, just execute ./room-cam-snapshot.sh with any overrides.