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
libcjsonlibrary for JSON parsing/serialization andlibcurlfor HTTP requests to TMDB. - Filesystem Interaction: Uses the high‑performance
cwalklibrary for recursive directory traversal, ensuring fast discovery of media files (.mp4,.mkv,.ogv,.webm). - Image & Media Processing: Calls out to
imagemagickandffmpegfor thumbnail generation, poster resizing, and metadata extraction. - Configuration: Reads
cmyflix.cfgfrom 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, andffmpeginstalled. - 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
cmyflixruns. - 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
- Home NAS Media Server – Quickly generate a web‑based catalog for family movies and TV shows on a Raspberry Pi.
- Educational Labs – Deploy lightweight media libraries in classrooms where hardware budgets are tight.
- IoT Edge Streaming – Embed a minimal streaming interface on an edge device that serves local media without external dependencies.
- 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
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
InvoicePlane
Self‑hosted invoicing and client management
Miniflux
Minimalist feed reader for privacy and speed
Otter Wiki
Minimalist Markdown Wiki Powered by Git
SquirrelMail
Webmail client for PHP-powered mailboxes
Shopware
Open‑source, headless commerce platform for modern online stores
Dittofeed
Open‑source omni‑channel customer engagement platform
