Skip to content
videodb
VideoDB Documentation
  • Pages
    • Welcome to VideoDB Docs
    • Quick Start Guide
      • Video Indexing Guide
      • Semantic Search
      • Collections
      • Public Collections
      • Callback Details
      • Ref: Subtitle Styles
      • Language Support
      • Guide: Subtitles
      • How Accurate is Your Search?
    • Visual Search and Indexing
      • Scene Extraction Algorithms
      • Custom Annotations
      • Scene-Level Metadata: Smarter Video Search & Retrieval
      • Advanced Visual Search Pipelines
      • Playground for Scene Extractions
      • Deep Dive into Prompt Engineering : Mastering Visual Indexing
      • How VideoDB Solves Complex Visual Analysis Tasks
      • Multimodal Search: Quickstart
      • Conference Slide Scraper with VideoDB
    • Examples and Tutorials
      • Dubbing - Replace Soundtrack with New Audio
      • VideoDB: Adding AI Generated voiceovers to silent footage
      • Beep curse words in real-time
      • Remove Unwanted Content from videos
      • Instant Clips of Your Favorite Characters
      • Insert Dynamic Ads in real-time
      • Adding Brand Elements with VideoDB
      • Elevating Trailers with Automated Narration
      • Add Intro/Outro to Videos
      • Audio overlay + Video + Timeline
      • Building Dynamic Video Streams with VideoDB: Integrating Custom Data and APIs
      • AI Generated Ad Films for Product Videography
      • Fun with Keyword Search
      • Overlay a Word-Counter on Video Stream
      • Generate Automated Video Outputs with Text Prompts | VideoDB
      • Eleven Labs x VideoDB: Adding AI Generated voiceovers to silent footage
      • VideoDB x TwelveLabs: Real-Time Video Understanding
      • Multimodal Search
      • How I Built a CRM-integrated Sales Assistant Agent in 1 Hour
      • Make Your Video Sound Studio Quality with Voice Cloning
      • Automated Traffic Violation Reporter
    • Live Video→ Instant Action
    • Generative Media Quickstart
      • Generative Media Pricing
    • Video Editing Automation
      • Fit & Position: Aspect Ratio Control
      • Trimming vs Timing: Two Independent Timelines
      • Advanced Clip Control: The Composition Layer
      • Caption & Subtitles: Auto-Generated Speech Synchronization
      • Notebooks
    • icon picker
      Transcoding Quickstart
    • director-light
      Director - Video Agent Framework
      • Agent Creation Playbook
      • Setup Director Locally
    • Workflows and Integrations
      • zapier
        Zapier Integration
        • Auto-Dub Videos & Save to Google Drive
        • Create & Add Intelligent Video Highlights to Notion
        • Create GenAI Video Engine - Notion Ideas to Youtube
        • Automatically Detect Profanity in Videos with AI - Update on Slack
        • Generate and Store YouTube Video Summaries in Notion
        • Automate Subtitle Generation for Video Libraries
        • Solve customers queries with Video Answers
      • n8n
        N8N Workflows
        • AI-Powered Meeting Intelligence: Recording to Insights Automation
        • AI Powered Dubbing Workflow for Video Content
        • Automate Subtitle Generation for Video Libraries
        • Automate Interview Evaluations with AI
        • Turn Meeting Recordings into Actionable Summaries
        • Auto-Sync Sales Calls to HubSpot CRM with AI
        • Instant Notion Summaries for Your Youtube Playlist
    • Meeting Recording SDK
    • github
      Open Source
      • llama
        LlamaIndex VideoDB Retriever
      • PromptClip: Use Power of LLM to Create Clips
      • StreamRAG: Connect ChatGPT to VideoDB
    • mcp
      VideoDB MCP Server
    • videodb
      Give your AI, Eyes and Ears
      • Building Infrastructure that “Sees” and “Edits”
      • Agents with Video Experience
      • From MP3/MP4 to the Future with VideoDB
      • Dynamic Video Streams
      • Why do we need a Video Database Now?
      • What's a Video Database ?
      • Enhancing AI-Driven Multimedia Applications
      • Beyond Traditional Video Infrastructure
    • Customer Love
    • Join us
      • videodb
        Internship: Build the Future of AI-Powered Video Infrastructure
      • Ashutosh Trivedi
        • Playlists
        • Talks - Solving Logical Puzzles with Natural Language Processing - PyCon India 2015
      • Ashish
      • Shivani Desai
      • Gaurav Tyagi
      • Rohit Garg
      • Edge of Knowledge
        • Language Models to World Models: The Next Frontier in AI
        • Society of Machines
          • Society of Machines
          • Autonomy - Do we have the choice?
          • Emergence - An Intelligence of the collective
        • Building Intelligent Machines
          • Part 1 - Define Intelligence
          • Part 2 - Observe and Respond
          • Part 3 - Training a Model
      • Updates
        • VideoDB Acquires Devzery: Expanding Our AI Infra Stack with Developer-First Testing Automation

