> ## Documentation Index
> Fetch the complete documentation index at: https://docs.videodb.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Edit and compose videos with code - no manual editing tools required

## Programmatic Editing

**Edit videos with code, not clicks.** Compose, overlay, trim, and transform videos using the Timeline API.

### When to Use This

* You need to add intros/outros to hundreds of videos
* You want to insert dynamic ads based on viewer data
* You're building a tool that adds branded elements automatically
* You need multi-version output (different aspect ratios, subtitles)

### What You'll Build

<CardGroup cols={3}>
  <Card title="Intro & Outro" icon="play" href="/examples-and-tutorials/programmatic-editing/intro-outro">
    Automatically add opening/closing sequences
  </Card>

  <Card title="Brand Elements" icon="image" href="/examples-and-tutorials/programmatic-editing/brand-elements">
    Overlay logos, watermarks, and graphics
  </Card>

  <Card title="Audio Overlay" icon="volume-2" href="/examples-and-tutorials/programmatic-editing/audio-overlay">
    Add background music and sound effects
  </Card>
</CardGroup>

<CardGroup cols={3}>
  <Card title="Dynamic Ads" icon="target" href="/examples-and-tutorials/programmatic-editing/dynamic-ads">
    Insert personalized ads per viewer
  </Card>

  <Card title="Dynamic Streams" icon="git-branch" href="/examples-and-tutorials/programmatic-editing/dynamic-streams">
    Generate multiple versions from one source
  </Card>

  <Card title="Word Counter" icon="hash" href="/examples-and-tutorials/programmatic-editing/word-counter">
    Add analytical text overlays
  </Card>
</CardGroup>

<Card title="Chess Montage" icon="crown" href="/examples-and-tutorials/programmatic-editing/chess-montage">
  Auto-compile highlight reels from long videos
</Card>

## Timeline Architecture

<img src="https://mintcdn.com/videodb/6KL5X6-sIPSRpEUt/assets/editor-sdk/timeline-architecture.webp?fit=max&auto=format&n=6KL5X6-sIPSRpEUt&q=85&s=f5bb2dfed99b8ec5aaffc483fb40d8eb" alt="Timeline Architecture Diagram" noZoom width="4284" height="3829" data-path="assets/editor-sdk/timeline-architecture.webp" />

**4 Layers:**

* **Asset** - The media file (video, audio, image)
* **Clip** - A segment with timing and parameters
* **Track** - A layer in the composition
* **Timeline** - The complete output

## How It Works

```python theme={null}
from videodb.editor import Timeline, Track, Clip, VideoAsset

timeline = Timeline(conn)
track = Track()
track.add_clip(0, Clip(asset=VideoAsset(id=video.id), duration=30))
timeline.add_track(track)

stream_url = timeline.generate_stream()  # Instant, no rendering
```

## Related Documentation

<CardGroup cols={2}>
  <Card icon="layers" title="Timeline Architecture" href="/pages/act/programmable-editing/timeline-architecture">
    Deep dive into the 4-layer model
  </Card>

  <Card icon="settings" title="Clip Parameters" href="/pages/act/programmable-editing/clip-parameters">
    All available clip options
  </Card>

  <Card icon="maximize" title="Aspect Ratio Control" href="/pages/act/programmable-editing/aspect-ratio-control">
    Handle different video dimensions
  </Card>

  <Card icon="type" title="Caption Asset" href="/pages/act/programmable-editing/caption-asset">
    Add text overlays and subtitles
  </Card>
</CardGroup>

## Explore Use Cases by Category

### Video Enhancement

<CardGroup cols={2}>
  <Card title="Intro & Outro" icon="play" href="/examples-and-tutorials/programmatic-editing/intro-outro">
    Auto-add opening and closing sequences
  </Card>

  <Card title="Brand Elements" icon="image" href="/examples-and-tutorials/programmatic-editing/brand-elements">
    Add logos, watermarks, and graphics
  </Card>

  <Card title="Audio Overlay" icon="volume-2" href="/examples-and-tutorials/programmatic-editing/audio-overlay">
    Add background music and sound effects
  </Card>
</CardGroup>

### Dynamic Content

<CardGroup cols={2}>
  <Card title="Dynamic Ads" icon="target" href="/examples-and-tutorials/programmatic-editing/dynamic-ads">
    Insert personalized ads per viewer
  </Card>

  <Card title="Dynamic Streams" icon="git-branch" href="/examples-and-tutorials/programmatic-editing/dynamic-streams">
    Generate multiple versions from one source
  </Card>
</CardGroup>

### Analysis & Compilation

<CardGroup cols={2}>
  <Card title="Word Counter" icon="hash" href="/examples-and-tutorials/programmatic-editing/word-counter">
    Add analytical text overlays
  </Card>

  <Card title="Chess Montage" icon="crown" href="/examples-and-tutorials/programmatic-editing/chess-montage">
    Auto-compile highlight reels from videos
  </Card>
</CardGroup>
