Skip to main content
On-screen translation translates text shown in the dubbed video: titles, captions, slides. It needs a finished dub, the scopes onscreen:write and credits:spend, and the plan feature onscreen. It works on the dubbed video even when the project has a lip-sync: to translate the text over the lip-synced video, use a localization run. Check the limits first. The video must be no longer than the plan’s limits.onscreen_max_video_seconds (getPlan); a longer one answers 422 onscreen_video_too_long with max_seconds. The target language must be renderable, or the answer is 422 onscreen_language_not_supported: GET /v3/languages?capability=onscreen lists those languages, which use Latin, Cyrillic or Greek script. A project takes one on-screen job at a time.

1. Estimate

ui_language is the language of the agent’s activity messages in the job. It does not affect the translation.
Besides eligible and total_minutes, details has the video’s length and the longest accepted (video_duration_seconds, max_video_duration_seconds), the plan’s price multiplier and the processing budget (max_processing_minutes).

2. Start it

3. Follow the job

Processing can take up to about 2.5 hours, plus any time in the queue, and longer when the job starts over. You do not need to hold a connection open: keep the job id and check back later. The job’s details shows how it goes: To stop a job that is still queued, call cancelJob. The minutes come back. Once it runs, or while it is charging, it cannot be canceled, and neither can the on-screen stage of a localization run.

4. Get the result

current_result.video.url is the latest successful result from any channel, and it stays there even if a newer job fails. current_result is null while the plan does not include onscreen. The finished job’s result.video and the output onscreen_video hold the same video. is_outdated is true after a later dub, and, for a result rendered over a lip-synced video, after a later lip-sync. Failed jobs and jobs canceled while queued are refunded. A 503 feature_temporarily_disabled means on-screen translation is paused for now: retry after Retry-After.

Start it automatically

To translate on-screen text right after the first dub of a new project, send onscreen in createProject. The estimate includes its minutes, charged after the first dub, and expected_cost_minutes caps them.
onscreen_auto_start on the project and auto_start in getOnscreenState report what happened, including a rejection. If that first dub is skipped or fails, the auto-start is rejected with project_not_dubbed, and a later dub does not start it: order it with createOnscreen. To also lip-sync, use a localization run instead: its block cannot be combined with onscreen.auto_start.

The whole program

translate_onscreen.py