-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added instructions for installing, configuring, and building docker image to re-encode OctoPrint's built in mjpeg stream to YouTube Live. Pulls stream url from OctoPrint settings and stream id from plugin settings to generate a docker command. Control stream from new button on bottom of YouTube Live plugin tab.
- Loading branch information
Showing
8 changed files
with
197 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,17 @@ | ||
# OctoPrint-YouTubeLive | ||
**Overview:** Plugin that adds a tab to OctoPrint for viewing, starting, and stopping a YouTube Live stream. | ||
|
||
**Overview:** A simple youtube live viewer tab for OctoPrint. Currently a work in progress and simple skeleton. | ||
|
||
**Details:** This plugin in combination with the instructions found [here](https://blog.alexellis.io/live-stream-with-docker/) creates a pretty good streaming solution for OctoPrint. Currently tested with Octoprint running on Raspberry Pi Zero W and Google Chrome. | ||
|
||
Would probably run better on a Pi 3 as the live stream does start to buffer running both OctoPrint and the stream from the same Pi Zero W. You could run your stream from any device, this plugin just creates the tab to allow you to look at the given channels live stream. | ||
**Details:** Based on the work found [here](https://blog.alexellis.io/live-stream-with-docker/). Currently tested with OctoPrint running on a Raspberry Pi Zero W and on a Pi3. | ||
|
||
<img src="https://raw.githubusercontent.com/jneilliii/Octoprint-YouTubeLive/master/tab_screenshot.jpg"> | ||
|
||
## Setup | ||
## Requirements | ||
Follow the instructions found [here](docker_instructions.md) to install and configure docker/mmjpeg for use with this plugin. | ||
|
||
Once installed enter your YouTube's channel id which can be found on your [Advanced Account Settings](https://www.youtube.com/account_advanced). Enter your YouTube Channel ID into the YouTube Live settings within OctoPrint's settings dialog. | ||
## Setup | ||
Once installed enter your YouTube's channel id ([Advanced Account Settings](https://www.youtube.com/account_advanced)) and your YouTube stream id ([YouTube Live Dashboard](https://www.youtube.com/live_dashboard)) into the YouTube Live plugin settings. | ||
|
||
<img src="https://raw.githubusercontent.com/jneilliii/Octoprint-YouTubeLive/master/settings_screenshot.jpg"> | ||
|
||
**Note:** If you use the same pi for both streaming and octoprint you will need to stop the webcamd service if using an OctoPi distribution. I ended up using the [SystemCommandEditor](https://github.com/Salandora/OctoPrint-SystemCommandEditor) plugin and added the following commands: | ||
|
||
+ sudo service webcamd stop && docker run --privileged --name cam -d alexellis2/streaming:17-5-2017 *xxxx-xxxx-xxxx-xxxx* | ||
+ docker stop cam && docker rm cam && sudo service webcamd start | ||
|
||
manually: | ||
|
||
sudo pip install https://github.com/jneilliii/OctoPrint-YouTubeLive/archive/master.zip | ||
|
||
## Configuration | ||
|
||
## TODO: | ||
* [ ] Additional testing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
**Install docker** | ||
|
||
curl -sSL https://get.docker.com | sh | ||
sudo usermod pi -aG docker | ||
sudo reboot | ||
|
||
**Pull Docker Image** | ||
|
||
docker pull alexellis2/streaming:17-5-2017 | ||
|
||
**Clone Repository and Rebuild** | ||
|
||
cd ~ | ||
git clone https://github.com/jneilliii/youtubelive --depth 1 | ||
cd youtubelive | ||
docker build -t octoprint/youtubelive . | ||
|
||
**Test** | ||
|
||
Set up your stream on the [YouTube Live Dashboard](https://www.youtube.com/live_dashboard) and enter your stream id in the command below in place of xxxx-xxxx-xxxx-xxxx. | ||
|
||
docker run --privileged --name YouTubeLive -ti octoprint/youtubelive:latest http://localhost:8080/?action=stream xxxx-xxxx-xxxx-xxxx | ||
|
||
Stream should go live and re-encode the OctoPrint stream to YouTube. Once verified close ffmpeg and remove docker container. | ||
|
||
ctrl+c | ||
docker rm YouTubeLive | ||
|
||
**OctoPrint Settings** | ||
|
||
Enter your stream id used above in the OctoPrint-YouTubeLive plugin settings. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
<div id="youtubelive_wrapper"> | ||
<iframe data-bind="attr: {src: 'https://www.youtube.com/embed/live_stream?channel=' + settingsViewModel.settings.plugins.youtubelive.channel_id()}" frameborder="0" allowfullscreen></iframe> | ||
</div> | ||
<div class="row-fluid btn-group" style="text-align: center;padding-top: 20px;"> | ||
<button class="btn" data-bind="click: toggleStream, css: btnclass, disable:processing"><i data-bind="css: icon"></i><span data-bind="text: streaming() ? ' Stop' : ' Go Live'"></span></button> | ||
</div> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters