Multi Flow - Concurrent Streaming Proxy
Project description
Multi Flow - Concurrent Streaming Proxy
A CLI tool that accelerates media streaming by parallelizing range requests. Acts as a middleware to convert single-threaded streaming into multi-threaded transfers.
Problem Solving
- Slow Streaming Playback: Media players (mpv/VLC) use single-threaded streaming, unable to utilize full bandwidth.
- Multi-WAN Underutilization: Users with multi-link ISPs can't benefit from aggregated bandwidth during streaming.
How It Works
- Starts a local HTTP server as proxy
- Creates mapped URL for your media resource
- Splits every incoming Range request into parallel chunks
- Reassembles chunks in-order for seamless playback
Features
- 🚀 Parallel chunk downloading
- 🔄 Automatic retry mechanism (5 retries/chunk)
- 🔗 Connection pooling & reuse
- 🧩 Dynamic chunk sizing (default: 1MB chunks)
- 🔄 Follows redirects (max 3 hops)
- 📦 Smart filename detection
Installation
pip install mflow
Usage
- Start the proxy server:
mflow --port 8080 --connections 8
- Use the mapped URL in your player:
http://localhost:8080/stream?url={YOUR_MEDIA_URL}
- Play through any player supporting HTTP streaming:
mpv "http://localhost:8080/stream?url=https://example.com/video.mp4"
Configuration Options
Option | Description | Default |
---|---|---|
-p/--port |
Listening port | 80 |
-c/--connections |
Max parallel connections per stream | 4 |
-s/--chunk-size |
Download chunk size (e.g., 1M, 512K) | 1M |
-r/--retry |
Max retries per chunk | 3 |
--log-level |
Logging verbosity | INFO |
Example
Start server with 16 connections and 2MB chunks:
mflow --port 9000 --connections 16 --chunk-size 2M
Play 4K video through proxy:
mpv "http://localhost:9000/stream?url=https://media.example.com/4k-demo.mkv"
Notes
- Server acts as pass-through - no data is stored locally
- Supports most HTTP servers (including HTTPS sources)
- Connection pool is shared between all streaming sessions
- Terminate with Ctrl+C when not needed
For debugging use:
mflow --log-level DEBUG
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mflow-1.2.1.tar.gz
(12.7 kB
view details)
Built Distribution
mflow-1.2.1-py3-none-any.whl
(13.3 kB
view details)
File details
Details for the file mflow-1.2.1.tar.gz
.
File metadata
- Download URL: mflow-1.2.1.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
e095911d21e5d3e3200b58d0d9ec05a3efc26d89544c409d26240aca13adad29
|
|
MD5 |
a9c9d6a529b9d376cea5342201c6437a
|
|
BLAKE2b-256 |
30ccc44864eff0e9fa26ee53deab59bc649e25c68af9aa4bbe213a70134b1dd2
|
File details
Details for the file mflow-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: mflow-1.2.1-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
612b7eda2e9aadbfcbaa1f10da50580803e27ce342a089d0bc6636fdc65b8ff1
|
|
MD5 |
0610e37d0d3d9a2c298358279e1b7388
|
|
BLAKE2b-256 |
e278b9300f4b0e0160443c8e727cccc140ef072ea9158cfaac6ca0e34e9eef42
|