Files
streamlink-server/README.md
2025-02-23 20:31:57 -06:00

86 lines
1.7 KiB
Markdown

# 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
```bash
git clone https://github.com/purplescorpion1/streamlink-server.git
cd streamlink-server
pip install -r src/requirements.txt
```
## Configuration
1. Create a `.env` file in the project root:
```plaintext
AUTH_USERNAME=your_username
AUTH_PASSWORD=your_password
```
2. Configure your channels in `data/channels.json`:
```json
{
"channels": [
{
"id": "1",
"name": "Example Channel",
"url": "https://example.com/stream.m3u8"
}
]
}
```
## Usage
1. Start the server:
```bash
python src/stream_link_server.py
```
The server will start on port 6090 by default.
2. 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:
```bash
docker-compose up -d
```
## Environment Variables
- `AUTH_USERNAME`: Username for authentication
- `AUTH_PASSWORD`: Password for authentication
- `PORT`: 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