Transcoding Quickstart

Welcome to the VideoDB Transcoding Service! Quickly convert any type of video into MP4 or HLS outputs. Follow this straightforward guide to ingest your source video, transcode it, and manage your jobs seamlessly.
Input Limits
Capability
Limit
Max Resolution
4K (3840 × 2160)
Max Frame Rate
100 fps
Max File Size
8 GB
Audio Support
AAC, MP3, or mute
There are no rows in this table

Output Options:

Only MP4 or streaming(HLS) is possible.
Supported resolutions are 360p (SD), 720p and 1080p (HD)
Supported frame-rates are 30fps and 60fps only.

Need larger files or custom pipelines? Contact or reach out to us on

1. Install and Setup

Install and import the SDK:
!pip install videodb

import videodb
conn = videodb.connect(api_key="YOUR_API_KEY")

2.Quickstart Example:

Use this Python snippet to transcode your first video:
from videodb import TranscodeMode, VideoConfig, AudioConfig, ResizeMode

job_id = conn.transcode(
source="https://example.com/sample.mp4",
callback_url="https://example.com/webhooks/videodb",
mode=TranscodeMode.lightning, # or TranscodeMode.economy
video_config=VideoConfig(
resolution=360,
framerate=24,
resize_mode=ResizeMode.crop # crop | fit | pad
),
audio_config=AudioConfig(
mute=True # or False
)
)

print(f"Job queued ➜ {job_id}")

3. Configuration Reference

TranscodeMode

Mode
Ideal for
Notes
lightning
Fast response time
Optimized for speed (higher cost)
economy
Batch jobs
Cost-sensitive
There are no rows in this table

ResizeMode

Value
Behavior
crop
Crop edges to fill target aspect ratio
fit
Scale uniformly with letterboxing
pad
Add black bars to fill remaining space
There are no rows in this table

VideoConfig

Field
Type
Default
Notes
resolution
int
720
Height in pixels (auto-calculates width)
quality
int
23
CRF (Constant Rate Factor), lower is better
framerate
int or None
Source
Adjust frame rate (max 100 fps)
aspect_ratio
str or None
Source
e.g., 16:9, 1:1, None to retain original
resize_mode
ResizeMode
crop
How to adjust aspect ratio
There are no rows in this table

Quality presets (CRF)

Label
CRF Range
Best Use
Visually Lossless
18–20
Archival
Good Quality
21–23
General delivery
Lower Quality
24–28
Web, previews
There are no rows in this table

AudioConfig

Field
Type
Default
Notes
mute
bool
False
True removes audio track
There are no rows in this table

4. Job Lifecycle

Submit Job: `conn.transcode() → Status: pending
Processing: Fetch & encode → Status: processing
Complete: Webhook triggers (success or error)
Check job status:
job = conn.get_transcode_details(job_id)
print(job.status) # pending | processing | completed | failed
print(job.output) # Available URL when completed

5. Webhook Payloads

Success

{
"success": true,
"data": {
"job_id": "<job_id>",
"output": "<transcoded_output_url>"
},
"message": "Transcode job completed"
}

Failure

{
"success": false,
"job_id": "<job_id>",
"code": "invalid_source",
"message": "Failed to download source media",
"reason": "HTTP 403 Forbidden"
}
Respond with HTTP 2xx to confirm receipt.

6. Error Codes

Code
Meaning
Fix Suggestions
invalid_video_config
Resolution/FPS/CRF error
Check ≤4K, ≤100 fps
invalid_audio_config
Conflicting audio params
Adjust audio config
invalid_source
URL not accessible
Check URL accessibility
invalid_media
Unsupported media format
Convert to supported format
internal_server_error
Unexpected error
Retry or contact support
There are no rows in this table

Example Job output

{
"audio_config":{
"mute":false
},
"completed_at":1749564100,
"cost":0.1058,
"created_at":1749564014,
"input_details":{
"audio_codec":"mp3",
"duration":634.53, # in seconds
"format":"None",
"framerate":30,
"resolution":"1920x1080",
"size":263.34, # in mb
"video_codec":"h264"
},
"job_id":"<job_id>",
"mode":"lightning",
"output":"<mp4_url>",
"output_details":{
"audio_codec":"aac",
"duration":635.06,
"format":"mp4",
"framerate":30,
"resolution":"1920x1080",
"size":253.84,
"video_codec":"h264"
},
"source":"<source_url>",
"started_at":1749564014,
"status":"completed",
"video_config":{
"aspect_ratio":"None",
"codec":"libx264",
"framerate":"None",
"height":"None",
"quality":"None",
"resize_mode":"crop"
}
}
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.