Skip to main content

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

  1. Slow Streaming Playback: Media players (mpv/VLC) use single-threaded streaming, unable to utilize full bandwidth.
  2. Multi-WAN Underutilization: Users with multi-link ISPs can't benefit from aggregated bandwidth during streaming.

How It Works

  1. Starts a local HTTP server as proxy
  2. Creates mapped URL for your media resource
  3. Splits every incoming Range request into parallel chunks
  4. 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

  1. Start the proxy server:
mflow --port 8080 --connections 8
  1. Use the mapped URL in your player:
http://localhost:8080/stream?url={YOUR_MEDIA_URL}
  1. 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

  1. Server acts as pass-through - no data is stored locally
  2. Supports most HTTP servers (including HTTPS sources)
  3. Connection pool is shared between all streaming sessions
  4. Terminate with Ctrl+C when not needed

For debugging use:

mflow --log-level DEBUG

Project details


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)

Uploaded Source

Built Distribution

mflow-1.2.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

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

Hashes for mflow-1.2.1.tar.gz
Algorithm Hash digest
SHA256 e095911d21e5d3e3200b58d0d9ec05a3efc26d89544c409d26240aca13adad29
MD5 a9c9d6a529b9d376cea5342201c6437a
BLAKE2b-256 30ccc44864eff0e9fa26ee53deab59bc649e25c68af9aa4bbe213a70134b1dd2

See more details on using hashes here.

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

Hashes for mflow-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 612b7eda2e9aadbfcbaa1f10da50580803e27ce342a089d0bc6636fdc65b8ff1
MD5 0610e37d0d3d9a2c298358279e1b7388
BLAKE2b-256 e278b9300f4b0e0160443c8e727cccc140ef072ea9158cfaac6ca0e34e9eef42

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page