Work Video spec pipeline

Automated product videos from one file per page

Making sixty-odd product-page videos by hand means repeating the same edit sixty times. This pipeline turns it into one short JSON spec per page. From that file it builds both the 30-second landscape video and the 9:16 social loop, and a validation step checks the spec first, so every render comes out right the first time.

Role
Sole author: spec format, validation, rendering and QC tooling
Stack
Python · ffmpeg · vidstab · Pillow · Flow
01

Every spec is checked before a single frame renders

Video mistakes are easy to miss: a caption that runs past its scene, a clip that starts too close to its end, a voiceover line too long to read in time. Rather than catching those by watching every render, the build step checks the spec up front.

It confirms that each beat's shots add up to the beat's length, that the timeline has no gaps, that captions stay inside their beat, that every clip has enough footage for its in-point and duration, and that each voiceover line can be read in the time it gets. Each check comes from a real mistake the tool now prevents.

02

Vertical social cuts reuse what the main video already got right

The 9:16 social cuts are their own edits, not crops, because a vertical frame keeps only about a third of the width. They re-use moments the main video has already vetted for camera shake, brightness and stray brand marks.

That keeps a social spec to about fifteen lines. A shot like `"from": "<page>:<beat>:0"` pulls in that page's clip, in-point, brightness correction and stabilisation data as-is. The only things written by hand are what a vertical frame actually changes: the pan, and a duration that lands on the music's bar grid.

03

Brightness matching that protects the picture

Shots that differ in brightness flash at the cut, so the tool measures each shot and nudges it toward a common level. It also reads each shot's histogram, so a frame that is bright because of one white object, like a sheet filling half the picture, is corrected gently instead of being pushed into the shadows.

Matching runs after the pans are chosen, because a pan changes what is in frame and therefore how bright it measures. When two shots simply belong to different lighting, the tool shows it, which points to picking a better-matched shot.

04

Stabilisation measured on the exact frame it is used on

Cropping to vertical magnifies camera shake, so shake is re-checked after the pans are set. That keeps every vertical shot as steady as the landscape original.

Stabilisation data is measured in pixels, so the vertical pass measures on the full-resolution source it renders from. Every correction is exactly the right size for the frame it is applied to.

05

What it moved

Reusable across every page in the catalog
21 of 30s
Tools, from footage survey to QC
15
Hand-authored per page; the rest is generated
1 file