Programming a Short Film with Claude Opus 5.5: The MOTH Experiment Reveals a New Path for AI Creativity

Claude Opus 5.5 coded an entire short film about addiction using only Python—no AI video generators required.
A developer used Claude Opus 5.5 as a 'creative director who codes,' building the short film MOTH entirely with Python open-source tools (Pillow, OpenCV, NumPy, FFmpeg)—no diffusion-model video generators involved. After an initial render, the creator provided feedback on audio, pacing, and the ending, and the model revised accordingly. Compared to diffusion-based generation, this procedural approach offers stronger controllability, better cross-frame consistency, and lower compute requirements, though it suits abstract and geometric visual styles best.
A developer shared a fascinating experiment on Reddit: instead of using mainstream AI video generators, he had the large language model Claude Opus 5.5 create an entire short film through pure programming. The 2–3 minute work, titled MOTH, explores themes of addiction, relapse, and recovery, centered on the metaphor that "even if you miss the sunrise, the sun will still rise tomorrow."

An Unconventional Creative Experiment
Most AI video creation today relies on diffusion model-powered generators like Sora, Runway, and Pika — users enter a prompt, and the model outputs footage directly. What makes this experiment stand out is that the entire short film was generated entirely through code, without invoking any AI video generator.
The creator gave Opus 5.5 a single core concept: a short film about addiction, relapse, and recovery, built around the metaphor of "missing the sunrise but the sun still rises." From that starting point, the model independently designed the visual metaphors, wrote the shot script, built the animations, handled sound design, and completed the final edit.
This approach transforms the AI's role from "image generator" to "creative director and programmer." The model needed to understand an abstract theme, translate it into a visual language, and then implement those ideas frame by frame using technical means.
The underlying principle of mainstream AI video tools like Sora, Runway, and Pika is the Diffusion Model: starting from random noise, iteratively denoising to progressively generate images or video frames that match a text description. The advantage of this approach is the ability to produce highly realistic visuals, but at the cost of very limited precise control over the output — the same prompt yields different results every time, making it difficult for creators to enforce precise requirements like "the moth must be perched on the left side of the windowsill at the 3-second mark." Procedural Generation takes an entirely different path: every pixel's color and every frame's motion is explicitly determined by code logic, making results fully reproducible and fully auditable. These two paradigms aren't better or worse than each other — they simply make different trade-offs between controllability and expressiveness.
The Tech Stack: Rebuilding the Animation Pipeline with Python
The entire film was implemented using Python's open-source ecosystem:
- Pillow: Handles image drawing and compositing
- OpenCV: Manages image transformations and computer vision operations
- NumPy: Performs low-level numerical and matrix computations
- FFmpeg: Handles audio/video encoding, compositing, and final output
These are all mature libraries familiar to developers, but they've rarely been used end-to-end to "generate a narrative short film." The critical variable is Opus 5.5 — it needed to act like a skilled technical artist, using code to precisely control the composition, motion curves, color transitions, and audio-visual synchronization of every frame.
In other words, the model needed not just artistic understanding, but the knowledge of how to implement that artistry algorithmically. This places significant demands on the model's code generation capability, spatial reasoning, and understanding of animation pacing.
This toolchain has deep roots in traditional animation and visual effects. Pillow (the modern fork of PIL) provides pixel-level image manipulation and compositing — essentially a "canvas" in code. OpenCV, originally built for computer vision research, offers affine and perspective transformations that can simulate camera movements like push, pull, pan, and tilt. NumPy's vectorized array operations make it efficient to batch-calculate coordinates, color gradients, and Bézier curve interpolations across frames. FFmpeg is the industry-standard Swiss Army knife for audio/video processing — virtually all professional video software relies on it under the hood for encoding and decoding. Combining all four into an automated rendering pipeline essentially recreates the core workflow of commercial animation software (like After Effects script rendering), replacing the graphical interface with open-source libraries.
Iterative Feedback: AI Needs "Polishing" Too
A noteworthy detail of the experiment is that the final result wasn't produced in a single pass. After the first render, the creator provided feedback on audio design, pacing, the handling of the relapse sequence, and the ending — then had Opus 5.5 rework it to produce the final version.
This process reveals the true nature of current AI creation: a model's first output is often just a starting point, and actually polishing a finished piece still depends on the aesthetic judgment and directional guidance of a human creator. The creator acts as producer and art director, identifying "what's off and which direction to change it," while the model translates that feedback into concrete code revisions.
The division of labor in human-AI collaboration is quite clear here: humans guide creative direction and quality standards, AI handles execution and implementation. This mode is more controllable than "one-click generation" and better suited to the precision demands of professional creative work.
This "initial generation → human review → targeted feedback → regeneration" loop is known in software engineering as Prompt Iteration, or more broadly maps to applied Reinforcement Learning from Human Feedback (RLHF) scenarios. It reveals an important practical insight: for complex creative tasks, cramming all requirements into a single prompt often yields poor results. Providing context-specific feedback in stages allows the model to focus on concrete problems in each iteration rather than rebuilding the entire logic from scratch. This also means that "human oversight" remains indispensable in current AI creative workflows — not because the model lacks capability, but because aesthetic judgment in creation must be made based on perceivable output, and cannot be fully anticipated at the prompting stage.
Why This Approach Deserves Attention
Compared to using a video generator directly, code-based creation offers several potential advantages.
Greater controllability. Videos generated by diffusion models often feel like a "gacha pull" — it's difficult to precisely control the specific content of any given frame. With code-rendered visuals, every element's position, color, and motion is deterministic and reproducible.
Better consistency. AI video generators have long struggled with cross-frame consistency for characters and objects. Procedural generation inherently avoids this problem, since every frame is calculated from the same underlying logic.
Different cost and resource requirements. Pure code rendering doesn't require the massive inference resources of video generation models — it uses lightweight open-source libraries that run on an ordinary computer.
Of course, this approach has subject matter limitations. It's better suited to works with abstract metaphors and geometric visual styles; realistic, live-action imagery still requires video generators. MOTH's choice of symbolic moth-to-flame storytelling happens to align well with the expressive boundaries of programmatic drawing.
What This Means for Creators
The greatest value of this experiment may not lie in the film's artistic merit itself, but in what it demonstrates: a neglected creative path that treats a large model with strong coding abilities as a "creative partner who can program," using traditional procedural means to achieve artistic expression.
As large models continue to improve their coding capabilities, this style of "AI writing code to generate art" could branch into many more possibilities — data visualization animations, procedural music videos, interactive art installations, and more. It reminds us that AI creation isn't limited to the "generator" path. When a model is capable enough, it can act just like a human technical artist, using code to precisely translate a mental image onto the screen.
For creators who want to try this approach, the barrier to entry isn't too high: a basic Python environment setup, paired with a large model with strong coding capabilities, is all you need to start exploring this path of programmatic creation.
Related articles

Workbuddy for Absolute Beginners: How a Desktop AI Agent Fits Into Real Workflows
A beginner's guide to the Workbuddy desktop AI agent: installation, claiming credits, file management, and building automated workflows—compared with CodeX for fit and cost, helping professionals shift from AI question-askers to AI managers.

OpenAI's New Agent Stack: Computer Use, Decisions API, and Ultra-Fast Workflows
OpenAI Dev Day unveiled a new agent stack: Computer Use outperforms humans, Decisions API delivers ultra-low-latency classification via Luna, Agents API opens the same Computer Use capabilities, and GPT-6.1 Sol costs only one-seventh of Astra. Core updates, benchmark data, and developer insights.

Liang Wenfeng Open-Sources DeepInfo Inference Framework, Takes On U.S. Ban
DeepSeek open-sources its DeepInfo inference framework after its models, featuring GPU/CPU cross-pipelining, small-model prediction with large-model verification, and full Huawei Ascend and NVIDIA chip support—facing the U.S. federal ban head-on. This article analyzes its significance for AI deployment and open-source strategy.