mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
wuh
This commit is contained in:
@@ -19,7 +19,7 @@ Lightweight systemd service that serves a JPEG snapshot from any MJPEG-capable w
|
||||
- `QUALITY=5` (ffmpeg MJPEG quality; lower is higher quality)
|
||||
- `PORT=8080`
|
||||
- `WORKDIR=/run/roomcam`
|
||||
- `INPUT_FORMAT=mjpeg` (use `bayer_grbg8` for OV534/raw Bayer cams; auto-converts to JPEG)
|
||||
- `INPUT_FORMAT=mjpeg` (use `bayer_grbg8` for OV534/raw Bayer cams; aliases `GRBG`/`grbg` are accepted)
|
||||
3) Point the server `roomCameras[].url` to `http://<host>:8080/snapshot.jpg`.
|
||||
|
||||
Notes:
|
||||
|
||||
@@ -12,6 +12,7 @@ INPUT_FORMAT="${INPUT_FORMAT:-mjpeg}"
|
||||
|
||||
mkdir -p "${WORKDIR}"
|
||||
SNAPSHOT_PATH="${WORKDIR}/snapshot.jpg"
|
||||
rm -f "${SNAPSHOT_PATH}"
|
||||
|
||||
cleanup() {
|
||||
[[ -n "${FFMPEG_PID:-}" ]] && kill "${FFMPEG_PID}" 2>/dev/null || true
|
||||
@@ -27,7 +28,7 @@ if [[ "${INPUT_FORMAT}" == bayer_* ]]; then
|
||||
FFMPEG_FILTERS=(-pix_fmt yuv420p)
|
||||
fi
|
||||
|
||||
/usr/bin/ffmpeg \
|
||||
/usr/bin/ffmpeg -y \
|
||||
-loglevel warning -nostats \
|
||||
"${FFMPEG_INPUT_ARGS[@]}" \
|
||||
"${FFMPEG_FILTERS[@]}" \
|
||||
|
||||
@@ -10,6 +10,7 @@ Environment=RESOLUTION=640x480
|
||||
Environment=QUALITY=5
|
||||
Environment=PORT=8088
|
||||
Environment=WORKDIR=/run/roomcam
|
||||
Environment=INPUT_FORMAT=mjpeg
|
||||
WorkingDirectory=/home/daniel/gits/MultiRoombaRover/roomcam-service
|
||||
ExecStart=/usr/bin/env bash /home/daniel/gits/MultiRoombaRover/roomcam-service/room-cam-snapshot.sh
|
||||
Restart=always
|
||||
|
||||
Reference in New Issue
Block a user