Proxy Playlists
π Using built in proxy
Only available in m3u editor v0.8.0+
m3u editor includes powerful stream proxying capabilities through m3u-proxy. This allows you to proxy all stream URLs through your server, which is useful for:
- Connection Management: Avoid βmax connections exceededβ errors from your provider
- Stream Pooling: Multiple users can share a single provider connection
- IP Masking: All requests appear to come from your server
- Transcoding: Convert streams to HLS format (external proxy only)
Enabling Proxy for a Playlist
- Navigate to Playlists β‘οΈ Create/Edit β‘οΈ Step 5
- Toggle the Enable Proxy option
- Save changes
When enabled, all channel URLs in the playlist will point to m3u editor, which will proxy the stream content.
Enable/Disable dynamically
You can also utilize the proxy βon the flyβ via URL variables.
Adding the ?proxy= to the end of your playlist with true or false, which will enable or disable the proxy functionality dynamically.
To override the Playlist proxy settings, append ?proxy=true, or ?proxy=false, to your playlist url, e.g.: http://localhost:36400/9e6a2337-e48b-404e-bec4-787473b5a4b8/playlist.m3u?proxy=false
ποΈ Proxy Architecture Options
Embedded Proxy (Default)
The embedded proxy runs inside the m3u-editor container and is enabled by default (M3U_PROXY_ENABLED=true).
Pros:
- Simple setup - no additional containers needed
- Good for basic proxying needs
Cons:
- No Redis-based stream pooling
- No hardware acceleration support
- Shares resources with the main application
External Proxy (Recommended)
Recommended
Running m3u-proxy as a separate container provides better performance and more features.
Pros:
- Stream Pooling: Multiple clients share one provider connection via Redis
- Hardware Acceleration: GPU transcoding support (VAAPI, NVENC)
- Better Performance: Dedicated resources for streaming
- Independent Scaling: Scale proxy independently from the main app
Configuration:
# In m3u-editor environment
- M3U_PROXY_ENABLED=false
- M3U_PROXY_HOST=m3u-proxy # Container name
- M3U_PROXY_PORT=38085
- M3U_PROXY_TOKEN=your-secure-token
See the Getting Started guide for complete docker-compose examples.
π Stream Pooling
New (v0.8.0)
Stream pooling allows multiple clients to share a single transcoded stream from m3u-proxy without consuming additional provider connections.
How It Works
Without Pooling:
User 1 β m3u-editor β m3u-proxy β Provider Connection 1
User 2 β m3u-editor β m3u-proxy β Provider Connection 2 β (REJECTED if limit=1)
With Pooling (Enabled):
User 1 β m3u-editor β m3u-proxy β Provider Connection 1
User 2 β m3u-editor β m3u-proxy β Same Connection β
User 3 β m3u-editor β m3u-proxy β Same Connection β
Requirements for Stream Pooling
- External m3u-proxy setup
- Redis enabled (
REDIS_ENABLED=trueon m3u-proxy) ENABLE_REDIS_POOLING=trueon m3u-proxy
π¬ HLS Storage Configuration
When using the proxy with transcoding, HLS segments are temporarily stored. Configure storage behavior with these environment variables:
| Variable | Default | Description |
|---|---|---|
HLS_TEMP_DIR | /tmp/hls | Directory for HLS segments |
HLS_GC_ENABLED | true | Enable garbage collection |
HLS_GC_INTERVAL | 60 | GC interval in seconds |
HLS_GC_AGE_THRESHOLD | 300 | Delete segments older than this (seconds) |
For high-traffic setups, consider mounting HLS_TEMP_DIR to a fast storage volume (SSD/RAM disk).
π₯οΈ Hardware Acceleration
Hardware acceleration for transcoding is only available with the external proxy setup.
VAAPI (Intel/AMD)
m3u-proxy:
image: sparkison/m3u-proxy:latest
devices:
- /dev/dri:/dev/dri
NVIDIA (NVENC)
m3u-proxy:
image: sparkison/m3u-proxy:latest
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
π Debugging
To debug proxy issues, add the M3U_PROXY_LOG_LEVEL environment variable to have the m3u-proxy process pipe output to /var/www/html/storage/logs/m3u-proxy.log in the container.
β οΈ Warning: Only enable for troubleshooting as the log file can grow quickly.
Example docker compose addition:
services:
m3u-editor:
image: sparkison/m3u-editor:latest
container_name: m3u-editor
environment:
- M3U_PROXY_LOG_LEVEL=info
...
Log levels: DEBUG, INFO, WARN, ERROR
For external proxy, set LOG_LEVEL on the m3u-proxy container:
m3u-proxy:
environment:
- LOG_LEVEL=DEBUG
π‘ Using MediaFlow Proxy
While m3u editor has a built in proxy option, using MediaFlow Proxy has a few advanatges, such as:
- Convert MPEG-DASH streams (DRM-protected and non-protected) to HLS
- Support for non-DRM protected DASH live and VOD streams
- Proxy and modify HLS (M3U8) streams in real-time
- Proxy HTTP/HTTPS links with custom headers
If you donβt need any of the above, the built-in proxy will likely work fine for you. However, if you have more advanced needs, such as DRM, then MediaFlow Proxy is a great option.
Using the MediaFlow Proxy setup as an example:
services:
mediaflow-proxy:
image: mhdzumair/mediaflow-proxy
environment:
- API_PASSWORD=YOUR_PROXY_API_PASSWORD
ports:
- 8888:8888
networks: {}
Your proxied m3u playlist can then be access via: http://localhost:8888/proxy/hls/manifest.m3u8?d=YOUR_M3U_EDITOR_PLAYLIST_URL&api_password=YOUR_PROXY_API_PASSWORD
This is assuming the default MediaFlow Proxy setup, which exposes the http://localhost:8888 URL, make sure to change as needed.
Replace YOUR_PROXY_API_PASSWORD with a secure password, and change the YOUR_M3U_EDITOR_PLAYLIST_URL string to your Playlist URL from m3u editor (can be found via the URLs in the Playlist edit screen Step 1, e.g.: something like: http://localhost:36400/9e6a2337-e48b-404e-bec4-787473b5a4b8/playlist.m3u).
More setup information can be found on the MediaFlow Proxy page.