# Weydub Media Localization (`weydub/weydub-media-localization`) Actor

Remove burned-in captions, extract timed SRT with full-frame OCR, translate and dub video, or translate text inside an image. Preview a request, submit with your own Weydub API credentials, then check the job and download the result.

- **URL**: https://apify.com/weydub/weydub-media-localization.md
- **Developed by:** [Weydub Team](https://apify.com/weydub) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $32.50 / 1,000 full-frame ocr srts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Weydub Video and Image Localization

Turn the subtitles in a video into an SRT file, remove burned-in captions, dub spoken dialogue, or translate the text in a product image. This Actor uses your own [Weydub API account](https://weydub.com/docs/api/).

| Operation | Source | Result |
|---|---|---|
| Remove subtitles | Video with captions in the bottom 18% of the frame | Cleaned video using Lite removal |
| Extract subtitles | Video with visible text; select its language | Timed SRT from full-frame OCR |
| Translate and dub | Video with speech you have permission to process; select two languages | Dubbed video with translated captions; original burned-in text remains |
| Translate an image | Product photo, label or banner; select two languages | Image with translated text |

**Try a preview.** Leave the default image and keep **Submit a billable media job** off. Run the Actor and inspect `preview` in the dataset. This makes no Weydub API request. For a video, replace the sample image URL with your own video URL.

**Process one file with your own account.** Enter your Weydub credentials in the two secret fields, turn on submission and run once. Save the returned `jobId` and `nextOperation`. Submitting a second time creates another job. Weydub processing uses your own account's [credits and rates](https://weydub.com/vip/pricing-detail/); your Apify plan governs the Actor run.

**Process one file through Apify Store billing.** In an Apify Store paid run, leave both Weydub secret fields empty, provide a stable **Request key for Store billing**, choose a processing operation and turn on submission. The Actor detects the paid Store run and sends the file through Weydub's merchant gateway; the stable key lets a restarted run resume the same job instead of creating another charge. Preview and status operations remain read-only. Store pricing and the final output charge are controlled by the published Actor pricing.

**Get the file in this run.** Turn on **Wait for my download link** when submitting. Open the resulting dataset row: `sourceSubtitles` downloads the SRT, `video` opens a cleaned or dubbed MP4, and `output` opens the translated image. Waiting uses Apify runtime. If the file is still processing when the Actor stops waiting, the row includes the original `jobId`.

**Check later.** Leave waiting off to return the job ID immediately. To retrieve an existing result, start a run with **Check a video or subtitle job** or **Check an image job**. Replace the source URL with the numeric job ID and use the same Weydub credentials. The dataset tells you what to do next:

| `state` | Next step |
|---|---|
| `processing` | Wait and check the same ID again. This does not create a job. |
| `ready` | Open `sourceSubtitles` for an OCR SRT, `video` for a cleaned or dubbed MP4, or `output` for a translated image. `files` lists the result fields available on this row. |
| `failed`, `unknown` or `missing-output` | Follow `nextAction`. Keep your job ID when asking for help. |

**Did a run stop before it showed your ID?** Open its default key-value store and look for `WEYDUB-SUBMISSION`. If it contains a `jobId`, use a status run to retrieve the result. If it says `submitting` with no ID, check your Weydub job history first. Starting a new processing run can spend credits twice.

[Subtitle removal](https://weydub.com/subtitle-removal/) · [Subtitle extraction](https://weydub.com/subtitle-generator/) · [Video translation](https://weydub.com/video-translator/) · [Image translation](https://weydub.com/image-translator/).

# Actor input Schema

## `operation` (type: `string`):

Choose what to produce or check a job you already submitted.

## `input` (type: `string`):

For a new job, supply a directly downloadable HTTPS media URL. To check an existing job, enter only its numeric ID.

## `source` (type: `string`):

OCR: language visible in the frame. Dubbing: spoken language. Image translation: language printed on the image.

## `target` (type: `string`):

Used for dubbing and image translation. Ignored for erasure, OCR and status checks.

## `submit` (type: `boolean`):

Off previews a creation request without sending it. Status checks only retrieve the existing job.

## `requestKey` (type: `string`):

For Apify Store billing, use a stable key for this file and operation, such as episode-001-ocr. It prevents a retry from creating a second billable job. Leave empty when using your own Weydub credentials.

## `waitForResult` (type: `boolean`):

For submissions using your Weydub credits. Keep this run open while the file is processing. If it takes longer, the dataset gives you the original job ID to check later. Waiting uses Apify runtime.

## `appKey` (type: `string`):

Required when submitting or checking a job. Not needed for preview.

## `appSecret` (type: `string`):

Use the secret for your own Weydub API account. Never put this in the media URL.

## Actor input object example

```json
{
  "operation": "image",
  "input": "https://gc100.cdn.izhaoli.cn/ve_material_image/A-00b4943646344cfc/e2d6dd82903f4059bd94c9b660f5f7b6/1782789120948.webp",
  "source": "zh",
  "target": "en",
  "submit": false,
  "waitForResult": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "input": "https://gc100.cdn.izhaoli.cn/ve_material_image/A-00b4943646344cfc/e2d6dd82903f4059bd94c9b660f5f7b6/1782789120948.webp"
};

// Run the Actor and wait for it to finish
const run = await client.actor("weydub/weydub-media-localization").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "input": "https://gc100.cdn.izhaoli.cn/ve_material_image/A-00b4943646344cfc/e2d6dd82903f4059bd94c9b660f5f7b6/1782789120948.webp" }

# Run the Actor and wait for it to finish
run = client.actor("weydub/weydub-media-localization").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "input": "https://gc100.cdn.izhaoli.cn/ve_material_image/A-00b4943646344cfc/e2d6dd82903f4059bd94c9b660f5f7b6/1782789120948.webp"
}' |
apify call weydub/weydub-media-localization --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,weydub/weydub-media-localization"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Kf4p4M653a68biihw/builds/NQc7gAAbJkDeZWyvJ/openapi.json
