232ed332e993ef655e4bc2db0d1f2dedd5d964a8
streamlink-server
Run your m3u and mpd streams through streamlink with authentication
Purpose
Convert unstable or incompatible video streams into a format that media players can reliably play and record by processing them through streamlink.
Requirements
- Python 3.11 or newer
- FFmpeg
- streamlink
- Python packages (install via
pip):- FastAPI
- uvicorn
- python-dotenv
- python-multipart
Installation
git clone https://github.com/purplescorpion1/streamlink-server.git
cd streamlink-server
pip install -r src/requirements.txt
Configuration
- Create a
.envfile in the project root:
AUTH_USERNAME=your_username
AUTH_PASSWORD=your_password
- Configure your channels in
data/channels.json:
{
"channels": [
{
"id": "1",
"name": "Example Channel",
"url": "https://example.com/stream.m3u8"
}
]
}
Usage
- Start the server:
python src/stream_link_server.py
The server will start on port 6090 by default.
- Access your streams:
- List all channels:
http://localhost:6090/channels?username=xxx&password=xxx - Stream specific channel:
http://localhost:6090/{channel_id}?username=xxx&password=xxx
Docker Support
Run with Docker Compose:
docker-compose up -d
Environment Variables
AUTH_USERNAME: Username for authenticationAUTH_PASSWORD: Password for authenticationPORT: Server port (default: 6090)
Notes
- Make sure streamlink is properly installed and available in your system PATH
- All streams require authentication with username/password
- The server provides a clean HTTP interface for your media players
Description
Languages
Python
81.2%
HTML
17.1%
Dockerfile
1.7%