Skip to main content

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

Chess Montage

Auto-compile highlight reels from long videos

Timeline Architecture

Timeline Architecture Diagram 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

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

Explore Use Cases by Category

Video Enhancement

Dynamic Content

Analysis & Compilation