MCPSERV.CLUB
cmyflix

cmyflix

Self-Hosted

Fast DIY Netflix clone for Raspberry Pi and NAS

Active(70)
183stars
0views
Updated Jul 30, 2025
cmyflix screenshot 1
1 / 5

Overview

Discover what makes cmyflix powerful

`cmyflix` is a lightweight, self‑hosted media streaming platform written in **C** that aims to provide a minimal yet functional “Netflix clone” for low‑end hardware such as Raspberry Pi, Odroid, and other NAS appliances. The application scans a user‑defined media library, extracts metadata via the TMDB API, and generates static JSON databases. These databases are then used to render HTML5 pages that can be served by any web server, eliminating the need for a persistent backend. The core performance advantage stems from C’s low overhead and efficient use of `libcjson` for JSON handling, resulting in a ~30× speed increase over its original Go implementation.

Language & Runtime

Filesystem Interaction

Image & Media Processing

Configuration

Overview

cmyflix is a lightweight, self‑hosted media streaming platform written in C that aims to provide a minimal yet functional “Netflix clone” for low‑end hardware such as Raspberry Pi, Odroid, and other NAS appliances. The application scans a user‑defined media library, extracts metadata via the TMDB API, and generates static JSON databases. These databases are then used to render HTML5 pages that can be served by any web server, eliminating the need for a persistent backend. The core performance advantage stems from C’s low overhead and efficient use of libcjson for JSON handling, resulting in a ~30× speed increase over its original Go implementation.

Technical Stack

  • Language & Runtime: C (GNU GCC compatible), leveraging the libcjson library for JSON parsing/serialization and libcurl for HTTP requests to TMDB.
  • Filesystem Interaction: Uses the high‑performance cwalk library for recursive directory traversal, ensuring fast discovery of media files (.mp4, .mkv, .ogv, .webm).
  • Image & Media Processing: Calls out to imagemagick and ffmpeg for thumbnail generation, poster resizing, and metadata extraction.
  • Configuration: Reads cmyflix.cfg from the binary directory, $HOME/.config/cmyflix/, or /etc/cmyflix/. The config file controls media paths, TMDB API key, and optional password protection via an external JSON‑based login system.
  • Output: Produces a static html/ directory containing JSON databases and pre‑rendered HTML pages, which can be served by Nginx, Apache, or any lightweight HTTP server.

Core Capabilities

  • Automatic Library Generation: Scans hierarchical folder structures for TV shows and movies, automatically mapping seasons/episodes based on filename conventions.
  • Metadata Enrichment: Retrieves titles, overviews, posters, and ratings from TMDB; stores them in JSON for fast client‑side rendering.
  • Static Site Generation: Generates responsive, mobile‑friendly HTML pages with embedded JSON for client‑side navigation and playback.
  • Optional Authentication: Integrates with a separate JSON‑based login module (JSONlogin) for basic HTTP authentication of media content.
  • Extensible API: While primarily a static site generator, the JSON databases can be consumed by custom front‑ends or third‑party applications via simple HTTP GET requests.

Deployment & Infrastructure

cmyflix is designed for self‑hosting on resource‑constrained devices. It requires:

  • A POSIX‑compatible OS with libcjson, libcurl, imagemagick, and ffmpeg installed.
  • A TMDB API key for metadata lookups.
  • Sufficient disk space for media and generated thumbnails.

The application is container‑friendly; a minimal Dockerfile can expose the html/ directory as a volume, enabling quick deployment on Kubernetes or Docker‑compose stacks. For scalability, each node can generate its own static site and serve it via a CDN or reverse proxy, allowing horizontal scaling without shared state.

Integration & Extensibility

  • Plugin‑style Extensions: Developers can hook into the scanning process by modifying the C source or adding custom scripts that preprocess media files before cmyflix runs.
  • Webhooks: Since the output is static, developers can trigger rebuilds via CI/CD pipelines whenever new media is added to a shared NAS.
  • Custom Front‑End: The JSON databases are openly documented, enabling developers to build bespoke JavaScript front‑ends (React, Vue, Svelte) that consume the same data source.
  • Authentication: The optional JSON‑based login system can be swapped for OAuth or JWT if integrated with a separate authentication service.

Developer Experience

  • Configuration: Straightforward key‑value config file with clear defaults; no complex templating required.
  • Documentation: The README covers build dependencies, configuration paths, and folder structure expectations. While concise, it provides enough detail for developers to adapt the tool to their environment.
  • Community & Support: The project is maintained on GitHub with an active issue tracker. Contributions are welcome, and the codebase’s small size makes for rapid onboarding.

Use Cases

  1. Home NAS Media Server – Quickly generate a web‑based catalog for family movies and TV shows on a Raspberry Pi.
  2. Educational Labs – Deploy lightweight media libraries in classrooms where hardware budgets are tight.
  3. IoT Edge Streaming – Embed a minimal streaming interface on an edge device that serves local media without external dependencies.
  4. Custom Front‑End Projects – Use the JSON APIs as a backend for custom web or mobile applications that require media metadata and playback controls.

Advantages

  • Performance: Native C implementation delivers low latency scanning and JSON generation, ideal for constrained devices.
  • Simplicity: No need for a database server; all data lives in static JSON files, reducing operational overhead.
  • Flexibility: The output is pure HTML/JSON, making it agnostic to the hosting environment and easily integrated with any front‑end framework.
  • Licensing: Open source under a permissive license, allowing commercial use without licensing fees.

cmyflix strikes a balance between minimalism and functionality, offering developers a fast, self

Open SourceReady to get started?

Join the community and start self-hosting cmyflix today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
AGPL-3.0
Stars
183
Technical Specs
Pricing
Open Source
Database
None
Supported OS
Linux
Author
farfalleflickan
farfalleflickan
Last Updated
Jul 30, 2025