MediaFusion Documentation

repository·main·Indexed 19 days ago

https://github.com/mhdzumair/mediafusion

An open-source streaming platform and API (version 6.1.3) that aggregates content from Debrid, P2P, and indexers for clients like Stremio, Kodi, and web browsers. Includes documentation for deploying via Docker Compose (Standard, High Availability, and Minimal profiles), installing browser extensions for Firefox and Chrome for automatic torrent detection, and hosting on ElfHosted.

Tokens
69.1K
Snippets
196
Records
345
Agent score
72%

What's inside mediafusion

  1. Overview of MediaFusion capabilities

    main

    MediaFusion is an open-source streaming platform that aggregates streams from various sources and manages playback through multiple clients.

    Key Capabilities:

    • Rich Catalogs: Supports movies, series, live TV, and sports in over 50 languages.
    • Streaming Methods: Supports Debrid services (Real-Debrid, AllDebrid, Premiumize, Torbox, etc.), Cloud storage (PikPak, Seedr.cc, OffCloud), and direct P2P torrent streaming.
    • Smart Filtering: Ability to sort streams by quality, size, seeders, cached status, audio tracks, and HDR format.
    • Multi-client Support: Works with Stremio addons, Kodi addons, in-browser players, and acts as a Torznab indexer for Radarr/Sonarr.
    • Deployment Options: Can be self-hosted via Docker Compose, Kubernetes, or bare binary, or used via managed/community instances.
  2. What is MediaFusion?

    main
    MediaFusion is an open-source streaming platform designed to aggregate stream sources and manage playback through various providers. It functions as a full server that handles catalog browsing, stream discovery, debrid resolution, live TV, and user profile management. It delivers content to clients such as Stremio, Kodi, or web browsers.
  3. Overview of MediaFusion features and deployment options

    main

    MediaFusion is an open-source streaming platform that aggregates streams from various sources and manages playback across multiple clients.

    Key Capabilities

    • Streaming Providers: Supports Debrid & P2P streaming via Real-Debrid, AllDebrid, Premiumize, Torbox, and 8+ other providers.
    • Stream Aggregation: Integrates with Prowlarr, Jackett, public indexers, Torrentio, Zilean, and RSS feeds.
    • Content Catalogs: Provides movies, series, live TV, and sports in over 50 languages.
    • Client Support: Works with Stremio, Kodi, browser players, and provides a Torznab API for integration with Radarr and Sonarr.
    • Security: Uses AES-256 encryption for user credentials within manifest URLs.

    Deployment Methods

    • Self-hosting: Available via Docker Compose, Kubernetes, or direct binary deployment.
    • Managed: Use community-hosted instances for zero-setup usage.
  4. Overview of MediaFusion configuration sections

    main

    MediaFusion configuration is organized into several functional sections. You can find detailed documentation for each in their respective files:

    • Core Settings: Addon name, URL, branding, and logging.
    • Database & Redis: PostgreSQL and Redis configuration, including connection pools.
    • Streaming Providers: Debrid services, P2P, and provider limits.
    • Content Sources: Scrapers, RSS feeds, Prowlarr, and Zilean.
    • MediaFlow Proxy: Proxy configuration for debrid and live streams.
    • Security: API password, encryption, and rate limiting.
    • Stream Formatting: Custom templates for stream titles and descriptions.
  5. Deployment methods overview

    main

    MediaFusion offers four primary deployment strategies:

    • Direct Binary Deployment: Best for minimal footprint and environments where Docker is not available. Uses pre-built Linux, macOS, or Windows binaries.
    • Local Development: Best for active development. Uses Rust for the API server and Docker for databases.
    • Docker Compose: Best for simple deployments and testing. Full stack orchestration via Compose.
    • Kubernetes: Best for production and scalable environments. Requires kubectl and follows a specific K8s guide.
  6. Understand the status of the Python API

    main

    The Python API located in the python-deprecated/api/ directory is not used in production. Most files in this directory (including app.py, main.py, routers/, and middleware.py) are kept for reference only and are not served.

    If you are looking to integrate with or deploy the active API, you must use the Rust service located in services/api/.

  7. Deployment methods for MediaFusion

    main

    MediaFusion can be deployed using several methods depending on your infrastructure and expertise level:

    • ElfHosted: A fully managed private instance with zero operational overhead.
    • Docker Compose: Recommended for home servers, VPS, and beginners.
    • Direct Binary: Best for minimal footprints where no container runtime is available.
    • Kubernetes: Designed for production environments requiring horizontal scaling.
    • Local Development: Used for contributing to the MediaFusion codebase.

    !!! warning "Always pin a version tag in production" Never use latest or beta in production. Pin to a specific release tag such as mhdzumair/mediafusion:6.0.0.

  8. Database migrations in MediaFusion

    main
    Database migrations are handled automatically at service startup. There is no requirement to run a separate migration command during deployment. For advanced operations like checking migration status or performing rollbacks, refer to the dedicated migration documentation.
  9. Manage User Profiles and Watchlists

    main

    MediaFusion uses encrypted user profiles. Each profile can contain:

    • Up to 5 streaming providers
    • Custom stream filters
    • Personal API keys (e.g., TMDB, RPDB)
    • Custom catalog preferences

    Watchlist Syncing: You can sync your debrid provider's watchlist as a Stremio catalog using:

    • Trakt (via OAuth)
    • Simkl (via OAuth)
    • Real-Debrid watchlist
    • Manual watch history
  10. Self-hosting requirements for MediaFusion

    main

    If you choose to self-host (Docker Compose, Kubernetes, or Direct Binary), you must provide or configure the following components:

    • PostgreSQL: Primary database (version 14+).
    • Redis: Cache and task queue (version 6+).
    • Publicly accessible URL: Required so that Stremio can reach your instance.

    Note: Docker Compose and Kubernetes deployment methods automatically handle the PostgreSQL and Redis setup for you. The Direct Binary method requires you to manage these separately.

  11. How Prowlarr integration works in MediaFusion

    main

    MediaFusion uses Prowlarr to aggregate torrent and Usenet indexers. It queries Prowlarr in two scenarios:

    1. Live Search: When a stream is requested and PROWLARR_LIVE_TITLE_SEARCH is set to true.
    2. Background Scheduler: During periodic re-searches for cached titles based on the PROWLARR_SEARCH_INTERVAL_HOUR setting.

    Prowlarr acts as the intermediary, querying its configured indexers and returning results to MediaFusion.

  12. Production recommendations for Kubernetes deployment

    main

    When moving from local Minikube testing to a production environment, implement the following:

    • Database: Use a managed PostgreSQL service (e.g., AWS RDS, Google Cloud SQL, Azure Database, Supabase) instead of running Postgres in-cluster.
    • Cache: Use a managed Redis service (e.g., ElastiCache, Cloud Memorystore) for resilience.
    • TLS/SSL: Use a proper ingress controller with cert-manager for TLS management instead of mkcert.
    • Resource Management: Explicitly set resource requests and limits on the MediaFusion deployment pods.