M3U2X is a clever "fake" Xtream Codes API server that acts as a bridge between your media collections and Dispatcharr. It allows you to easily integrate media from public directories, personal collections, or online streams into your Dispatcharr VOD library.
M3U2X emulates a fully functional Xtream Codes API server (player_api.php). Think of it as a dynamic playlist manager that makes your M3U files "discoverable" within the Dispatcharr ecosystem.
- Ingest: Accepts M3U playlists via URL or direct file upload.
- Parse: Stores metadata (
#EXTINFtags,group-title, logos) in an internal SQLite database. - Emulate: Dispatcharr connects to M3U2X like any other Xtream Codes source.
- Direct Play: End users browse and play content directly from the original source URLs—no video data is proxied or stored by M3U2X.
- Dual Input Methods: Add M3U sources via URL or by uploading
.m3u/.m3u8files. - Smart Organization: Automatically categorizes content using the
group-titlefrom your M3U files. - Direct Play: Streams are served as direct links—zero bandwidth is consumed by the proxy server.
- Self-Contained: Everything is stored within a single SQLite database for easy management and backups.
- Modern Web UI: Built-in administration panel for adding, syncing, and managing sources.
- Docker First: Easy deployment and port management via Docker Compose.
- SSL Flexible: Works with HTTPS sources using self-signed certificates.
git clone [https://github.com/SpaceBallz2k8/m3u2x.git](https://github.com/SpaceBallz2k8/m3u2x.git)
cd m3u2xEdit the .env file to set your desired port (default is 8000):
PORT=8000docker compose build
docker compose up -dOpen your browser and navigate to:
http://YOUR_DOCKER_IP:YOUR_PORT
- In the web UI, go to the "Add M3U Source" tab.
- Choose From URL (paste link) or From File (upload .m3u).
- Name your source, select the content type (VOD, Series, Live, or Mixed), and click Add Source.
In your Dispatcharr settings, add a new Xtream Codes source:
- Server URL:
http://YOUR_M3U2X_IP:PORT/player_api.php - Username:
admin - Password:
admin
Your media will appear in Dispatcharr, organized by the categories in your M3U. When played, the client receives a direct link to the original file for seamless playback.
The docker-compose.yml maps your chosen port and persists the database:
version: '3.8'
services:
m3u2x:
build: .
container_name: m3u2x
ports:
- "${PORT}:8000"
volumes:
- ./data:/app/data # Persists the SQLite database
environment:
- DATABASE_URL=sqlite:///./data/m3u2x.db
restart: unless-stopped- Backend Framework: FastAPI (Python)
- Database: SQLite (stored in
./data/m3u2x.db) - API: Implements essential Xtream Codes endpoints (
get_vod_categories,get_vod_streams, etc.) - Authentication: Simple
admin/admincredentials for API access.
Contributions, suggestions, and bug reports are welcome! Please feel free to open an issue or submit a pull request on GitHub.
Found this project useful? Consider giving it a ⭐ star on GitHub!
This project is open source and available under the MIT License.
Happy streaming! 🍿