- 📁 Local Video Streaming: Stream videos from your local videos folder
- 🎬 YouTube Integration: Stream YouTube videos
- 🔗 YouTube Live Streams: Direct streaming support for YouTube live content
- 🌐 Twitch Support: Stream Twitch live streams and video-on-demand (VODs)
- 🔗 Direct URL Streaming: Stream from any URL supported by yt-dlp (thousands of video sites including Vimeo, Dailymotion, Facebook, Instagram, news sites, and more)
- 🎵 Queue System: Queue multiple videos with auto-play and skip functionality
- 🌐 Web Management Interface: Full-featured web dashboard for video library management
- 📤 Video Upload: Upload videos through the web interface
- Bun
v1.1.39+(recommended) or Node.jsv21+ - FFmpeg (in PATH or working directory)
- yt-dlp (automatically downloaded/updated by the bot)
This project is hosted on GitHub.
- Clone the repository:
git clone https://github.com/ysdragon/StreamBot- Install dependencies:
bun install- Configure environment:
- Rename
.env.exampleto.env - Update configuration values
- Rename
With Bun (recommended):
bun run startWith Node.js:
bun run build
bun run start:nodeNote: All videos are played through a queue system. Use the
playcommand to add videos to the queue, and they will be played sequentially with automatic advancement to the next video.
StreamBot supports multiple video sources:
- Local Videos: Store videos in your
VIDEOS_DIRfolder and useplay <filename> - Smart Play: Use
play <input>for automatic detection and streaming (local file, YouTube video, Twitch stream, or any URL supported by yt-dlp) - YouTube Search: Use
ytsearch <query>to search YouTube and display results (useplaywith search results to stream) - Live Streams: Full support for YouTube Live streams and Twitch live content
- Video Queue: All playback goes through a queue system - videos are added to queue and played sequentially
- Create a directory and navigate to it:
mkdir streambot && cd streambot- Download the compose file:
wget https://raw.githubusercontent.com/ysdragon/StreamBot/main/docker-compose.yml-
Configure environment variables in
docker-compose.yml -
Launch container:
docker compose up -d- Download WARP compose file:
wget https://raw.githubusercontent.com/ysdragon/StreamBot/main/docker-compose-warp.yml-
Configure
docker-compose-warp.yml:- Add your WARP license key
- Update TOKEN, etc
-
Launch with WARP:
docker compose -f docker-compose-warp.yml up -dNote
The basic video server will not work if you use WARP.
| Command | Description | Aliases |
|---|---|---|
play <input> |
Smart play: local video, URL, or YouTube search | |
ytsearch <query> |
Search YouTube and display results | |
stop |
Stop current playback | leave, s |
skip |
Skip to next video in queue | next |
queue |
Display current video queue | |
list |
Show local video library | |
status |
Show playback status | |
preview <video> |
Generate video thumbnails | |
config [parameter] [value] |
View or adjust bot configuration parameters (Admin only) | cfg, set |
ping |
Check bot latency | |
help |
Show available commands |
Configuration is done via .env file:
# Selfbot options
TOKEN = "" # Your Discord self-bot token
PREFIX = "$" # The prefix used to trigger your self-bot commands
GUILD_ID = "" # The ID of the Discord server your self-bot will be running on
COMMAND_CHANNEL_ID = "" # The ID of the Discord channel where your self-bot will respond to commands
VIDEO_CHANNEL_ID = "" # The ID of the Discord voice/video channel where your self-bot will stream videos
ADMIN_IDS = ["YOUR_USER_ID_HERE"] # A list of Discord user IDs that are considered administrators (comma-separated or JSON array format)
# General options
VIDEOS_DIR = "./videos" # The local path where you store video files
PREVIEW_CACHE_DIR = "./tmp/preview-cache" # The local path where your self-bot will cache video preview thumbnails
# Stream options
STREAM_RESPECT_VIDEO_PARAMS = "false" # Respect original video parameters (width, height, fps, bitrate)
STREAM_WIDTH = "1280" # The width of the video stream in pixels
STREAM_HEIGHT = "720" # The height of the video stream in pixels
STREAM_FPS = "30" # The frames per second (FPS) of the video stream
STREAM_BITRATE_KBPS = "1000" # The bitrate of the video stream in kilobits per second (Kbps)
STREAM_MAX_BITRATE_KBPS = "2500" # The maximum bitrate of the video stream in kilobits per second (Kbps)
STREAM_HARDWARE_ACCELERATION = "false" # Enable hardware acceleration for video decoding
STREAM_VIDEO_CODEC = "H264" # Video codec: VP8, H264, H265, VP9, or AV1
# H.26x encoding preset for optimal quality/speed balance
# Available presets: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow
STREAM_H26X_PRESET = "ultrafast"
# Videos server options
SERVER_ENABLED = "false" # Enable the built-in web server for video management
SERVER_USERNAME = "admin" # Username for the web interface
SERVER_PASSWORD = "admin" # Password for the web interface (bcrypt hash is supported)
SERVER_PORT = "8080" # Port number for the web serverCheck the Get token wiki
When enabled by setting SERVER_ENABLED=true in your .env file, StreamBot provides a user-friendly web-based management interface for seamless video library control.
Features:
- 📋 Video Library Management: Browse, search, and organize your video collection
- 📤 Video Upload: Upload new videos directly through the web interface
- 🖼️ Thumbnail Generation: Automatic preview generation for all videos in the library
Access: Available at http://localhost:SERVER_PORT when enabled
Setup:
- Set
SERVER_ENABLED=truein your.envfile - Configure
SERVER_USERNAME,SERVER_PASSWORD, andSERVER_PORT - Restart the bot to apply changes
- Access the web interface in your browser at the configured port
Contributions are welcome! Feel free to:
- 🐛 Report bugs via issues
- 🔧 Submit pull requests
- 💡 Suggest new features
This bot may violate Discord's ToS. Use at your own risk.
أتبرأ من أي استخدام غير أخلاقي لهذا المشروع أمام الله.
Licensed under MIT License. See LICENSE for details.