/octoprint-youtubelive

YouTube Streaming Plugin for OctoPi

Primary LanguagePython

OctoPrint-YouTubeLive

Not Maintained!

The OctoPrint-YouTubeLive plugin by 'jneilliii' got me started streaming my OctoPi webcam to my YouTube Channel. Once I made OctoPi accessible via a SSO reverse proxy, it became necessary to specify the webcam URL independent of OctoPi global setting. In brief, the global setting needed to remain a relative URL and the plugin setting needed to be absolute. Hence this fork was born.

I learned a lot about OctoPrint development in the process. It also brought up some whole new ideas. The OctoPrint-WebcamStreamer was born. While it foundation are very clearly based on OctoPrint-YouTubeLive by 'jneilliii' I don't think it would be fair to call it a fork any longer.

I am leaving this here in case anyone finds it useful.

Overview

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

Credits:

Based on the work by

Requirements for Streaming

To stream the OctoPrint webcam Docker containers are required. Install docker and the adilinden/rpi-ffmpeg (source) and adilinden/rpi-stream (source) images.

Using ssh access the OctoPi and install docker

curl -sSL https://get.docker.com | sh
sudo usermod pi -aG docker
sudo reboot

Pull the adilinden/rpi-stream image

docker pull adilinden/rpi-stream:latest

Test streaming by running the container manually, the following should work (repace the placeholders with your personal YouTubeLive account values)

docker run -ti --rm --privileged --name YouTubeLive adilinden/rpi-stream:latest octopi-youtubelive http://<IP>:8080/?action=stream rtmp://a.rtmp.youtube.com/live2 xxxx-xxxx-xxxx-xxxx 

Setup

Unless the plugin is made available in the official OctoPrint PluginRepo installation can be performed via these two methods

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

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

Pull up the YouTube Live Settings in the OctoPi settings panel

  • Enter your Youtube channel id from your YouTube accounts advanced account settings
  • Enter your YouTube Live server URL and stream name/key from your live streaming dashboard
  • Enter the fully qualified URL for your webcam stream, which typically something like http://<IP>:8080/?action=stream (Example: http://192.168.1.34:8080/?action=stream).