Quickstart

From text file to video in six steps

direktor runs on your machine and calls your own OpenAI and Replicate accounts. You need Python, FFmpeg, two API keys and an S3-compatible bucket.

1 · Prerequisites

Install Python 3.11 or newer and FFmpeg, and make sure both are on your PATH:

python --version   # 3.11+
ffmpeg -version    # any recent build

2 · Install direktor

pip install direktor

3 · Set credentials

direktor reads these from the environment. It never bundles keys or proxies your requests:

export OPENAI_API_KEY="sk-..."
export REPLICATE_API_TOKEN="r8_..."

# S3-compatible bucket for the intermediate audio
export S3_ENDPOINT="https://.r2.cloudflarestorage.com"
export S3_BUCKET="direktor-scratch"
export S3_ACCESS_KEY_ID="..."
export S3_SECRET_ACCESS_KEY="..."

Bucket options include Cloudflare R2 and Backblaze B2 — anything that speaks the S3 API.

4 · Write your text

Save the material you want narrated as a plain UTF-8 file. A blog post, a research note or a lecture script all work:

echo "Your article text goes here..." > talk.txt

5 · Build the video

direktor build talk.txt

The six stages run in order and write output.mp4 at 1920×1080:

direktor build talk.txt
# 1/6 script      
# 2/6 narration     bark → narration.wav
# 3/6 transcript    14 chunks
# 4/6 prompts       14 image prompts
# 5/6 images        flux-schnell → 14 stills
# 6/6 compose       ffmpeg → output.mp4

6 · Iterate on any stage

Halt after a stage, edit its output, and resume without recomputing the earlier stages:

# stop after the transcript
direktor build talk.txt --stage 3

# edit image_prompts.json by hand, then resume
direktor build talk.txt --resume

Or drive it from Python

from direktor import generate_video

generate_video(
    input_path="talk.txt",
    output_path="talk.mp4",
    overlays=True,
)

Ready for the details?

The full stage-by-stage reference lives in the pipeline guide and the official docs.