Skip to main content

MD-AME

Autonomous YouTube production engine — dimension-parameterized media pipeline with PostgreSQL state machines.

5 min read·Intermediate·Concept·Aug 25, 2026
projectautonomous systems

MD-AME

What Was Built​

MD-AME (Multi-Dimensional Autonomous Media Engine) is a fully autonomous media production and distribution pipeline. The system ingests trend signals, generates video scripts, renders assets via FFmpeg, and publishes to social platforms — designed for unattended extended operation with weekly human strategic review.

The Problem​

Running multiple YouTube channels at scale requires automating the full loop: topic selection, script writing, voice synthesis, video rendering, and platform upload. Each channel (dimension) has different content strategy, safety profiles, and publishing accounts — but duplicating pipeline code per channel does not scale.

Architecture Summary​

All persistent state lives in Supabase PostgreSQL. No local filesystem state across runs. See the full system breakdown in MD-AME System Architecture.

Evolution and Milestones​

PhaseFocus
Infrastructure coreSchema migrations, RPC functions, idempotency utilities
State machineJob claiming, crash recovery, FOR UPDATE SKIP LOCKED
Voice + renderingEdge-TTS, Gemini fallback, FFmpeg subprocess only
DistributionYouTube adapter, quota reservation, resumable upload
Intelligence + scriptTrend scoring, hook audit, adversarial pass
Scene pipeline (4.5+)Scene decomposition, GPU pull workers, scene cache
Content safety (9)Prompt Firewall + Gemini safety classifier
Adaptive engineWeekly CTR/retention feedback with bounded deltas

Key Decisions​

DecisionRationale
Dimension parameterizationAdd niche via DB row, not code fork
PostgreSQL RPC transitionsAtomic multi-row updates; no app-level RMW
Fail safe, not gracefulVoice failure HALTs pipeline — no degraded output
GitHub Actions cron (Phase 1)Zero VPS cost during validation
Pull GPU workersNo inbound ports; natural backpressure
Forbidden: MoviePy, gTTSDeterministic FFmpeg subprocess only

Relationship to Other Projects​

MD-AME shares deterministic pipeline DNA with Shorts Factory (local video processing with SQLite checkpoints) but scales to cloud-hosted PostgreSQL, multi-dimensional parameterization, and autonomous trend-driven content generation.

Lessons Learned​

  1. Parameterization over duplication — one pipeline, many dimensions.
  2. Idempotency is correctness — crash recovery depends on deterministic keys.
  3. Quality gates are non-negotiable — one bad video can depress channel standing for weeks.
  4. Phase-gated complexity — GPU workers and scene cache come after core pipeline is stable.

Sources​