0dev.team
← All work

Auto-editing pipeline: long episodes into vertical clips

Takes a long episode, finds the self-contained stories in it and builds a vertical clip from each, framed on the speaker

Task

Speech recognition turns the episode into text with timings, scene and face detection map who is on screen, and a language model picks the stories that stand on their own. A virtual camera then plans the frame path along the speaker, and the render adds subtitles and a hook caption. Scenes and faces are computed in the cloud: a cancelled run shuts its cloud kernel down instead of leaving it computing, and a failed run is picked up again after a pause until its attempts run out. Finished clips land in a feed on the phone and go on to publishing.

How it works

  1. Download and speech recognition
  2. Scenes and faces: TransNetV2, SCRFD
  3. Story search by a language model
  4. Virtual camera: frame path optimisation
  5. Render: ffmpeg on VideoToolbox
  6. Feed on the phone → publishing

What had to be solved

The feed took minutes to load — and the internet was not the cause

The connection gave 140 Mbit/s, yet the clips crawled. A measurement showed that the tunnel between the phone and the Mac had never once set up a direct connection and was routing everything through a fallback server in Singapore. Along the way a hole turned up: the tunnel as it stood would have opened clip publishing to the whole internet. The hole was closed first, then the feed was rebuilt: instead of 273 requests and 10.7 MB of posters before the first frame — one screen.

Commits

  1. 65b11fc01.09.2026the phone reached the Mac via Singapore, and the feed opened with 273 requests
  2. 8051b0327.08.2026cancelling a run shuts down the cloud kernel instead of leaving it computing
  3. a5cd63e27.08.2026an abandoned row held a kernel slot for eleven hours after the kernel died
  4. ae282f828.08.2026stopping the cutting made an episode cost more than a run with no cap
  5. c46219c30.08.2026the downloader stopped lying “Conversion failed” and hanging at 1%