adilinden-oss / octoprint-webcamstreamer

Plugin that adds a tab to OctoPrint for viewing, starting, and stopping a live stream
21 stars 10 forks source link

OctoPrint-WebcamStreamer

Overview

Plugin that adds a tab to OctoPrint for viewing, starting, and stopping a live stream.

Credits:

Inspired by and based on the work by

Requirements for Streaming

Although this plugin should work with a wide variety of webcam, it has only been tested with a Raspberry Pi cam running on OctoPi and made available via OctoPrint mjpeg-streamer. This plugin relies on a Docker container running FFmpeg to convert the mjpeg-streamer video stream and pipe it to a live streaming service. The YouTube Live and Twitch.Tv streaming services have been tested.

Installation

Using ssh access the OctoPi and install docker:

curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker pi
sudo systemctl enable docker
sudo reboot now

2-3 minutes after the reboot, ssh back in and test that docker is working:

docker run hello-world

You should see something like this.

If not, try this page for troubleshooting.

Pull the adilinden/rpi-ffmpeg image:

docker pull adilinden/rpi-ffmpeg:latest

Install OctoPrint-WebcamStreamer via one of these 3 methods, also in-depth explained on the official OctoPrint Installing a plugin page.

  1. Open the plugin repository in the Plugin Manager's settings dialog, search for "OctoPrint-WebcamStreamer" and install with the "Install" button.

  2. Open the plugin repository in the Plugin Manager's settings dialog, click on "Get more..." and enter the https://github.com/adilinden-oss/octoprint-webcamstreamer/archive/master.zip URL in the "... from URL" box. Click the Install button to complete the installation.

  3. Access the OctoPi command line and run the ~/oprint/bin/pip install https://github.com/adilinden-oss/octoprint-webcamstreamer/archive/master.zip command.

Setup

Pull up Webcam Streamer in the OctoPi settings panel

Terse setup information is also availabe via the expandable "Additional Information" section on the "Webcam Streamer" settings page.

Advanced Setup

Advanced option allow for modification of the FFmpeg command line for use with other streaming services or cameras. It also allows for a different Docker container to be specified if desired or needed.

Todo