Self-hosted media streaming server — stream your video and audio collections to any device on your network via a web browser.
Version: v0.156.36 | License: MIT
- Stream
.mp4,.mkv,.avi,.mov,.flv,.webm,.mp3,.wav,.flac - On-the-fly transcoding via FFmpeg for unsupported formats
- Smart resume — remembers playback position (SQLite)
- Multiple audio track selection
- Subtitle support with automatic SRT to WebVTT conversion
- Binge mode — auto-plays next episode
- Mobile remote control via WebSocket
- Grid/list/folder views
- Search and filter
- Secured mode with API key authentication
- Runtime theme switching with 12 built-in themes (dark + light)
curl -fsSL https://raw.githubusercontent.com/rkriad585/WebPlay/main/installer.sh | shirm https://raw.githubusercontent.com/rkriad585/WebPlay/main/installer.ps1 | iexAfter install, the webplay command is available globally.
- Python 3.11+
- FFmpeg (the installer will guide you)
git clone https://github.com/rkriad585/WebPlay.git
cd WebPlay
pip install -e .# Set media directory
webplay path /path/to/media
# Start with API key (secured mode)
webplay start
# Start without authentication (LAN)
webplay free
# Custom port
webplay free --port 8080
# Custom config file
webplay start --config /path/to/config.tomlwebplay --selfuninstall# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/rkriad585/WebPlay/main/installer.sh | sh -s -- --selfuninstall
# Windows (PowerShell)
Invoke-RestMethod -Uri "https://raw.githubusercontent.com/rkriad585/WebPlay/main/installer.ps1" | Invoke-Expression -ArgumentList "--selfuninstall"pip uninstall webplay
rm -rf ~/.config/neostore/webplayAll settings are stored in ~/.config/neostore/webplay/config.toml:
[server]
port = 5000
domain = ""
[auth]
api_key = ""
[media]
path = "/path/to/media"
[transcode]
preset = "ultrafast"
crf = 28
[theme]
name = "dark"
mode = "dark"Override with environment variables: TRANSCODE_PRESET, TRANSCODE_CRF.
Themes can be switched at runtime via the palette icon in the navbar or by editing config.toml. Available themes: dark, midnight_blue, forest_night, violet_dusk, warm_ember, cherry_red, amoled, light_clean, ocean_breeze, sunny_day, mint_fresh, lavender.
# Install dependencies
make install
# Run tests
make test
# Lint
make lint
# Format
make formatOr use the build script:
./build.sh install
./build.sh testWindows:
.\build.ps1 install
.\build.ps1 testBuild and run:
# Build
docker build -t webplay .
# Run
docker run -d \
--name webplay \
-p 5000:5000 \
-v /path/to/media:/media:ro \
-e TRANSCODE_PRESET=ultrafast \
webplay
# Or with docker compose
docker compose up -dWebPlay/
app.py # Flask application entry point
cli.py # CLI entry point (webplay command)
config.py # TOML configuration loader
pyproject.toml # Project metadata and build config
requirements.txt # Python dependencies
.version # Version file
installer.sh # Linux/macOS installer
installer.ps1 # Windows installer
build.sh # Linux/macOS build script
build.ps1 # Windows build script
Makefile # Build automation
Dockerfile # Docker image
core/
auth.py # Authentication and path validation
db.py # SQLite database helpers
media.py # Media scanning, metadata, thumbnails
utils.py # Logging and helper functions
paths.py # Cross-platform path resolution
templates/ # Jinja2 HTML templates
static/ # Static assets
tests/ # Test suite
docs/ # Documentation
See the docs directory for detailed guides:
- Setup Guide
- Usage Guide
- Configuration
- CLI Reference
- Docker Guide
- Development
- Deployment
- Troubleshooting
- Create a feature branch:
git checkout -b feature/my-feature - Install dev dependencies:
pip install -r requirements.txt - Run tests:
python -m pytest - Format:
black . - Lint:
ruff check . - Commit and push, then open a PR.
See CONTRIBUTING.md for guidelines.
MIT License — see LICENSE.
Copyright (c) 2025 RK Riad Khan