Pipeline
How it works
A recording enters the panel as a single file. Six stages later it exists as one version per language, each already queued for the account that will publish it.
1. Transcription
The audio track is separated from the video and transcribed with word-level timestamps. The result is not just a script — it is a list of segments, each with a start and end time. That timing is what every later stage depends on.
Long recordings are compressed to audio before transcription. A three-minute 4K recipe video is a large file, but its audio track is small, and only the audio matters here.
2. Isometric translation
Each segment is translated with a constraint most translation ignores: the result has to take roughly the same time to say as the original. A Portuguese line that runs 2.4 seconds cannot become a German line that runs 4 seconds — the video would drift away from the voice.
All segments for a language go out in a single request rather than one request per segment. That keeps the whole translation stage to one round trip per language, and avoids hammering the model provider with dozens of small calls.
3. Dubbing
Each language has its own assigned voice. The narration is synthesised segment by segment, and the video is retimed so the images still land with the words: segments where the translated line runs longer are slowed slightly, segments where it runs shorter are tightened.
Slowdowns beyond a certain point would visibly stutter, so those segments get frame interpolation first — intermediate frames are generated before the slowdown, which keeps the motion smooth instead of juddering.
The finished narration passes through a fixed audio chain: loudness normalisation to broadcast standard, a high-pass filter, three corrective EQ bands, gentle compression and a final limiter. Every language ends up at the same perceived volume, which matters when the same recipe plays on six different pages.
4. On-screen subtitles
Subtitles can be switched on per language and per format. When enabled, words appear on screen in time with the voice, one at a time, in the style short-form viewers expect.
The timing does not come from guesswork. The speech synthesis step returns the exact moment each character is spoken, and the subtitles are built from that. It is the same synthesis request either way — only the response format differs — so subtitles cost nothing extra.
5. File preparation
Everything is delivered at 1080×1920, including material recorded in 4K. Social platforms re-encode uploads and serve at most 1080p, so producing larger files only costs processing time and disk space. Downscaling early also makes every later filter roughly four times cheaper.
Each output file gets its own container metadata written fresh, so the six language versions of one recipe are distinct files rather than six copies carrying identical creation data.
6. Scheduled publishing
Nothing is published the moment it finishes rendering. Each channel has its own configured time, and finished versions wait in a queue until their slot arrives. A background scheduler checks the queue on a fixed interval and releases whatever is due.
Because the check is "everything due up to now" rather than "everything due exactly now", a machine that was switched off at the scheduled time publishes the backlog when it comes back instead of silently dropping it.
Running on the operator's machine
PolyglotMedia is a desktop application. It runs a local web panel, a task queue, a message broker and FFmpeg on the operator's own computer. Nothing about it is hosted publicly — there is no sign-up, no tenancy, no customer data.
- Application layer
- Django 5 (Python), local web panel
- Background work
- Celery workers with a Redis broker
- Media processing
- FFmpeg, GPU-accelerated where the machine has a supported card
- Storage
- Local database on the operator's machine
- External services
- Speech-to-text, translation and speech synthesis providers, used per video