How it works

The six-stage pipeline

direktor is a chain of six small models rather than one big one. Text enters at stage 1; a 1920×1080 MP4 leaves at stage 6. Every stage writes a file you can inspect, edit and resume from — this is the whole design.

01

Script generation

OpenAI · gpt-4-turbo-preview

GPT-4 reads your input text and rewrites it as a single-narrator, podcast-style script — spoken cadence, no headings or bullet artefacts. This is the one stage that reshapes your words; everything after it is faithful to this script.

in  your text file out  script.txt
02

Narration (TTS)

Replicate · suno-ai/bark

BARK synthesises the script into a spoken audio track. The WAV is uploaded to your S3-compatible bucket so the next stage can fetch it by URL. Swap the voice or model with BARK_MODEL.

in  script.txt out  narration.wav
03

Transcription

Replicate · distil-whisper

Distil-Whisper transcribes the narration into timestamped chunks. These timestamps are what let direktor line images up with the audio — each ~30-second window becomes one visual segment.

in  narration.wav out  transcript.json
04

Image prompts

OpenAI · gpt-4-turbo-preview

For each transcript segment, GPT-4 writes one image prompt describing an illustrative still. This is the file most worth hand-editing — tune a prompt here and only its segment re-renders.

in  transcript.json out  image_prompts.json
05

Image generation

Replicate · black-forest-labs/flux-schnell

FLUX-schnell renders one 16:9 still per prompt. Images are cached per segment, so re-running after an edit only regenerates the prompts you changed. Point FLUX_MODEL elsewhere to try a different image model.

in  image_prompts.json out  stills/*.webp
06

Composition

Local · FFmpeg (concat demuxer + drawtext)

FFmpeg converts the stills to PNG, holds each for the duration of its transcript segment, lays the narration underneath, and (optionally) draws keyword overlays. The result is a 1920×1080 MP4. This stage is fully local and deterministic.

in  stills + narration.wav out  output.mp4

See it run

The quickstart takes you from pip install to output.mp4, including how to stop and resume any stage.