I Built a Fully Automated Short-Video Pipeline with Claude Code. Two Months In, Here's the Real Data

Mastery · 2026-07-18

Ugly part first: this pipeline has been running for two months, three accounts, close to a hundred videos published, and most of them have two-digit view counts. Nobody is making ¥100k a month here. It hasn't even broken even (the Volcano TTS and Suno bills come to a few hundred RMB).

I'm writing it up anyway, for two reasons. One, the pipeline itself is the highest-leverage piece of AI engineering I've built this year — the marginal human cost of producing content is now zero. It can't write the content yet, but it renders, QCs, publishes on a schedule, heals its own failures and reports to me over WeCom. I glance at the numbers on weekends. Two, precisely because volume is free, I got to run a clean controlled experiment, and the three things the data told me are more honest than any "how to grow an account" guide.

People who make content are short on throughput. People who build things are short on distribution. This post is for the second group. My group.

1. The whole pipeline: one JSON file to three platforms

The input to the chain is a JSON file — one piece of content, one file:

{
  "question": "视频开头的提问",
  "answer": "正文,几百字",
  "voice": "female-clone",
  "bgm": "bgm.mp3"
}

The output is a vertical video plus a cover, published automatically to Douyin and WeChat Channels. Six stages in between:

1. Rendering (Remotion). Video templates written in React: Q&A cards, an audio-player layout with line-by-line subtitles that follow the read, a two-host podcast, lyric cards. Restyling means editing a component; one template set feeds every kind of content. Gotcha: no Math.random() anywhere inside a frame-by-frame render, or you get flickering frames. Concurrency locked at 2 — system Chrome races when it opens multiple pages.

2. Voice (three tiers). Free tier is edge-tts. Quality tier is Volcano Engine voice cloning (paid, my daily driver). Local tier is F5-TTS voice cloning — 24 seconds of reference audio is enough to clone a voice, and the weights never leave the machine. Songs go through Suno instead: semi-automated over browser CDP to skip the API bill, two candidates per generation.

3. QC (whisper alignment). You don't ship AI-generated audio blind. Every finished video runs whisper alignment against the lyrics or the script, and anything under the threshold on "true alignment rate" doesn't pass. Suno's two candidates each get aligned too, and the higher score wins — what used to be me picking by ear is now a deterministic step.

4. Publishing (humanized CDP). There's no open API, so I drive a real browser over the Chrome DevTools Protocol: eased mouse paths, randomized landing points inside the target box, human-ish per-character typing rhythm. One script each for Douyin and Channels; they fill the title, attach topic chips, disable downloads, hit publish and wait for the success signal. This is the most fragile layer in the whole thing — half the gotcha list below comes from it.

5. Scheduling (slot state machine). A few publishing slots a day — podcast in the morning, song at noon, text card in the evening. Each slot is a daily state machine: idle → generate if inventory is empty → publishing, channel by channel → done/failed. Global dedup: a three-part topic/variant/channel key records history, and anything published once never publishes again.

6. Notification (WeCom). One terminal message per publishing cycle, marked per channel — Douyin ✓ Channels ✗ (reason) — with a screenshot of the current page attached automatically on failure. "I don't know why it failed" is the biggest mental tax an automated system charges you, and this one design drops it to near zero.

The whole thing runs on one Mac mini on launchd timers. The only thing in the cloud is a few-MB display service.

2. The real numbers, and the three things they taught me

Three accounts, close to a hundred pieces, two months. The numbers aren't pretty, but there's enough there to draw a shape.

1. Topic tier beats content quality

On the parenting account, 3 of 55 videos broke 1,000 views (top one 4,000+). The rest were mostly two digits. Group those 55 by topic type and the pattern is loud:

  • Everything that broke 1,000 was a decision question: public school or private, is daycare worth it, do we sign up for the bridge class before primary school. Things people actively search for, where there's real money and real agonizing.
  • Everything that flopped was opinion or technique: how to be genuinely present with your kid, what to ask after school. You can be completely right — with no search demand and no decision anxiety, the algorithm gives you the first burst of impressions and you sink.

Same production quality, and topic type alone accounts for a 100x spread in views. Quality sets your ceiling; topic type decides whether you have a floor at all. After that I re-sorted the entire publish queue into decision → reveal → opinion, and rewrote the opinion pieces into a decision angle before requeueing them.

2. Content-platform fit beats platform size

The same podcast video about getting pushed out at 35: 215 views on Douyin, 1,815 on WeChat Channels. Same for "you can't climb back up": 524 on Douyin, 1,601 on Channels. Not a coincidence — audience density for midlife topics is naturally higher on Channels, whose users skew older. It runs the other way too: the three best performers on the Douyin account were all 14-20 second clips, and the minute-and-a-half long cuts died across the board.

