OJCLabs

AI Automation + Content Systems

Ai Is Mid Autonomous Media.

Fully automated multi-platform media pipeline that transforms single RSS input into distributed content across Spotify, TikTok, YouTube, and blog. Zero manual intervention.

Client: Personal Media BrandTimeline: 12 weeksTeam: 1 engineer
100% autonomousDaily publishing
4Platforms automated
8 min/episodeProduction time
95%Automation success


System architecture.

How it's built.

Component
Purpose
Technology
Reasoning
RSS Ingestion
Monitor and ingest podcast RSS feeds automatically
n8n RSS trigger + webhook architecture
Real-time monitoring without polling overhead
Content Enrichment
Extract metadata, generate summaries, enrich content
Flask API + GPT
Structured JSON-only outputs for database consistency
Voice Generation
Convert text to natural speech for audio content
Google Text-to-Speech (Chirp)
High-quality voices, multilingual support, API reliability
Visual Generation
Generate images and source video footage
Google Imagen + Pexels API
AI image generation + stock video library access
Video Rendering
Stitch audio, video, captions into final rendered video
Docker + ffmpeg + caption overlay logic
Containerized media processing, frame-accurate synchronization
Storage
Store content metadata, track processing status
Supabase (PostgreSQL)
Real-time updates, relational data model, edge functions
Distribution
Publish to multiple platforms automatically
Spotify RSS, TikTok API, YouTube API, WordPress API
Native platform APIs for reliable publishing
Monitoring
Track success rates, catch failures, alert on issues
Custom dashboard + Telegram bot
Real-time visibility into automation health

Engineering process.

How it was built.

Constraint AuditWeek 1–2
  • Mapped entire manual workflow (32 distinct steps identified)
  • Identified automation opportunities and technical blockers
  • Defined data schema for content metadata tracking

Workflow diagram, technical specification, risk assessment

Architecture DesignWeek 3–4
  • Designed multi-layer system architecture
  • Created agent prompt specifications (JSON-only outputs enforced)
  • Defined webhook event flows and error handling

System architecture diagram, API contracts, database schema

Core Automation BuildWeek 5–8
  • Built n8n workflows for RSS monitoring and content ingestion
  • Developed Flask API for content extraction and enrichment
  • Implemented GPT agents with structured prompts
  • Created Supabase database schema with proper indexing

Working ingestion and processing pipeline

Media GenerationWeek 9–10
  • Integrated Google TTS for voice synthesis
  • Built ffmpeg video rendering logic in Docker container
  • Implemented caption overlay with frame-accurate timing
  • Integrated Pexels API for visual asset sourcing

End-to-end media generation pipeline

Distribution & DeploymentWeek 11–12
  • Integrated platform APIs (Spotify, TikTok, YouTube, WordPress)
  • Implemented error handling and retry logic
  • Built monitoring dashboard and Telegram alerting
  • Stress-tested with 50+ episodes

Production-ready automated system


Engineering challenges.

What broke. How we fixed it.

Media Synchronization Accuracy

Problem

ffmpeg rendering required frame-accurate sync between audio, video, and captions. Timing mismatches caused captions to appear 1–3 seconds off.

Constraint

Video frame rates (30fps) vs audio sampling rates (44.1kHz) vs caption timing (millisecond precision). Off-by-one errors compounded over longer videos.

Solution

Built custom timing engine converting all timestamps to frame-based indices. Added pre-render validation for caption placement accuracy. Buffer frames added for subtitle transitions.

Outcome

Caption sync: 99.8% accuracy (within 100ms). Rendering failures: 23% → <2%.

AI Content Consistency

Problem

AI-generated summaries varied in length (50–500 words) and tone. Database schema required consistent field lengths.

Constraint

GPT ignores length constraints in standard prompts. Temperature settings affect consistency. Each episode has different content complexity.

Solution

Strict JSON schema validation in prompts. Token counting logic to enforce max lengths. Multi-pass validation (generate → validate → fix).

Outcome

Schema consistency: 94% on first pass. Manual intervention: 40% → 6%.

Docker Resource Management

Problem

ffmpeg consumed 4–8GB RAM per process. Running multiple renders simultaneously crashed the server.

Constraint

VPS with 8GB RAM total. Peak: 3 concurrent renders = 24GB needed. No server upgrade possible mid-project.

Solution

Single-threaded rendering queue. Container resource limits (6GB RAM, 2 CPU cores). Off-peak scheduling (2am–6am).

Outcome

Uptime: 99.9%. Render queue: 2-hour average delay. Zero crashes in production.

Platform API Rate Limiting

Problem

TikTok API limited to 100 uploads/day. Pexels API limited to 200 requests/hour. Batch processing hit both limits.

Constraint

Enterprise API tier not viable at project scale. Requests needed to be distributed across available windows.

Solution

Caching layer for Pexels results in Supabase. Exponential backoff with retry. 80% threshold alerts. Requests distributed across 24-hour window.

Outcome

API limit hits: zero in production. Success rate: 95% first attempt.


Measured impact.

Results. Numbers only.

Operational efficiency

Production time: 4–6 hours → 8 minutes (97% reduction)

Manual steps: 32 → 2 (quality review + approval only)

Platform distribution: 1 → 4 platforms (4x reach)

Automation coverage: 0% → 95%

Technical performance

Automation success rate: 95%

System uptime: 99.9%

Media rendering: 1080p @ 30fps standard

Processing queue: real-time, no backlog

Infrastructure footprint

Labor saved: 20–25 hours/week

Infrastructure footprint: single VPS + standard API tiers

Scalability headroom: 10x current volume, no infrastructure changes


Related.

Related systems.


Get started

Need similar architecture?

We build systems for operators serious about scale. If you're ready to invest in infrastructure that compounds, let's design your system.

Start a diagnosticExplore all systems