RTSP to MJPEG proxy for OctoPrint.
Converts an RTSP camera stream into an MJPEG HTTP stream that OctoPrint can use.
| Path | Description |
|---|---|
/?action=stream |
MJPEG stream (multipart/x-mixed-replace) |
/?action=snapshot |
Single JPEG snapshot |
/ |
Alias for /?action=stream |
Set via environment variables:
| Variable | Default | Description |
|---|---|---|
RTSP_URL |
rtsp://10.0.0.238:554/unicast |
Source RTSP stream URL |
PORT |
8889 |
HTTP port to listen on |
FPS |
15 |
Output frame rate |
QUALITY |
5 |
JPEG quality (2–31, lower = better) |
services:
printcam-proxy:
image: ghcr.io/optimusgreen/printcam-proxy:latest
container_name: printcam-proxy
restart: unless-stopped
network_mode: host
environment:
- RTSP_URL=rtsp://<camera-ip>:554/unicast
- PORT=8889
- FPS=15
- QUALITY=5A one-shot installer sets up printcam-proxy as a systemd service.
It detects the distro, installs ffmpeg and python3 if needed, and
starts the proxy automatically on boot.
Requirements: Linux with systemd, root / sudo access.
Supported package managers: apt-get, dnf, yum, pacman, zypper, apk.
# Clone / download the repo, then:
sudo bash install.shThe script prompts for each setting interactively.
You can also pass values as environment variables for unattended installs:
sudo RTSP_URL=rtsp://<camera-ip>:554/unicast PORT=8889 FPS=15 QUALITY=5 bash install.shConfiguration is stored in /etc/printcam-proxy.env.
After editing it, apply with:
sudo systemctl restart printcam-proxyUseful service commands:
sudo systemctl status printcam-proxy
sudo journalctl -fu printcam-proxy
sudo systemctl restart printcam-proxy
sudo systemctl disable printcam-proxy # stop autostartIn OctoPrint, set:
- Stream URL:
http://<host>:8889/?action=stream - Snapshot URL:
http://<host>:8889/?action=snapshot