Turn a text file into a
narrated video.
direktor is a resumable, six-stage Python pipeline that reads a text file and produces a 1920×1080 MP4 — GPT-4 script, BARK narration, FLUX stills, FFmpeg composition. Own every stage instead of renting a black box.
$ pip install direktor
$ direktor build script.txt
# 1/6 script ✓ podcast script written
# 2/6 narration ✓ bark → narration.wav
# 3/6 transcript ✓ 14 timestamped chunks
# 4/6 prompts ✓ 14 image prompts
# 5/6 images ✓ flux-schnell → 14 stills
# 6/6 compose ✓ ffmpeg → output.mp4
→ output.mp4 (1920×1080, 06:12) A pipeline, not a magic prompt.
direktor is an MIT-licensed Python library and CLI from Skelf Research that turns a plain text file into a podcast-style video. It orchestrates six discrete, checkpointed stages — script generation, narration, transcription, image prompting, still generation, and FFmpeg composition — each writing a file to disk you can inspect, edit, and resume from. It is infrastructure for making narrated explainers you control, not a hosted video model.
The two ways text-to-video usually breaks
The black-box trap
- Single-shot models take a prompt and return an opaque clip — no script, no intermediates, nothing to edit.
- One weird frame means re-rendering (and re-paying for) the whole thing.
- Length caps out at seconds; long-form narration is out of scope.
- You are locked to one vendor's model and pricing.
The direktor way
- Six explicit stages, each a file on disk you can read, edit and version-control.
- Re-run only the stage that failed — a single FLUX call, not a full re-render.
- Designed for multi-minute narrated video from written material.
- Every model is an env var; swap TTS, image or LLM as better ones ship.
Built for makers who own the pipeline
Every design choice favours control, editability and cost you can predict.
Six resumable stages
Every stage writes a file to disk. Crash on stage 5 and you keep the script, audio and transcript — re-run skips the finished work.
Editable intermediates
The script, transcript, image prompts and stills are all plain files. Rewrite a weird FLUX prompt by hand, then resume from that stage.
Model-agnostic by env var
BARK_MODEL, FLUX_MODEL, GPT4_MODEL and DISTIL_MODEL are environment variables. Swap the TTS, image model or LLM without touching code.
Bring your own keys & bucket
No SaaS in the middle. You supply an OpenAI key, a Replicate token and an S3-compatible bucket (R2, B2). Spend stays on your accounts.
Podcast-style long-form
Built for 3–20 minute narrated explainers, not five-second clips. Cuts land at ~30s transcript boundaries with optional keyword overlays.
Scriptable CLI + Python API
Drive it from a Makefile, a GitHub Action, or a Python script. `direktor input.txt` in the shell, or `generate_video()` in code.
Text in. Six stages. MP4 out.
Each stage checkpoints to disk, so you can stop, hand-edit, and resume at any point.
Script
GPT-4 turns your text into a single-narrator podcast script.
openai · gpt-4-turboNarration
BARK synthesises the spoken audio track.
replicate · suno-ai/barkTranscript
Distil-Whisper produces timestamped chunks.
replicate · distil-whisperPrompts
GPT-4 writes one image prompt per ~30s segment.
openai · gpt-4-turboImages
FLUX-schnell renders the 16:9 stills.
replicate · flux-schnellCompose
FFmpeg stitches audio + stills + overlays into MP4.
local · ffmpegDrive it from the CLI or from Python
// stop after transcript, edit prompts, resume
$ direktor build talk.txt --stage 3
→ halted after transcript
# hand-edit image_prompts.json ...
$ direktor build talk.txt --resume
→ skips stages 1–3, renders stills, composes # the same pipeline from Python
from direktor import generate_video
generate_video(
input_path="talk.txt",
output_path="talk.mp4",
overlays=True, # keyword drawtext
)
Model ids are overridable via BARK_MODEL, FLUX_MODEL,
GPT4_MODEL and DISTIL_MODEL — config, not code.
What direktor is, in figures
No throughput or quality benchmarks are claimed — output quality depends on your script and the models you configure.
Everything, one click deep
Jump straight into any part of the project — the pipeline, real use cases, honest comparisons and the reference material.
Features →
The full feature set — resumable stages, editable intermediates, env-var model selection, CLI and Python API.
The pipeline →
A stage-by-stage walkthrough of all six stages, with the inputs, outputs and models each one uses.
Quickstart →
Install direktor and build your first 1920×1080 video in six steps, keys and bucket included.
Use cases →
Explainer videos, podcast-to-video, docs-to-video and research summaries — where direktor fits.
Compare →
How direktor stacks up against Runway Gen-3 and single-shot Sora/Veo prompting.
Blog →
Build notes on pipeline-based AI video: storyboards, compositing continuity and script-to-shot-list.
FAQ →
What it produces, prerequisites, model swapping, resuming from checkpoints, and licensing.
Glossary →
Plain definitions of pipeline, stage, checkpoint, segment, still, composition and every model used.
About →
What direktor is, what it is not, and the scope of the project from Skelf Research.
Ship your first video in minutes
Install the package, set three keys, point it at a text file. The quickstart walks the whole run end to end.