open source · MIT · python 3.11+

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.

6 stages · 1920×1080 MP4 · 0 vendor lock-in
bash — direktor
$ 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)
What is direktor?

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.

Problem → solution

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.
Features

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.

See all features →

How it works

Text in. Six stages. MP4 out.

Each stage checkpoints to disk, so you can stop, hand-edit, and resume at any point.

stage 1

Script

GPT-4 turns your text into a single-narrator podcast script.

openai · gpt-4-turbo
stage 2

Narration

BARK synthesises the spoken audio track.

replicate · suno-ai/bark
stage 3

Transcript

Distil-Whisper produces timestamped chunks.

replicate · distil-whisper
stage 4

Prompts

GPT-4 writes one image prompt per ~30s segment.

openai · gpt-4-turbo
stage 5

Images

FLUX-schnell renders the 16:9 stills.

replicate · flux-schnell
stage 6

Compose

FFmpeg stitches audio + stills + overlays into MP4.

local · ffmpeg

Walk through every stage →

Code showcase

Drive 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.

Honest numbers

What direktor is, in figures

6
resumable pipeline stages
1080p
1920×1080 MP4 output
3
providers: OpenAI · Replicate · your S3
MIT
open-source licence

No throughput or quality benchmarks are claimed — output quality depends on your script and the models you configure.

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.