← all work

Lecture Video Pipeline

A pipeline that turns a presenter recording and a slides recording into one branded 1080p lecture video - intro, outro, partner branding and Whisper subtitles - and uploads it to the video platform. Built during my rotation in Switch's video team.

Type
Work · Switch · Pipelines / Speech AI
Year
2026
Role
Developer in the VIDEO team - from the first CLI to the production service.

Cut render time from 34 to 16 minutes with parallel ffmpeg rendering, fixed an out-of-memory crash (7+ GB down to a constant 1.2 GB), and shipped it to production for a real university course.

  • 34 → 16 min render time, A/B tested
  • 7+ GB → constant 1.2 GB memory
  • In production for a real university course

The problem

Lecture recordings came as two separate videos - the person and the slides - and putting them together with branding and subtitles was slow manual work for every single video.

One job that takes the raw recordings and returns a finished, subtitled, branded video on the platform, fast and without babysitting.

What I did

  1. Built the compositor as a CLI first, then grew it into a FastAPI service with a queue worker and automatic upload to the video platform.
  2. Moved rendering from MoviePy to direct ffmpeg calls, split long videos into segments that render in parallel, and proved the gain with an A/B test.
  3. Found why long renders crashed: 8-9 overlay inputs pushed memory past 7 GB. Merging them into one input kept it at a constant 1.2 GB.
  4. Deployed it on a Linux VM with Ansible and systemd, with health checks and onboarding docs for the team.

Outcome

In production: renders 2.1x faster (34 to 16 minutes), a full job dropped from 82 to 14 seconds, and it delivered 18 videos with subtitles in four languages for a university course.

Stack

  • Python
  • FFmpeg
  • Whisper
  • FastAPI
  • Queue worker
  • Ansible
  • systemd
Next caseSympla Cockpit

© Johan Stefanesback home

Get in touch
Still building this site