Skip to content

🎥 Make videos programmatically with React

Skills: Simplify caption timing instructions

Jonny Burger0d5929e3c8d1
diff --git a/packages/skills/skills/remotion-captions/display-captions.md b/packages/skills/skills/remotion-captions/display-captions.md
index 0e4d1cb365..db5e549473 100644
--- a/packages/skills/skills/remotion-captions/display-captions.md
+++ b/packages/skills/skills/remotion-captions/display-captions.md
@@ -33,31 +33,18 @@ Fetch its source code from https://www.remotion.dev/elements/captions/basic-capt
## Displaying captions alongside video content
-Keep each clip's video and captions inside the same `<Sequence>`,
-`<Series.Sequence>`, or `<TransitionSeries.Sequence>`. Put the clip's
-`trimBefore`, `durationInFrames`, and `playbackRate` on that shared parent so
-trimming or changing the speed affects both. For independently positioned
-clips, put `from` on the shared `<Sequence>` too. Do not repeat the shared trim
-or playback rate on the video or captions, which would apply it twice.
-
-Keep caption timestamps in milliseconds relative to the original media file.
-Do not add the clip's start time in the main composition or subtract its trim
-from the caption data. The shared parent maps that source time to the edited
-timeline. Give every captioned clip its own group and inline caption array;
-do not combine captions from multiple clips into one overlay outside the
-scene timeline. Moving, reordering, trimming, or deleting the group then
-affects its video and captions together.
-
-Putting captions inside a scene is insufficient if `trimBefore` or
-`playbackRate` is still applied only to `<Video>`: its sibling captions do not
-inherit those props. Apply them to the shared parent instead.
-
-The Caption editor writes back to the array literal on the selected
-`<BasicCaptions>` source node,
-so inline the captions directly in its `captions` prop. Passing a variable or
-component prop such as `captions={captions}` leaves no source array for the
-editor to update. If the captions were transcribed to a JSON file, copy its
-contents into the prop.
+Keep each clip's video and captions inside the same `<Sequence>`, `<Series.Sequence>`, or `<TransitionSeries.Sequence>`.
+Put the clip's `trimBefore`, `durationInFrames`, and `playbackRate` on that shared parent so trimming or changing the speed affects both.
+For independently positioned clips, put `from` on the shared `<Sequence>` too.
+
+Give every captioned clip its own group and inline caption array; do not combine captions from multiple clips into one overlay outside the scene timeline.
+Moving, reordering, trimming, or deleting the group then affects its video and captions together.
+
+Putting captions inside a scene is insufficient if `trimBefore` or `playbackRate` is still applied only to `<Video>`: its sibling captions do not inherit those props. Apply them to the shared parent instead.
+
+The Caption editor writes back to the array literal on the selected `<BasicCaptions>` source node, so inline the captions directly in its `captions` prop.
+Passing a variable or component prop such as `captions={captions}` leaves no source array for the editor to update.
+If the captions were transcribed to a JSON file, copy its contents into the prop.
Give the caption area a width and position it over the video. In this
1920px-wide composition, the 900px caption area is centered by translating it
@@ -171,15 +158,9 @@ export const MyComponent: React.FC = () => {
};
```
-The opening skips four seconds of source footage, so its caption at `5000`
-milliseconds appears one second into the scene. The next clip's timestamps
-refer to `next.mp4`, not the main composition. Changing the opening's duration
-moves the next clip and its captions together.
-
To change a captioned clip's speed, set `playbackRate` on its shared sequence.
-`durationInFrames` selects a range of source frames; the group occupies
-`durationInFrames / playbackRate` frames in its parent timeline. Update the
-composition duration when changing the total timeline length.
+`durationInFrames` selects a range of source frames; the group occupies `durationInFrames / playbackRate` frames in its parent timeline.
+Update the composition duration when changing the total timeline length.
If a caption has `pageBreakAfter: true`, the current page ends after that caption and the next caption starts a new page.
diff --git a/packages/skills/skills/remotion-captions/transcribe-captions.md b/packages/skills/skills/remotion-captions/transcribe-captions.md
index 1751da46d1..1818b74462 100644
--- a/packages/skills/skills/remotion-captions/transcribe-captions.md
+++ b/packages/skills/skills/remotion-captions/transcribe-captions.md
@@ -165,11 +165,8 @@ export const transcribeFile = async (file: File) => {
};
```
-Transcribe each original source video or audio file individually. Keep the
-resulting caption timestamps relative to the beginning of that source file,
-including portions currently trimmed out of the edit. Do not add composition
-offsets or flatten multiple transcripts into composition-wide timestamps.
-Apply editing offsets, trims, and playback rates through each clip's shared
-timing group when displaying its captions.
+Transcribe each original source video or audio file individually.
+Keep the resulting caption timestamps relative to the beginning of that source file, including portions currently trimmed out of the edit.
+Do not add composition offsets or flatten multiple transcripts into composition-wide timestamps.
See [Displaying captions](display-captions.md) for how to display the captions in Remotion.