Files
projects/Dockers/self-hosted-iptv/README.md
T
Bram db39c420c0
Build and Push Docker Images / build-and-push (push) Failing after 50s
lets try this
2026-02-10 23:44:22 +01:00

42 lines
1.3 KiB
Markdown

# Self-hosted IPTV
Serves M3U playlists that randomly schedule video files from `/movies` and `/series`, with the same show never appearing twice in a row.
## Setup
1. Create `/data/channels.json` (see `data/channels.json.example`).
**channels.json format:**
- `channels`: array of channel objects
- Each channel:
- `id`: unique id (used in URLs)
- `name`: display name
- `paths`: list of path keys to include:
- `"movies"` — all videos under `/movies`
- `"series/Show Name"` — all videos under `/series/Show Name`
2. Run the container with volumes:
```bash
docker build -t self-hosted-iptv .
docker run -d --name iptv -p 8080:8080 \
-v /path/to/movies:/movies:ro \
-v /path/to/series:/series:ro \
-v /path/to/data:/data:ro \
self-hosted-iptv
```
3. In your IPTV client, add playlist URL: `http://<host>:8080/playlist.m3u`
## Endpoints
- `GET /` — simple web index with playlist link
- `GET /playlist.m3u` — master M3U (all channels)
- `GET /channel/<id>/playlist.m3u` — single channel M3U (randomized, no adjacent same show)
- `GET /stream?path=movies/...` or `path=series/...` — stream a video file
## Shuffle behaviour
Videos are grouped by path (e.g. one group per show or the whole movies folder). Each group is shuffled, then items are interleaved round-robin so the same show never plays back-to-back.