<!-- LLM_VERSION_INFO
FORMAT: text/markdown
CONTENT_TYPE: article
ORIGINAL_URL: https://bounti.ai/blog/engineering/declarative-video-ai
ALTERNATE_VERSION: blog/engineering/declarative-video-ai/index.html (text/html)
EXTRACTION_DATE: 2026-04-17T02:42:50.801Z

This is the markdown version with text-only content (images converted to alt-text).
For rich formatting with images, request the HTML version at: blog/engineering/declarative-video-ai/index.html
-->

# Declarative vs Procedural: Why Templates Beat Prompt-to-Video

There are two ways to make a video with code. One lets AI help. The other fights it. We explain the difference and why it matters for real estate marketing.

There are two fundamentally different ways to tell a computer how to make a video.

One says _what_ the video should contain. The other says _how_ to draw every frame.

This distinction, declarative versus procedural, shapes everything from how fast you can iterate to whether an AI can do the work for you. And it turns out it matters a lot more than most people think.

## Two Ways to Make a Video

Let's start with a simple example. You want to animate a blue circle moving across the screen.

### The procedural approach

In a procedural system, you write step-by-step instructions. “Create a circle at position (0, 0). On each frame, move it 2 pixels to the right. After 120 frames, stop.”

You control every detail. Frame rates. Easing curves. Exact pixel positions. The code reads like a recipe: do this, then this, then this.

[Manim](https://www.manim.community/), the Python library originally created by Grant Sanderson (3Blue1Brown) to produce his famous math videos, is a great example of the procedural approach. In Manim, you define a scene as a sequence of explicit animation steps:

```python
class CircleAnimation(Scene):
    def construct(self):
        circle = Circle(color=BLUE)
        self.play(Create(circle))
        self.play(circle.animate.shift(RIGHT * 3))
        self.play(FadeOut(circle))
```

Every animation is an explicit command. “Play this. Then play that. Then fade out.” The programmer choreographs every movement. This gives you extraordinary control. Manim can produce incredibly beautiful, precise animations, which is exactly why 3Blue1Brown's videos look the way they do.

### The declarative approach

In a declarative system, you describe the desired outcome. “There is a blue circle. It starts on the left and ends on the right. The transition takes 2 seconds.”

You do not write the animation loop. You do not manage frame counts. The system figures out the “how” for you. You just say what you want.

[Remotion](https://www.remotion.dev/) is a good example of this. Remotion lets you build videos using React, the same framework used to build web interfaces. You describe your video as a tree of components with props and timing:

```javascript
const MyVideo = () => (
  <Composition
    component={ListingVideo}
    durationInFrames={300}
    fps={30}
    width={1080}
    height={1920}
    defaultProps={{
      address: "123 Ocean Drive",
      price: "$1,250,000",
      photos: [photo1, photo2, photo3]
    }}
  />
);
```

Notice what is happening here. You are not telling the system how to animate anything. You are declaring what the video contains: an address, a price, some photos, a duration. The component itself decides how to render those props into a visual sequence.

## Why This Distinction Matters for AI

Here is where it gets interesting.

If your video system is declarative, then generating a video becomes a data problem, not a creative choreography problem. An LLM does not need to understand animation timing, easing functions, or pixel-level positioning. It just needs to produce the right data structure.

### Structured outputs make it even easier

There is another advantage that is easy to overlook. Declarative templates follow specific schemas. A listing video template expects a JSON object with fields like `address`, `price`, `beds`, and `template`. Each field has a defined type and set of valid values.

Modern LLMs have structured output as a first-class feature. You can give the model a JSON schema and it will produce valid, well-formed output every time. The animation might not win design awards, but the data structure is always correct: proper field names, valid types, no syntax errors.

## Three Levels of AI Video Generation

When you think about how AI can generate videos, there are really three levels of ambition.

### Level 1: Prompt to template (safe and fast)

The AI picks a pre-built template and fills in the data. The visual design is locked in. The AI's job is limited to understanding user intent and mapping it to the right template with the right content.

### Level 2: Prompt to full video (powerful but fragile)

The AI generates the entire video definition, choosing layouts, animations, colors, and timing from scratch. In a declarative system like Remotion, this means the LLM would generate a complete React component.

### Level 3: Prompt to video with a feedback loop

This is the most ambitious approach. The AI generates a video, then watches it, analyzes the result, and iterates. “The text is too small. The transition feels too fast. The logo is cut off.” Fix, re-render, repeat.

## Declarative Thinking Is Everywhere

This is not just a video problem. The declarative versus procedural tension shows up across every domain where AI meets creative output.

- **Web development** — React (declarative) versus jQuery (procedural). React won because declaring UI as a function of state is easier to reason about, and much easier for AI tools like Copilot to generate.
- **Mobile apps** — SwiftUI and Jetpack Compose (declarative) versus UIKit (procedural). The industry moved declarative because it is simpler, and AI code generation works dramatically better with declarative frameworks.
- **Infrastructure** — Terraform (declarative) versus shell scripts (procedural). You declare the desired state. The system figures out how to get there.
- **Data** — SQL (declarative) versus writing loops to filter arrays (procedural). You say what data you want, not how to fetch it.

## When to use which

Neither approach is universally better. The right choice depends on what you are building.

|  | Procedural (Manim, manual code) | Declarative Templates (Remotion) |
| --- | --- | --- |
| Best for | Long-form, one-of-a-kind content with custom animations | Short, repeatable content that varies by data |
| Creative ceiling | Unlimited. Every frame is fully controlled | Constrained by template design. High within those constraints |
| Speed per video | Hours to days per unique piece | Seconds to minutes. Change the data, re-render |
| AI compatibility | Difficult. AI must write animation logic | Natural. AI only needs to produce data |
| Skill required | Programming + animation design + taste | Template design once, then minimal per video |
| Examples | 3Blue1Brown explainers, custom brand films, documentary graphics | Real estate listings, social media ads |
| Scale | One at a time, artisanal | Thousands per day, automated |

## For Real Estate, Templates Win

All of this theory is interesting, but what does it mean in practice?

For real estate marketing videos specifically, the answer is clear: templates are the right abstraction. Here is why.

Real estate videos are repetitive by nature. Every listing needs the same types of videos: Just Listed, Open House, Price Reduction, Just Sold. The structure is predictable. The data changes, but the format does not.

This is exactly where declarative templates shine. A human designer creates the template once, pouring their taste and motion graphics expertise into every detail: the perfect easing curve on the price reveal, the exact moment the address fades in, the subtle parallax on the hero photo.

Then the AI fills in the blanks. New photos. New address. New price. Same professional result.

## What AI Cannot Do Yet

Let's be honest about where the boundaries are.

Typical video montages done by human editors involve a density of creative decisions that AI simply cannot replicate today. A skilled editor is simultaneously thinking about:

- **Timing** — Cutting on the beat. Holding a shot just long enough for emotional impact.
- **Positioning** — Text placement that accounts for safe zones, visual weight, and the viewer's eye path.
- **Taste** — Knowing that a slow dissolve feels elegant while a hard cut feels energetic.

Real-time video understanding, the ability for an AI to “watch” a rendered video and make these kinds of judgments, is still beyond current capabilities.

## The Sweet Spot

The pragmatic answer, the one that works today, is to combine human design with AI automation.

Humans design the templates. They make the hundreds of micro-decisions that create a professional result.

AI fills in the data. It extracts listing details, writes voiceover scripts, and maps everything to the right props.

That is the approach we took with Video Creator. Not because it was the simplest option, but because it was the one that actually worked.

> Declare the what. Design the how. Let AI handle the rest.
