> ## 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

> [card] [Intro & Outro](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/intro-outro.md)
>
> Automatically add opening/closing sequences

> [card] [Brand Elements](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/brand-elements.md)
>
> Overlay logos, watermarks, and graphics

> [card] [Audio Overlay](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/audio-overlay.md)
>
> Add background music and sound effects

> [card] [Dynamic Ads](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/dynamic-ads.md)
>
> Insert personalized ads per viewer

> [card] [Dynamic Streams](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/dynamic-streams.md)
>
> Generate multiple versions from one source

> [card] [Word Counter](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/word-counter.md)
>
> Add analytical text overlays

> [card] [Chess Montage](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/chess-montage.md)
>
> Auto-compile highlight reels from long videos

## Timeline Architecture

![Timeline Architecture Diagram](https://mintcdn.com/videodb/6KL5X6-sIPSRpEUt/assets/editor-sdk/timeline-architecture.webp?fit=max\&auto=format\&n=6KL5X6-sIPSRpEUt\&q=85\&s=f5bb2dfed99b8ec5aaffc483fb40d8eb)

**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

> [card] [Timeline Architecture](https://docs.videodb.io/pages/act/programmable-editing/timeline-architecture.md)
>
> Deep dive into the 4-layer model

> [card] [Clip Parameters](https://docs.videodb.io/pages/act/programmable-editing/clip-parameters.md)
>
> All available clip options

> [card] [Aspect Ratio Control](https://docs.videodb.io/pages/act/programmable-editing/aspect-ratio-control.md)
>
> Handle different video dimensions

> [card] [Caption Asset](https://docs.videodb.io/pages/act/programmable-editing/caption-asset.md)
>
> Add text overlays and subtitles

## Explore Use Cases by Category

### Video Enhancement

> [card] [Intro & Outro](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/intro-outro.md)
>
> Auto-add opening and closing sequences

> [card] [Brand Elements](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/brand-elements.md)
>
> Add logos, watermarks, and graphics

> [card] [Audio Overlay](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/audio-overlay.md)
>
> Add background music and sound effects

### Dynamic Content

> [card] [Dynamic Ads](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/dynamic-ads.md)
>
> Insert personalized ads per viewer

> [card] [Dynamic Streams](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/dynamic-streams.md)
>
> Generate multiple versions from one source

### Analysis & Compilation

> [card] [Word Counter](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/word-counter.md)
>
> Add analytical text overlays

> [card] [Chess Montage](https://docs.videodb.io/examples-and-tutorials/programmatic-editing/chess-montage.md)
>
> Auto-compile highlight reels from videos


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.