Skip to content

What is MediaMoth?

MediaMoth is an open-source platform for building custom media processing workflows. Think of it as a programmable media factory—you design the assembly line, MediaMoth executes it at scale.

Whether you're transcoding a single video or orchestrating multi-step AI enhancement across thousands of files, MediaMoth gives you complete control over how your media gets processed. No usage fees, no vendor lock-in, runs entirely on your infrastructure.

Why MediaMoth Exists

Cloud media services are expensive. AWS MediaConvert charges per minute of processing. Azure Media Services bills for compute time. Proprietary SaaS platforms lock you into their ecosystem with monthly fees that scale with your usage.

MediaMoth flips this model: you own the infrastructure, you own the costs, you own the data.

Perfect for video platforms, content agencies, media archives, and anyone processing significant volumes of media who wants control without the cloud bill.

The Pipeline Philosophy

MediaMoth's core concept is simple: pipelines. A pipeline is a series of processing steps (nodes) that transform your media from input to output.

Single-step transcoding: A basic pipeline with one node that converts MP4 to WebM using FFmpeg.

Multi-step enhancement: Extract frames → AI upscale each frame → reassemble into 4K video.

Branching workflows: From one source file, simultaneously generate multiple outputs—4K for web, 1080p for mobile, audio-only for podcasts.

Pipelines are defined as graphs where nodes represent processing tasks. You chain them sequentially, branch them in parallel, or combine both. As long as there are no circular dependencies, it's valid.

MediaMoth figures out the execution order, parallelizes independent branches, and tracks progress automatically.

What You Can Build

MediaMoth handles any media workflow you can imagine:

  • Format standardization - Batch-convert your entire library to a consistent format and codec
  • Quality enhancement - Run videos through denoising, color correction, and upscaling pipelines
  • Multi-format delivery - Generate every resolution and format your platform needs from a single source
  • Custom processing - Integrate proprietary tools, third-party APIs, or machine learning models into your workflow

The included Video Service handles FFmpeg and HandBrake transcoding out of the box. Need something else? Build a custom worker using the Go API—audio processing, image manipulation, subtitle generation, whatever your use case demands.

How It Works

MediaMoth separates orchestration from execution. The platform manages workflow coordination while worker services handle the actual processing.

The Orchestration Layer

Four core services manage your media platform:

  • Workflow Service creates and coordinates pipelines. Define your processing workflows here, and workers automatically register their capabilities.
  • Job Service queues pipeline steps and tracks execution state. When a step completes, the next one triggers automatically.
  • Media Service manages metadata about your files—technical specs, processing history, asset information.
  • Search Service provides Elasticsearch-powered queries across pipelines, jobs, and media.

The Execution Layer

Workers do the actual processing. Each worker type handles specific tasks:

  • The built-in Video Service uses FFmpeg and HandBrake for transcoding
  • Custom workers let you integrate any processing logic you need

Workers pull jobs from the queue, process media, and report results. Multiple workers of the same type can run simultaneously—MediaMoth distributes work automatically.

Scaling Your Processing Power

Start with everything on one server. When you need more capacity, add more workers.

  • Single machine: Run all services locally for development or light workloads.
  • Distributed processing: Deploy workers across multiple machines. Point them at your shared Kafka and PostgreSQL instances. Jobs distribute automatically—no code changes, just configuration.

Need to process 100 videos simultaneously? Deploy 100 worker instances. Need even more? Keep adding workers. MediaMoth handles job distribution and coordination.

Kafka manages the work queue. PostgreSQL maintains state. Workers process independently. Simple horizontal scaling.

Who Should Use MediaMoth?

  • Video platforms processing user uploads need reliable transcoding at scale. MediaMoth handles format validation, multi-resolution encoding, and thumbnail generation without per-video charges.
  • Content creators managing large libraries want consistent quality. Build standardized enhancement pipelines—denoising, color grading, format conversion—and apply them across thousands of files.
  • Media agencies serving multiple clients need flexible workflows. Create client-specific processing pipelines with custom parameters, branding, and delivery formats.
  • Archival projects digitizing legacy content require long-running, complex workflows. Chain together restoration tools, format migrations, and quality improvements in repeatable pipelines.
  • Developers building media-heavy applications want programmatic control. The full API lets you trigger pipelines, monitor progress, and integrate processing into your application logic.

Technical Foundation

MediaMoth is built on production-grade infrastructure:

Written in Go for performance and concurrency. Uses Kafka for reliable job distribution and event streaming. PostgreSQL provides durable storage with per-service databases. Redis handles distributed locking and caching. Elasticsearch powers search across your entire platform.

The architecture uses event sourcing—every action is recorded as an immutable event. This gives you complete audit trails, the ability to replay history, and powerful debugging when things go wrong.

Deployed via Docker for consistent environments across development and production.

Requirements

MediaMoth is self-hosted, which means you need:

  • Infrastructure: Servers to run services (can start with one machine, scale to many)
  • Dependencies: Docker, Kafka, PostgreSQL, Redis, Elasticsearch
  • Technical knowledge: Comfort with command-line tools, Docker, and basic DevOps

Not a turnkey solution, but you get complete control in exchange for setup effort.

Next Steps

Ready to start building? Here's where to go next:

Released under the MIT License.