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

# Video Dubbing

> Dub videos into multiple languages with AI voice synthesis

<a href="https://colab.research.google.com/github/video-db/videodb-cookbook/blob/main/examples/Dubbing%20-%20Replace%20Soundtrack%20with%20New%20Audio.ipynb" target="_blank">
  <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab" noZoom />
</a>

## Overview

VideoDB makes video dubbing incredibly simple with AI-powered translation and voice synthesis. With just **one function call**, you can dub your videos into multiple languages while preserving the original speaking style and timing.

No need for complex audio editing, timeline manipulation, or third-party tools. VideoDB's `coll.dub_video()` handles everything automatically.

## Prerequisites

<Note>
  Ensure you have VideoDB installed in your environment and an API key from [VideoDB Console](https://console.videodb.io). The first 50 uploads are free with no credit card required!
</Note>

```bash theme={null}
!pip install videodb
```

## Connect to VideoDB

Connect to VideoDB using your API key:

<CodeGroup>
  ```python Python theme={null}
  import videodb

  # Connect to VideoDB
  api_key = "your_api_key"
  conn = videodb.connect(api_key=api_key)
  coll = conn.get_collection()
  ```

  ```javascript Node.js theme={null}
  import { connect } from 'videodb';

  const conn = await connect({ apiKey: process.env.VIDEO_DB_API_KEY });
  const coll = await conn.getCollection();

  console.log("Connected to VideoDB");
  ```
</CodeGroup>

## Upload Your Video

Upload the video you want to dub. For this example, we'll use an English video:

<CodeGroup>
  ```python Python theme={null}
  # Upload the original video (English)
  video_url = "https://www.youtube.com/watch?v=0e3GPea1Tyg"
  video = coll.upload(url=video_url)

  print(f"Video uploaded: {video.id}")
  ```

  ```javascript Node.js theme={null}
  // Upload the original video (English)
  const videoUrl = "https://www.youtube.com/watch?v=0e3GPea1Tyg";
  const video = await coll.uploadURL({ url: videoUrl });

  console.log(`Video uploaded: ${video.id}`);
  ```
</CodeGroup>

### Preview the Original

```python Python theme={null}
video.play()
```

## Dub Your Video

<Tip>
  Here's where the magic happens! Dub your video into any supported language with a single function call:
</Tip>

<CodeGroup>
  ```python Python theme={null}
  # Dub the video into Hindi
  dubbed_video = coll.dub_video(
      video_id=video.id,
      language_code="hi"  # Hindi
  )

  print(f"Video dubbed successfully: {dubbed_video.id}")
  ```

  ```javascript Node.js theme={null}
  // Dub the video into Hindi
  const dubbedVideo = await coll.dubVideo(
      video.id,
      "hi"  // Hindi
  );

  console.log(`Video dubbed successfully: ${dubbedVideo.id}`);
  ```
</CodeGroup>

That's it! VideoDB automatically dubbed your video.

## View the Dubbed Video

Generate and play your dubbed video:

```python Python theme={null}
dubbed_video.play()
```

<iframe className="w-full aspect-video rounded-xl" src="https://console.videodb.io/player?url=https://stream.videodb.io/v3/published/manifests/5dd7e078-0ecb-4b23-89bd-968e557c98a6.m3u8" title="Dubbed Video Example" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />

## Supported Languages

VideoDB supports dubbing into many languages. Simply change the `language_code` parameter:

| Column 1   | Column 2 | Column 3             | Column 4 |
| ---------- | -------- | -------------------- | -------- |
| Language   | Code     | Language             | Code     |
| Spanish    | `es`     | Japanese             | `ja`     |
| French     | `fr`     | Korean               | `ko`     |
| German     | `de`     | Chinese (Simplified) | `zh`     |
| Italian    | `it`     | Arabic               | `ar`     |
| Portuguese | `pt`     | Russian              | `ru`     |
| Hindi      | `hi`     | … and more!          |          |

### Example: Dub into Spanish

```python Python theme={null}
# Dub the same video into Spanish
spanish_dubbed = coll.dub_video(
    video_id=video.id,
    language_code="es"  # Spanish
)

print(f"Spanish version created: {spanish_dubbed.id}")

# Play the Spanish version
spanish_dubbed.play()
```

## Use Cases

<CardGroup>
  <Card title="Content Localization" icon="globe">
    Reach global audiences by dubbing your content into multiple languages
  </Card>

  <Card title="Educational Content" icon="book">
    Make learning materials accessible in students' native languages
  </Card>

  <Card title="Marketing Videos" icon="bullhorn">
    Create localized versions of promotional content
  </Card>

  <Card title="Entertainment" icon="film">
    Dub movies, shows, or vlogs for international viewers
  </Card>

  <Card title="Accessibility" icon="universal-access">
    Provide dubbed versions for audiences who prefer audio in their native language
  </Card>
</CardGroup>

## Wrap-up

With VideoDB's `coll.dub_video()`, video dubbing is as simple as querying a database. No complex audio editing, no timeline manipulation - just one function call to create professional multilingual content.

<Tip>
  Start dubbing your videos today and reach audiences worldwide!
</Tip>

<Card icon="notebook" title="Explore Full Notebook" href="https://colab.research.google.com/github/video-db/videodb-cookbook/blob/main/examples/Dubbing%20-%20Replace%20Soundtrack%20with%20New%20Audio.ipynb">
  Open the complete implementation in Google Colab with all code examples.
</Card>

## Related Tutorials

<CardGroup cols={2}>
  <Card title="AI Voiceovers" icon="mic" href="/examples-and-tutorials/content-factory/voiceovers">
    Add professional narration to silent footage with AI voice synthesis
  </Card>

  <Card title="Translation & Dubbing Guide" icon="languages" href="/pages/act/generative-media/translation-and-dubbing">
    Deep dive into VideoDB's dubbing architecture and language support
  </Card>
</CardGroup>
