RemotionUI

Subtitle Translate

Dual-language stacked subtitles. Install with npx remotion-ui@latest add subtitle-translate.

PrimitiveData & mediaAdvanced

subtitle-translate30fps · 960×540
Install
$ npx remotion-ui@latest add subtitle-translate

Two languages stacked in one subtitle block.

import { SubtitleTranslate } from "@/remotion/primitives/subtitle-translate";

<SubtitleTranslate
  cues={[
    {
      text: "The transcript is the edit.",
      translation: "La transcripción es el montaje.",
      startMs: 0,
      endMs: 1450,
    },
  ]}
  languageLabels={["EN", "ES"]}
/>

The lines are not equals

The primary carries full weight and ink; the secondary is smaller and dimmer. Style them the same and the block reads as one four-line caption — the viewer has to work out which half is theirs before they can read either.

primary swaps which language leads without touching the data, so the same cue list serves both cuts of a video.

Timing

The secondary trails the primary by secondaryOffsetInFrames. Both landing on the same frame doubles the amount of new text at once; a few frames give the eye an order to take them in.

Nothing renders between cues. Unlike a single-line speaker track, this block is tall enough that holding it through a pause covers the shot.

Language tags

languageLabels puts a fixed-width tag beside each line, so both lines start on the same left edge even though their type sizes differ. Omit it when the languages are obvious from their scripts.

The two lines are deliberately unequal in weight and ink — styled the same, the block reads as one four-line caption and the viewer has to work out which half is theirs. The secondary trails by a few frames so the eye is given an order. Nothing renders between cues; the block is tall enough that holding it would cover the shot.

Agent notes

Install first, then import the copied source component locally. AI guide →

Import
@/remotion/primitives/subtitle-translate
  • Use when: frame-level motion primitives and reusable animation wrappers.
  • Customize: cues, primary, fontSize, secondaryScale, plus copied source for timing, layout, colors, and typography.
  • Rule: do not import this component from the remotion-ui npm package; it is copied into your project.

Usage

Example
import { SubtitleTranslate } from "@/remotion/primitives/subtitle-translate"; <SubtitleTranslate cues={[ { text: "The transcript is the edit.", translation: "La transcripción es el montaje.", startMs: 0, endMs: 1450, }, ]} languageLabels={["EN", "ES"]} />

API Reference

PropTypeDescription
cuesTranslatedCue[]A `SubtitleCue` plus `translation`.
primary"source" | "translation"Which language leads. Swaps without touching the data.
fontSizenumberSize of the primary line.
secondaryScalenumberSecondary size, as a share of `fontSize`.
languageLabels[string, string]Fixed-width tags beside each line, e.g. `["EN", "ES"]`.
backgroundColorstringPlate behind both lines. `transparent` drops it.
maxWidthnumberBlock width as a share of the frame.
enterInFramesnumberFrames a cue takes to arrive.
secondaryOffsetInFramesnumberFrames the second line trails the first by.
framenumberFrame override — pass the parent frame inside a `<Sequence>`.

Related

On this page