A platform isn't a checkbox in your distribution list, it's part of the content format. Piling up volume on the wrong platform is tuition you pay the algorithm.

3. The format locks the ceiling

My videos are static cards plus AI voice. Production cost is zero, but the ceiling is visible from here: they top out around a thousand views and never enter the ten-thousand-view recommendation pool. The reason isn't complicated — completion rate is the core metric in the recommender, and a static frame carrying 80 seconds of audio is structurally disadvantaged. Perfect topic selection just means using up all the space under the ceiling.

Punching through means changing the format — a real person on camera, real footage. That's the boundary of automation: a pipeline can make mediocre free, but breaking out takes a human. Seeing that boundary clearly is worth more than pretending it isn't there.

3. Nine things that broke, each worth one late night

  1. The platform's "failure" is not trustworthy. Script clicks publish, never sees the success signal, reports failure — and the video is actually live. If the scheduler believes that failure it retries, and you publish twice. Fix: before reporting failure, navigate to the posts list and check whether the thing is there. If it is, finish as success.
  2. There's more than one checkbox in the modal. The Channels "original content declaration" modal has two checkboxes, the first already checked by default. Anything that clicks "the first visible checkbox on the page" will never hit the terms one.
  3. Disabled state isn't in the disabled attribute. The "declare original" button's disabled is permanently false; the disabled state lives only in an xxx-btn_disabled class name. Click it without checking the terms and nothing happens, a hundred times over, while the script thinks it clicked successfully.
  4. Session cookies are a time bomb. The Channels login sits on two session cookies that die when the browser closes — Douyin's are all persistent. One browser crash and you're logged out. Fix: dump a cookie snapshot on a timer while the session is healthy and inject it back on logout, since the server-side session is usually still alive. If that fails, push a QR code to WeCom and have the script poll in place and continue automatically after the scan instead of erroring out.
  5. Keeping alive means beating the idle timeout too. Beyond cookies, the server-side session expires when idle. A launchd job navigates to a backend page every 25 minutes and restarts the browser if it crashed.
  6. SPA login detection has an in-between state. Navigating and checking the URL once after 5 seconds gets fooled by the async-auth intermediate state — I've had both false positives and false negatives. You have to poll until it's stable.
  7. Third-party products redesign whenever they feel like it. One Suno redesign swapped the lyrics editor for a late-mounting contenteditable; 13 seconds of waiting wasn't enough, it needed 40 plus a forced re-navigation partway through. Every DOM-based automation should be designed on the assumption that it shatters at any moment — and that when it shatters it sends a notification instead of failing silently.
  8. Shell pipeline exit codes will bite you. scp ... | grep -v warning sitting inside an && chain: grep returns non-zero when it matches nothing, the chain breaks, and the entire second half of the deploy never runs — without reporting an error.
  9. Notifications must be merged and must carry a reason. One message per failed channel is the same as no messages. One terminal summary per cycle, ✓/✗ per channel plus a one-line reason, is what actually takes the operational load to zero.

4. So what is this pipeline actually worth

Back to the opening question. It hasn't made money — was it worth it?

My answer comes in two halves. As an account business it hasn't proven itself: the format ceiling is right there, and breaking it takes content, not engineering. As a capability asset it already paid for itself. Once the marginal cost of producing content hits zero, "try it and see" becomes a free action — new topic, new platform, new time slot, all a one-line config change, and the data answers a week later. Nobody running accounts by hand gets to experiment at that speed.

And the real buyer for this thing may not be the algorithm at all. It's people: the ones who have a persona, expertise and trust, but no throughput. Offline businesses, niche practitioners, personal brands. What they're short of is exactly what I have too much of.

If you want to build one, or you're sitting on content assets and want a pipeline bolted to them, my contact is at the bottom of the page. Next post I'll pull apart the scheduler's state machine — the part of this system most worth stealing.


All data in this post is taken from real account dashboards; account identities have been scrubbed. The pipeline code carries a lot of platform-specific adaptation and isn't open source for now — happy to talk about deployment partnerships.

FOLLOW / SUBSCRIBE

If this was useful, don't lose the thread:

Tip jar

If this was useful, buy me a coffee. Alipay only — any amount is appreciated.

AI Coding leverage check

Want to know whether AI Coding is amplifying your judgment or just speeding up execution? The post is a generic framework — your role, judgment, visibility, and team context decide what to fix next.

More in Mastery