SSH to Pi using putty, run these commands
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo groupadd docker
sudo usermod -aG docker $USER
sudo systemctl disable webcamd
sudo systemctl disable ffmpeg_hls
sudo service webcamd stop
sudo service ffmpeg_hls stop
logout
log back in to SSH.
- run this command for an IP camera using RTSP
docker run -d --restart unless-stopped \
--name restreamer \
-e "RS_USERNAME=..." -e "RS_PASSWORD=..." -e "RS_MODE=USBCAM" \
-e "RS_USBCAM_FPS=10" -e "RS_USBCAM_WIDTH=1280" -e "RS_USBCAM_HEIGHT=720" \
-e "RS_SNAPSHOT_INTERVAL=10s" \
-p 8080:8080 \
-v /mnt/restreamer/db:/restreamer/db \
--tmpfs /var/run/hls \
datarhei/restreamer-armv7l:latest
- run this command for a usb camera, make sure the device (/dev/video0) is the correct path to your camera by running
v4l2-ctl --list-devices
.
docker run -d --restart unless-stopped \
--name restreamer \
-e "RS_USERNAME=..." -e "RS_PASSWORD=..." -e "RS_MODE=USBCAM" \
-e "RS_USBCAM_FPS=10" -e "RS_USBCAM_WIDTH=1280" -e "RS_USBCAM_HEIGHT=720" \
-e "RS_SNAPSHOT_INTERVAL=10s" -e "RS_INPUTSTREAM=rtmp://127.0.0.1/live/usbcam.stream" \
-p 8080:8080 \
-v /mnt/restreamer/db:/restreamer/db \
--device /dev/video0:/dev/video \
--tmpfs /var/run/hls \
datarhei/restreamer-armv7l:latest
- run this command for a raspi camera, make sure the device (/dev/video0) is the correct path to your camera by running
v4l2-ctl --list-devices
.
docker run -d --restart unless-stopped \
--name restreamer \
-e "RS_USERNAME=..." -e "RS_PASSWORD=..." -e "RS_MODE=RASPICAM" \
-e "RS_RASPICAM_FPS=10" -e "RS_RASPICAM_WIDTH=1920" -e "RS_RASPICAM_HEIGHT=1080" \
-e "RS_SNAPSHOT_INTERVAL=10s" -e "RS_INPUTSTREAM=rtmp://127.0.0.1/live/raspicam.stream" \
-p 8080:8080 \
-v /mnt/restreamer/db:/restreamer/db \
-v /opt/vc:/opt/vc \
--tmpfs /var/run/hls \
--privileged \
datarhei/restreamer-armv7l:latest
open browser to http://ip:8080/ and login with username password specified in docker run command above.
add your rtsp stream url in restreamer, set options accordingly and start. for a locally connected USB or picam enter rtmp://127.0.0.1/live/usbcam.stream
with the option copy for video codec.
in octoprint's webcam & timelapse settings set the stream url to http://ip:8080/hls/live.stream.m3u8
and snapshot url to http://ip:8080/images/live.jpg
While running the command above if you get a message like below when running the get-docker.sh command run

sudo apt update
, answer yes for the release info change, and then re-run the get-docker.sh line and continue.