YouTube Live stream control plugin for OpenDeck — manage your YouTube live stream directly from your deck. Send chat messages, view live viewers, run ad breaks, manage bans and moderators.
Control 7 YouTube actions from your OpenDeck device:
- Setup — Force a YouTube OAuth token refresh to verify authentication
- Chat Message — Send a preset message to your YouTube live chat
- Viewer Count — Display current live viewer count
- Ad Break — Insert an ad break in your live broadcast
- Ban User — Ban a user from your live chat
- Unban User — Remove a ban from a user in your live chat
- Add Moderator — Add a moderator to your live chat
To use this plugin, you need:
- Google Cloud Project with the YouTube Data API v3 enabled
- OAuth2 Credentials (Client ID and Client Secret)
- OpenDeck installed on your system
This plugin runs natively on:
- Windows: x86_64
- macOS: Intel x86_64, Apple Silicon ARM64
- Linux: x86_64, ARM64
# Clone or download this repository
git clone https://github.com/PenguinzTech/youtube-opendeck.git
cd youtube-opendeck
# Install the plugin
make installThis copies the plugin to:
- macOS/Linux:
~/.config/opendeck/plugins/dev.penguin.youtube.sdPlugin/ - Windows:
%APPDATA%\Elgato\StreamDeck\Plugins\dev.penguin.youtube.sdPlugin\
- Build the plugin (see "Building from Source" below)
- Locate your OpenDeck plugins directory:
- macOS/Linux:
~/.config/opendeck/plugins/ - Windows:
%APPDATA%\Elgato\StreamDeck\Plugins\
- macOS/Linux:
- Copy the built plugin folder to the plugins directory
- Restart OpenDeck
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the YouTube Data API v3:
- Search for "YouTube Data API v3"
- Click Enable
- Create OAuth2 credentials:
- Go to Credentials → Create Credentials → OAuth 2.0 Client ID
- Choose Desktop application
- Download the JSON credentials file
- Save your credentials securely
Follow the OpenDeck installation guide for your operating system.
- Open OpenDeck
- Add any YouTube action to a button (Chat Message, Viewer Count, etc.)
- Click the Setup action to authenticate with your YouTube account
- Follow the OAuth2 authorization flow in your browser
- Grant the plugin access to your YouTube channel
Your OpenDeck device is now authenticated with YouTube. Actions will execute immediately when pressed.
- Rust 1.70 or later
- OpenDeck (installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/envgit clone https://github.com/PenguinzTech/youtube-opendeck.git
cd youtube-opendeck
# Build and install the plugin
make install
# Or build only (creates release binary)
make build
# Or develop with live reload
make devThe compiled binary will be available in the target/release/ directory.
| Action | Description | Configuration |
|---|---|---|
| Setup | Force a YouTube OAuth token refresh to verify authentication | None |
| Chat Message | Send a preset message to your YouTube live chat | Message text |
| Viewer Count | Display current live viewer count | None |
| Ad Break | Insert an ad break in your live broadcast | None |
| Ban User | Ban a user from your live chat | Username |
| Unban User | Remove a ban from a user in your live chat | Username |
| Add Moderator | Add a moderator to your live chat | Username |
-
Moderation Actions (Ban User, Unban User, Add Moderator) require you to be:
- The channel owner/broadcaster, OR
- A moderator in the channel
-
Ad Break requires:
- Partner or YouTube Partner status on your channel
-
Chat Message works with any authentication but requires the channel to be live
-
Viewer Count works with any authentication but displays the live count only when streaming
Tokens are automatically:
- Persisted in OpenDeck's global settings
- Refreshed before expiration
- Validated on each button press
You can revoke access at any time from your Google Account Security Settings.
"Plugin not found" — Run make install again to ensure the plugin directory structure is correct.
"Setup failed" — Verify your Google Cloud OAuth2 credentials are correctly configured and the YouTube Data API v3 is enabled.
"Action failed: Not authorized" — Ensure you are a moderator in the channel or the channel broadcaster.
"Viewer count shows 0" — The channel may be offline. Viewer count only displays for live streams.
youtube-opendeck/
├── src/
│ ├── main.rs # Plugin entry point and message dispatcher
│ ├── auth.rs # OAuth2 authentication implementation
│ ├── settings.rs # OpenDeck property persistence
│ ├── youtube_api.rs # YouTube Data API client
│ ├── global_handler.rs # Global plugin state and initialization
│ └── actions/ # Individual action implementations
│ ├── chat_message.rs
│ ├── viewer_count.rs
│ ├── ad_break.rs
│ └── ... (other actions)
├── plugin/
│ ├── manifest.json # Plugin metadata and configuration
│ ├── icon.png # Plugin icon
│ └── actions/ # Action icons
├── Cargo.toml # Rust dependencies
├── Makefile # Build and install targets
└── README.md # This file
make testThis plugin is open source. See LICENSE file for details.
For issues, feature requests, or contributions, visit the GitHub Issues page.