Skip to content

Commit

Permalink
0.5.1
Browse files Browse the repository at this point in the history
0.5.1
- Update run commands to use host network, allowing for 127.0.0.1 addresses in webcam url.
- Replace docker privileges to only allow access to only needed devices.
  • Loading branch information
jneilliii authored Jul 13, 2019
2 parents 57d2186 + 0cf3479 commit 0a1c927
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

Set up your stream on the [YouTube Live Dashboard](https://www.youtube.com/live_dashboard) and enter your stream id and IP address in the command below in place of xxxx-xxxx-xxxx-xxxx and <ip>.

docker run --device=/dev/vchiq --name YouTubeLive -ti octoprint/youtubelive:latest http://<ip>:8080/?action=stream xxxx-xxxx-xxxx-xxxx null
docker run --device=/dev/vchiq --network_mode="host" --name YouTubeLive -ti octoprint/youtubelive:latest http://<ip>:8080/?action=stream xxxx-xxxx-xxxx-xxxx null

Stream should go live and re-encode the OctoPrint stream to YouTube. Once verified close ffmpeg and remove docker container.

Expand Down
2 changes: 1 addition & 1 deletion octoprint_youtubelive/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def startStream(self):
if len(filters) == 0:
filters.append("null")
try:
self.container = self.client.containers.run("octoprint/youtubelive:latest",command=[self._settings.global_get(["webcam","stream"]),self._settings.get(["stream_id"]),",".join(filters)],detach=True,privileged=False,devices=["/dev/vchiq"],name="YouTubeLive",auto_remove=True)
self.container = self.client.containers.run("octoprint/youtubelive:latest",command=[self._settings.global_get(["webcam","stream"]),self._settings.get(["stream_id"]),",".join(filters)],detach=True,privileged=False,devices=["/dev/vchiq"],name="YouTubeLive",auto_remove=True,network_mode="host")
self._plugin_manager.send_plugin_message(self._identifier, dict(status=True,streaming=True))
except Exception, e:
self._plugin_manager.send_plugin_message(self._identifier, dict(error=str(e),status=True,streaming=False))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "YouTube Live"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.5.0"
plugin_version = "0.5.1"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit 0a1c927

Please sign in to comment.