← All writing

End-to-End Content Automation Pipeline

One video URL in — bilingual subtitles, a publish-ready article, a subtitled video, and platform drafts out. Hands-off, end to end.

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 drafts come out — automatically, with each step recoverable and re-runnable.

The full pipeline

download → transcribe → translate → write article → export → burn subtitles → publish drafts → 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 a publish-ready article from the transcript using an LLM.
  5. Export the article + images into the creator’s knowledge base automatically.
  6. Burn subtitles into a final MP4 (ffmpeg/libass).
  7. Publish drafts to platforms (below).
  8. Archive the finished task.

Every step is independent and opt-in; a SQLite-backed state machine drives orchestration, so any step can be retried, paused, or resumed without redoing the rest.

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 and deliberate safety guards that create a draft only and never auto-publish.
  • Official-API publishing — pushes a styled HTML article + cover as a draft via the platform’s official API (token auth, idempotent re-runs).

Reliable web automation, scheduling, and resilient retries are the core of this system.

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.
  • Built on Python with a SQLite state machine + event log, a worker pool, and a long-running daemon; ~12,000 lines of Python across a monorepo, 49+ test files.

Design principle: the ability packages (download, transcribe, translate, render, burn) 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, and cost-aware, provider-agnostic LLM plumbing — all production-shaped.