A lightweight Docker-ready service that periodically fetches streams from an Xtream server and generates M3U playlist files.
- 📺 Live TV - All live channels with EPG support
- 🎬 VOD - Movies organized by category
- 📺 Series - TV shows with season/episode organization
- ⏰ Scheduled Refresh - Configurable cron-based updates
- 🐳 Docker Ready - Easy deployment with Docker Compose
-
Clone and configure:
git clone <your-repo> cd xtream-converter
-
Edit docker-compose.yml with your Xtream credentials:
environment: - XTREAM_SERVER=http://your-server.com:port - XTREAM_USERNAME=your_username - XTREAM_PASSWORD=your_password
-
Run:
docker-compose up -d
-
Your M3U file will be at:
./output/playlist.m3u
| Variable | Description | Default |
|---|---|---|
XTREAM_SERVER |
Xtream server URL with port | Required |
XTREAM_USERNAME |
Xtream username | Required |
XTREAM_PASSWORD |
Xtream password | Required |
OUTPUT_PATH |
Output directory path | ./output |
OUTPUT_FILENAME |
Output filename | playlist.m3u |
SCHEDULE_ENABLED |
Enable scheduled refresh | true |
SCHEDULE_CRON |
Cron expression for refresh | 0 */6 * * * (every 6 hours) |
INCLUDE_LIVE |
Include live TV streams | true |
INCLUDE_VOD |
Include VOD/movies | true |
INCLUDE_SERIES |
Include TV series | true |
Instead of environment variables, you can use a JSON config file:
- Copy the example:
cp config/config.example.json config/config.json - Edit with your settings
- Mount in Docker:
-v ./config:/app/config
# Install dependencies
npm install
# Set environment variables or create config/config.json
# Run
npm start| Cron Expression | Description |
|---|---|
0 */6 * * * |
Every 6 hours |
0 */12 * * * |
Every 12 hours |
0 0 * * * |
Once daily at midnight |
0 */1 * * * |
Every hour |
*/30 * * * * |
Every 30 minutes |
The generated M3U file includes:
- Extended M3U format (M3U_PLUS)
- EPG URL for live TV guide data
- Channel logos
- Category grouping
- Proper stream URLs
Example entry:
#EXTINF:-1 tvg-id="channel1" tvg-name="Channel Name" tvg-logo="http://logo.url" group-title="Live - Sports",Channel Name
http://server.com/live/user/pass/123.ts# Start in background
docker-compose up -d
# View logs
docker-compose logs -f
# Stop
docker-compose down
# Rebuild after changes
docker-compose up -d --buildMIT