← All case studies
By , Founder of Rixin Kaiwu · · Updated

End-to-End Content Automation Pipeline

One video URL in; bilingual subtitles, an article, a subtitled video, and posts on three platforms out. In production on the open-source Runspool engine.

Built for a content-creator client; presented anonymized — client name, brand, and paths removed, source private. (“ContentFlow” is a working name.)

The problem

A creator was spending hours per video on a repetitive manual chain: download, transcribe, translate subtitles, write an article, burn subtitles, and publish to multiple platforms. Slow, error-prone, and impossible to scale.

ContentFlow turns that entire chain into a single command. One video URL goes in; finished, publish-ready assets and platform posts come out — automatically, with each step recoverable and re-runnable.

The full pipeline

download → transcribe → translate → write article → export → burn subtitles → publish → archive

  1. Download the source video, metadata, and cover image.
  2. Transcribe speech to subtitles with an ASR model (faster-whisper).
  3. Translate to bilingual subtitles via a multi-round LLM process — with strict line-count and timestamp preservation so timing never breaks.
  4. Write publish-ready articles from the transcript using an LLM, adapted per platform.
  5. Export the article + images into the creator’s knowledge base automatically.
  6. Burn subtitles into a final MP4 (ffmpeg/libass).
  7. Publish to three platforms (below).
  8. Archive the finished task into a structured media library.

Every step is independent and opt-in, and separate sub-workflows can regenerate just the article for one platform without touching the video.

Web automation & publishing

The part most relevant to automation projects:

  • Browser automation (Playwright) — logs in and creates a draft on a video platform (title, description, tags, cover, category) with cached login state.
  • Official-API publishing — pushes a styled HTML article + cover as a draft via a newsletter platform’s official API (token auth, idempotent re-runs).
  • Paid-community platform — publishes the long-form post directly, but only counts it as published once the platform’s API confirms it. If the post is rejected, it falls back to a draft and the task carries on; if the result can’t be confirmed, nothing is retried blindly. Posts are spaced out at randomized intervals.

What goes live automatically and what stays a draft is a per-platform, explicit decision — never an accident of the code.

Rebuilt on Runspool (October 2026)

The first version had its own SQLite state machine, event log, worker pool, and daemon. In October 2026 the orchestration moved to Runspool, my open-source, local-first workflow engine — and since October 8, 2026 the Runspool-based version runs in production.

  • The ability packages (download, transcribe, translate, write, render, burn) stayed as plain libraries with zero dependency on the engine — they moved over almost line for line.
  • Each business step is registered as a Runspool plugin; the app is a plugin bundle plus a profile, not a fork of the engine.
  • Runspool now provides the backbone: tasks as SQLite rows with an atomic state machine, retries, pause/resume, crash recovery, a bounded worker pool, and --json output an AI agent can drive.
  • Secrets are referenced by name only and resolved at run time — they never appear in config, logs, or errors.
  • Historical tasks were migrated with a read-only, row-by-row-verified migration, and the old system was kept intact for rollback.

Running a real production workload on Runspool is also how the engine gets hardened — several recent fixes came straight from this pipeline.

Engineering highlights

  • Multi-round LLM translation with three hard invariants: timestamps locked, line count preserved, and a deterministic fallback chain when a model call misbehaves — so output is always valid, never silently broken.
  • Provider-agnostic by design — LLM clients, ASR backend, downloader, and ffmpeg runner are all injected, so components are swappable and fully testable.
  • Python throughout: ~12,700 lines of application code with 84 test files.

Design principle: the ability packages never touch the database or each other — only the orchestration layer holds state. Clean, composable, and easy to extend with new steps or platforms.

What it demonstrates

Reliable Playwright/browser automation and official-API integrations, multi-step pipelines with state and recovery, a verified migration onto a reusable open-source engine, and cost-aware, provider-agnostic LLM plumbing — all running in production.