Add MJPEG camera server with systemd deployment

- camera/capture.py: V4L2 mmap-based MJPEG frame capture with background thread
- camera/mjpeg.py: MJPEG streaming server (multipart/x-mixed-replace) + minimal web UI
- camera/app.py: Entry point with argument parsing and signal handling
- pyproject.toml: uv project config (no external dependencies)
- camera-webui.service: systemd unit for native Pi deployment
- README.md: Updated for systemd-only direction with install instructions
This commit is contained in:
mikkeli
2026-08-06 01:17:26 +09:00
parent ceccdcc211
commit d4eebf79f6
7 changed files with 440 additions and 77 deletions
+16
View File
@@ -0,0 +1,16 @@
[Unit]
Description=USB Camera Web UI
After=network-online.target
Wants=network-online.target
[Service]
Type=exec
User=mikkeli
WorkingDirectory=/home/mikkeli/dev/usb-camera-webui
ExecStartPre=/usr/bin/python3 -c "import v4l2"
ExecStart=/usr/bin/python3 -m camera.app --host 0.0.0.0 --port 8080
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target