Skip to content

🎥 Make videos programmatically with React

captions documentation

Jonny Burger226f8b2d2097
diff --git a/packages/docs/docs/captions/GuideTableOfContents.tsx b/packages/docs/docs/captions/GuideTableOfContents.tsx
index a01f10ed27..34c801670d 100644
--- a/packages/docs/docs/captions/GuideTableOfContents.tsx
+++ b/packages/docs/docs/captions/GuideTableOfContents.tsx
@@ -6,10 +6,22 @@ export const GuideTableOfContents: React.FC = () => {
return (
<div>
<Grid>
+ <TOCItem link="/docs/captions/importing">
+ <strong>{'Importing from .srt'}</strong>
+ <div>Import existing .srt subtitle files</div>
+ </TOCItem>
<TOCItem link="/docs/captions/transcribing">
<strong>{'Transcribing audio'}</strong>
<div>Options for generating captions from audio</div>
</TOCItem>
+ <TOCItem link="/docs/captions/displaying">
+ <strong>{'Displaying captions'}</strong>
+ <div>Render captions in your Remotion video</div>
+ </TOCItem>
+ <TOCItem link="/docs/captions/exporting">
+ <strong>{'Exporting subtitles'}</strong>
+ <div>Export subtitles as burned-in or .srt files</div>
+ </TOCItem>
</Grid>
</div>
);
diff --git a/packages/docs/docs/captions/displaying.mdx b/packages/docs/docs/captions/displaying.mdx
new file mode 100644
index 0000000000..8883e24cce
--- /dev/null
+++ b/packages/docs/docs/captions/displaying.mdx
@@ -0,0 +1,329 @@
+---
+image: /generated/articles-docs-captions-displaying.png
+sidebar_label: Displaying
+title: Displaying captions
+crumb: '@remotion/captions'
+---
+
+# Displaying captions
+
+This guide explains how to display captions in Remotion, assuming you already have captions in the [`Caption`](/docs/captions/caption) format - see [Transcribing audio](/docs/captions/transcribing) for how to generate them.
+
+
+## Fetching captions
+
+First, fetch your captions JSON file. Use [`useDelayRender()`](/docs/use-delay-render) to hold the render until the captions are loaded:
+
+```tsx twoslash title="Fetching captions"
+import {useState, useEffect, useCallback} from 'react';
+import {AbsoluteFill, staticFile, useDelayRender} from 'remotion';
+import type {Caption} from '@remotion/captions';
+
+export const MyComponent: React.FC = () => {
+ const [captions, setCaptions] = useState<Caption[] | null>(null);
+ const {delayRender, continueRender, cancelRender} = useDelayRender();
+ const [handle] = useState(() => delayRender());
+
+ const fetchCaptions = useCallback(async () => {
+ try {
+ const response = await fetch(staticFile('captions.json'));
+ const data = await response.json();
+ setCaptions(data);
+ continueRender(handle);
+ } catch (e) {
+ cancelRender(e);
+ }
+ }, [continueRender, cancelRender, handle]);
+
+ useEffect(() => {
+ fetchCaptions();
+ }, [fetchCaptions]);
+
+ if (!captions) {
+ return null;
+ }
+
+ return <AbsoluteFill>{/* Render captions here */}</AbsoluteFill>;
+};
+```
+
+## Creating pages
+
+Use [`createTikTokStyleCaptions()`](/docs/captions/create-tiktok-style-captions) to group captions into pages. The `combineTokensWithinMilliseconds` option controls how many words appear at once:
+
+```tsx twoslash title="Creating caption pages"
+import {useMemo} from 'react';
+import {createTikTokStyleCaptions} from '@remotion/captions';
+import type {Caption} from '@remotion/captions';
+
+// How often captions should switch (in milliseconds)
+// Higher values = more words per page
+// Lower values = fewer words (more word-by-word)
+const SWITCH_CAPTIONS_EVERY_MS = 1200;
+
+const captions: Caption[] = [];
+
+// ---cut---
+
+const {pages} = useMemo(() => {
+ return createTikTokStyleCaptions({
+ captions,
+ combineTokensWithinMilliseconds: SWITCH_CAPTIONS_EVERY_MS,
+ });
+}, [captions]);
+```
+
+## Rendering with Sequences
+
+Map over the pages and render each one in a [`<Sequence>`](/docs/sequence). Calculate the start frame and duration from the page timing:
+
+```tsx twoslash title="Rendering caption pages"
+import {Sequence, useVideoConfig, AbsoluteFill} from 'remotion';
+import type {TikTokPage} from '@remotion/captions';
+
+const SWITCH_CAPTIONS_EVERY_MS = 1200;
+
+const pages: TikTokPage[] = [];
+
+const CaptionPage: React.FC<{page: TikTokPage}> = ({page}) => (
+ <div>{page.text}</div>
+);
+
+// ---cut---
+
+const CaptionedContent: React.FC = () => {
+ const {fps} = useVideoConfig();
+
+ return (
+ <AbsoluteFill>
+ {pages.map((page, index) => {
+ const nextPage = pages[index + 1] ?? null;
+ const startFrame = (page.startMs / 1000) * fps;
+ const endFrame = Math.min(
+ nextPage ? (nextPage.startMs / 1000) * fps : Infinity,
+ startFrame + (SWITCH_CAPTIONS_EVERY_MS / 1000) * fps,
+ );
+ const durationInFrames = endFrame - startFrame;
+
+ if (durationInFrames <= 0) {
+ return null;
+ }
+
+ return (
+ <Sequence
+ key={index}
+ from={startFrame}
+ durationInFrames={durationInFrames}
+ >
+ <CaptionPage page={page} />
+ </Sequence>
+ );
+ })}
+ </AbsoluteFill>
+ );
+};
+```
+
+## Rendering a caption page
+
+A caption page contains `tokens` which you can use to highlight the currently spoken word. Here's an example that highlights words as they are spoken:
+
+```tsx twoslash title="Rendering a caption page with word highlighting"
+import {AbsoluteFill, useCurrentFrame, useVideoConfig} from 'remotion';
+import type {TikTokPage} from '@remotion/captions';
+
+const HIGHLIGHT_COLOR = '#39E508';
+
+const CaptionPage: React.FC<{page: TikTokPage}> = ({page}) => {
+ const frame = useCurrentFrame();
+ const {fps} = useVideoConfig();
+
+ // Current time relative to the start of the sequence
+ const currentTimeMs = (frame / fps) * 1000;
+ // Convert to absolute time by adding the page start
+ const absoluteTimeMs = page.startMs + currentTimeMs;
+
+ return (
+ <AbsoluteFill
+ style={{
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}
+ >
+ <div
+ style={{
+ fontSize: 80,
+ fontWeight: 'bold',
+ textAlign: 'center',
+ // Preserve whitespace in captions
+ whiteSpace: 'pre',
+ }}
+ >
+ {page.tokens.map((token) => {
+ const isActive =
+ token.fromMs <= absoluteTimeMs && token.toMs > absoluteTimeMs;
+
+ return (
+ <span
+ key={token.fromMs}
+ style={{
+ color: isActive ? HIGHLIGHT_COLOR : 'white',
+ }}
+ >
+ {token.text}
+ </span>
+ );
+ })}
+ </div>
+ </AbsoluteFill>
+ );
+};
+```
+
+## Full example
+
+<details>
+<summary>Show full example</summary>
+
+```tsx twoslash title="Full captioned video example"
+import {useState, useEffect, useCallback, useMemo} from 'react';
+import {
+ AbsoluteFill,
+ Sequence,
+ staticFile,
+ useCurrentFrame,
+ useDelayRender,
+ useVideoConfig,
+} from 'remotion';
+import {createTikTokStyleCaptions} from '@remotion/captions';
+import type {Caption, TikTokPage} from '@remotion/captions';
+
+const SWITCH_CAPTIONS_EVERY_MS = 1200;
+const HIGHLIGHT_COLOR = '#39E508';
+
+const CaptionPage: React.FC<{page: TikTokPage}> = ({page}) => {
+ const frame = useCurrentFrame();
+ const {fps} = useVideoConfig();
+ const currentTimeMs = (frame / fps) * 1000;
+ const absoluteTimeMs = page.startMs + currentTimeMs;
+
+ return (
+ <AbsoluteFill
+ style={{
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}
+ >
+ <div
+ style={{
+ fontSize: 80,
+ fontWeight: 'bold',
+ textAlign: 'center',
+ whiteSpace: 'pre',
+ }}
+ >
+ {page.tokens.map((token) => {
+ const isActive =
+ token.fromMs <= absoluteTimeMs && token.toMs > absoluteTimeMs;
+
+ return (
+ <span
+ key={token.fromMs}
+ style={{
+ color: isActive ? HIGHLIGHT_COLOR : 'white',
+ }}
+ >
+ {token.text}
+ </span>
+ );
+ })}
+ </div>
+ </AbsoluteFill>
+ );
+};
+
+export const CaptionedVideo: React.FC = () => {
+ const [captions, setCaptions] = useState<Caption[] | null>(null);
+ const {delayRender, continueRender, cancelRender} = useDelayRender();
+ const [handle] = useState(() => delayRender());
+ const {fps} = useVideoConfig();
+
+ const fetchCaptions = useCallback(async () => {
+ try {
+ const response = await fetch(staticFile('captions.json'));
+ const data = await response.json();
+ setCaptions(data);
+ continueRender(handle);
+ } catch (e) {
+ cancelRender(e);
+ }
+ }, [continueRender, cancelRender, handle]);
+
+ useEffect(() => {
+ fetchCaptions();
+ }, [fetchCaptions]);
+
+ const {pages} = useMemo(() => {
+ return createTikTokStyleCaptions({
+ captions: captions ?? [],
+ combineTokensWithinMilliseconds: SWITCH_CAPTIONS_EVERY_MS,
+ });
+ }, [captions]);
+
+ return (
+ <AbsoluteFill style={{backgroundColor: 'black'}}>
+ {pages.map((page, index) => {
+ const nextPage = pages[index + 1] ?? null;
+ const startFrame = (page.startMs / 1000) * fps;
+ const endFrame = Math.min(
+ nextPage ? (nextPage.startMs / 1000) * fps : Infinity,
+ startFrame + (SWITCH_CAPTIONS_EVERY_MS / 1000) * fps,
+ );
+ const durationInFrames = endFrame - startFrame;
+
+ if (durationInFrames <= 0) {
+ return null;
+ }
+
+ return (
+ <Sequence
+ key={index}
+ from={startFrame}
+ durationInFrames={durationInFrames}
+ >
+ <CaptionPage page={page} />
+ </Sequence>
+ );
+ })}
+ </AbsoluteFill>
+ );
+};
+```
+
+</details>
+
+## Next steps
+
+You can customize the appearance of your captions:
+
+- Use [`fitText()`](/docs/layout-utils/fit-text) from `@remotion/layout-utils` to automatically scale text to fit the video width
+- [Add animations](/docs/animating-properties) for enter/exit effects
+- Apply CSS text stroke for better visibility:
+
+```tsx
+<div
+ style={{
+ WebkitTextStroke: '4px black',
+ paintOrder: 'stroke',
+ }}
+>
+ {text}
+</div>
+```
+
+## See also
+
+- [Transcribing audio](/docs/captions/transcribing) - Generate captions from audio
+- [`Caption`](/docs/captions/caption) - The caption data structure
+- [`createTikTokStyleCaptions()`](/docs/captions/create-tiktok-style-captions) - API reference
+- [`<Sequence>`](/docs/sequence) - Sequence component reference
diff --git a/packages/docs/docs/captions/exporting.mdx b/packages/docs/docs/captions/exporting.mdx
new file mode 100644
index 0000000000..2507a810d6
--- /dev/null
+++ b/packages/docs/docs/captions/exporting.mdx
@@ -0,0 +1,108 @@
+---
+image: /generated/articles-docs-captions-exporting.png
+sidebar_label: Exporting
+title: Exporting subtitles
+crumb: '@remotion/captions'
+---
+
+# Exporting subtitles
+
+This guide covers different ways to export subtitles from your Remotion video.
+
+## Burned-in subtitles
+
+If you want the subtitles to be part of the video itself (burned in), follow the instructions in [Displaying captions](/docs/captions/displaying) to render the captions, then simply [render the video](/docs/render) as usual.
+
+```bash
+npx remotion render
+```
+
+
+## Exporting as a separate .srt file
+
+To export subtitles as a separate `.srt` file, use the [`<Artifact>`](/docs/artifact) component together with [`serializeSrt()`](/docs/captions/serialize-srt).
+
+```tsx twoslash title="Exporting captions as .srt"
+import {Artifact, useCurrentFrame} from 'remotion';
+import {serializeSrt} from '@remotion/captions';
+import type {Caption} from '@remotion/captions';
+
+const captions: Caption[] = [
+ {
+ text: 'Hello ',
+ startMs: 0,
+ endMs: 500,
+ timestampMs: 250,
+ confidence: 1,
+ },
+ {
+ text: 'world!',
+ startMs: 500,
+ endMs: 1000,
+ timestampMs: 750,
+ confidence: 1,
+ },
+];
+
+// ---cut---
+
+export const MyComp: React.FC = () => {
+ const frame = useCurrentFrame();
+
+ // Convert captions to SRT format
+ // Each caption becomes its own line
+ const srtContent = serializeSrt({
+ lines: captions.map((caption) => [caption]),
+ });
+
+ return (
+ <>
+ {/* Only emit the artifact on the first frame */}
+ {frame === 0 ? (
+ <Artifact filename="subtitles.srt" content={srtContent} />
+ ) : null}
+ {/* Rest of your video content */}
+ </>
+ );
+};
+```
+
+The artifact will be saved to `out/[composition-id]/subtitles.srt` when rendering.
+
+### Grouping words into lines
+
+If your captions are word-by-word, you may want to group multiple words into a single subtitle line. You can use [`createTikTokStyleCaptions()`](/docs/captions/create-tiktok-style-captions) to create pages, then convert them back to the format expected by `serializeSrt()`:
+
+```tsx twoslash title="Grouping captions into lines"
+import {serializeSrt, createTikTokStyleCaptions} from '@remotion/captions';
+import type {Caption} from '@remotion/captions';
+
+const captions: Caption[] = [];
+
+// ---cut---
+
+const {pages} = createTikTokStyleCaptions({
+ captions,
+ combineTokensWithinMilliseconds: 3000,
+});
+
+const srtContent = serializeSrt({
+ lines: pages.map((page) => {
+ // Convert page tokens back to Caption format
+ return page.tokens.map((token) => ({
+ text: token.text,
+ startMs: token.fromMs,
+ endMs: token.toMs,
+ timestampMs: (token.fromMs + token.toMs) / 2,
+ confidence: null,
+ }));
+ }),
+});
+```
+
+## See also
+
+- [Displaying captions](/docs/captions/displaying) - Render captions in your video
+- [`<Artifact>`](/docs/artifact) - Emit files during rendering
+- [`serializeSrt()`](/docs/captions/serialize-srt) - Convert captions to SRT format
+- [Emitting Artifacts](/docs/artifacts) - Full guide on artifacts
diff --git a/packages/docs/docs/captions/importing.mdx b/packages/docs/docs/captions/importing.mdx
new file mode 100644
index 0000000000..b989973d65
--- /dev/null
+++ b/packages/docs/docs/captions/importing.mdx
@@ -0,0 +1,65 @@
+---
+image: /generated/articles-docs-captions-importing.png
+sidebar_label: Importing from .srt
+title: Importing .srt subtitles into Remotion
+crumb: '@remotion/captions'
+---
+
+# Importing .srt subtitles into Remotion
+
+If you have an existing `.srt` subtitle file, you can import it into Remotion using [`parseSrt()`](/docs/captions/parse-srt) from `@remotion/captions`.
+
+## Reading an .srt file
+
+Use [`staticFile()`](/docs/staticfile) to reference an `.srt` file in your `public` folder, then fetch and parse it:
+
+```tsx twoslash title="Importing captions from .srt"
+import {useState, useEffect, useCallback} from 'react';
+import {AbsoluteFill, staticFile, useDelayRender} from 'remotion';
+import {parseSrt} from '@remotion/captions';
+import type {Caption} from '@remotion/captions';
+
+export const MyComponent: React.FC = () => {
+ const [captions, setCaptions] = useState<Caption[] | null>(null);
+ const {delayRender, continueRender, cancelRender} = useDelayRender();
+ const [handle] = useState(() => delayRender());
+
+ const fetchCaptions = useCallback(async () => {
+ try {
+ const response = await fetch(staticFile('subtitles.srt'));
+ const text = await response.text();
+ const {captions: parsed} = parseSrt({input: text});
+ setCaptions(parsed);
+ continueRender(handle);
+ } catch (e) {
+ cancelRender(e);
+ }
+ }, [continueRender, cancelRender, handle]);
+
+ useEffect(() => {
+ fetchCaptions();
+ }, [fetchCaptions]);
+
+ if (!captions) {
+ return null;
+ }
+
+ return <AbsoluteFill>{/* Use captions here */}</AbsoluteFill>;
+};
+```
+
+Alternatively, you can also `fetch()` a remote file via URL.
+
+## Using imported captions
+
+Once parsed, the captions are in the recommended [`Caption`](/docs/captions/caption) format and can be used with all `@remotion/captions` utilities.
+
+Possible next steps:
+- [Displaying captions](/docs/captions/displaying) - Render captions in your video
+- [Exporting captions](/docs/captions/exporting) - Export captions to a file
+
+## See also
+
+- [`parseSrt()`](/docs/captions/parse-srt) - API reference
+- [Displaying captions](/docs/captions/displaying) - Render captions in your video
+- [`Caption`](/docs/captions/caption) - The caption data structure
diff --git a/packages/docs/docs/captions/transcribing.mdx b/packages/docs/docs/captions/transcribing.mdx
index 4b6b510e2a..02e0fc1c75 100644
--- a/packages/docs/docs/captions/transcribing.mdx
+++ b/packages/docs/docs/captions/transcribing.mdx
@@ -1,5 +1,6 @@
---
image: /generated/articles-docs-captions-transcribing.png
+sidebar_label: Transcribing
title: Transcribing audio
crumb: '@remotion/captions'
---
@@ -28,8 +29,8 @@ Remotion provides several built-in options for transcribing audio to generate ca
All of these options can output captions in the [`Caption`](/docs/captions/caption) type format, which is recommended for use with Remotion. This format:
- Enables usage of the APIs in [`@remotion/captions`](/docs/captions/api), such as [`createTikTokStyleCaptions()`](/docs/captions/create-tiktok-style-captions)
-- Matches the format used in the [Remotion Editor Starter](https://github.com/remotion-dev/template-video-editor)
-- Is compatible with the [Animated Captions](https://github.com/remotion-dev/animated-captions) package
+- Matches the format used in the [Remotion Editor Starter](https://remotion.pro/store/editor-starter)
+- Is compatible with the [Animated Captions](https://remotion.pro/store/animated-captions) package
## Alternatives
diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.ts
index 333802facd..e76803c982 100644
--- a/packages/docs/sidebars.ts
+++ b/packages/docs/sidebars.ts
@@ -1176,7 +1176,7 @@ const sidebars: SidebarsConfig = {
type: 'doc',
id: 'captions/index',
},
- items: ['captions/transcribing'],
+ items: [ 'captions/importing', 'captions/transcribing', 'captions/displaying', 'captions/exporting'],
},
{
type: 'category',
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index fa436785bb..1176867165 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -449,6 +449,15 @@ export const articles = [
noAi: false,
slug: 'cancel-render',
},
+ {
+ id: 'captions/api',
+ title: '@remotion/captions',
+ relativePath: 'docs/captions/api.mdx',
+ compId: 'articles-docs-captions-api',
+ crumb: 'Subtitle videos',
+ noAi: false,
+ slug: 'captions/api',
+ },
{
id: 'captions/caption',
title: 'Caption',
@@ -467,6 +476,15 @@ export const articles = [
noAi: false,
slug: 'captions/create-tiktok-style-captions',
},
+ {
+ id: 'captions/displaying',
+ title: 'Displaying captions',
+ relativePath: 'docs/captions/displaying.mdx',
+ compId: 'articles-docs-captions-displaying',
+ crumb: '@remotion/captions',
+ noAi: false,
+ slug: 'captions/displaying',
+ },
{
id: 'captions/ensure-max-characters-per-line',
title: 'ensureMaxCharactersPerLine()',
@@ -476,9 +494,27 @@ export const articles = [
noAi: false,
slug: 'captions/ensure-max-characters-per-line',
},
+ {
+ id: 'captions/exporting',
+ title: 'Exporting subtitles',
+ relativePath: 'docs/captions/exporting.mdx',
+ compId: 'articles-docs-captions-exporting',
+ crumb: '@remotion/captions',
+ noAi: false,
+ slug: 'captions/exporting',
+ },
+ {
+ id: 'captions/importing',
+ title: 'Importing .srt subtitles into Remotion',
+ relativePath: 'docs/captions/importing.mdx',
+ compId: 'articles-docs-captions-importing',
+ crumb: '@remotion/captions',
+ noAi: false,
+ slug: 'captions/importing',
+ },
{
id: 'captions/index',
- title: '@remotion/captions',
+ title: 'Captions',
relativePath: 'docs/captions/index.mdx',
compId: 'articles-docs-captions-index',
crumb: 'Subtitle videos',
@@ -503,6 +539,15 @@ export const articles = [
noAi: false,
slug: 'captions/serialize-srt',
},
+ {
+ id: 'captions/transcribing',
+ title: 'Transcribing audio',
+ relativePath: 'docs/captions/transcribing.mdx',
+ compId: 'articles-docs-captions-transcribing',
+ crumb: '@remotion/captions',
+ noAi: false,
+ slug: 'captions/transcribing',
+ },
{
id: 'chromium-flags',
title: 'Chromium flags',
@@ -6466,6 +6511,33 @@ export const articles = [
noAi: false,
slug: 'watchstaticfile',
},
+ {
+ id: 'can-render-media-on-web',
+ title: 'canRenderMediaOnWeb()',
+ relativePath: 'docs/web-renderer/can-render-media-on-web.mdx',
+ compId: 'articles-docs-web-renderer-can-render-media-on-web',
+ crumb: '@remotion/web-renderer',
+ noAi: false,
+ slug: 'web-renderer/can-render-media-on-web',
+ },
+ {
+ id: 'get-encodable-audio-codecs',
+ title: 'getEncodableAudioCodecs()',
+ relativePath: 'docs/web-renderer/get-encodable-audio-codecs.mdx',
+ compId: 'articles-docs-web-renderer-get-encodable-audio-codecs',
+ crumb: '@remotion/web-renderer',
+ noAi: false,
+ slug: 'web-renderer/get-encodable-audio-codecs',
+ },
+ {
+ id: 'get-encodable-video-codecs',
+ title: 'getEncodableVideoCodecs()',
+ relativePath: 'docs/web-renderer/get-encodable-video-codecs.mdx',
+ compId: 'articles-docs-web-renderer-get-encodable-video-codecs',
+ crumb: '@remotion/web-renderer',
+ noAi: false,
+ slug: 'web-renderer/get-encodable-video-codecs',
+ },
{
id: 'web-renderer/index',
title: '@remotion/web-renderer',
diff --git a/packages/docs/static/generated/articles-docs-captions-api.png b/packages/docs/static/generated/articles-docs-captions-api.png
new file mode 100644
index 0000000000..8ac1429c6e
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-captions-api.png differ
diff --git a/packages/docs/static/generated/articles-docs-captions-displaying.png b/packages/docs/static/generated/articles-docs-captions-displaying.png
new file mode 100644
index 0000000000..c2b3c0603d
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-captions-displaying.png differ
diff --git a/packages/docs/static/generated/articles-docs-captions-exporting.png b/packages/docs/static/generated/articles-docs-captions-exporting.png
new file mode 100644
index 0000000000..c115035757
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-captions-exporting.png differ
diff --git a/packages/docs/static/generated/articles-docs-captions-importing.png b/packages/docs/static/generated/articles-docs-captions-importing.png
new file mode 100644
index 0000000000..455b6f93a0
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-captions-importing.png differ
diff --git a/packages/docs/static/generated/articles-docs-captions-transcribing.png b/packages/docs/static/generated/articles-docs-captions-transcribing.png
new file mode 100644
index 0000000000..24edf3c21e
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-captions-transcribing.png differ
diff --git a/packages/docs/static/generated/articles-docs-web-renderer-can-render-media-on-web.png b/packages/docs/static/generated/articles-docs-web-renderer-can-render-media-on-web.png
new file mode 100644
index 0000000000..7f29a106f7
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-web-renderer-can-render-media-on-web.png differ
diff --git a/packages/docs/static/generated/articles-docs-web-renderer-get-encodable-audio-codecs.png b/packages/docs/static/generated/articles-docs-web-renderer-get-encodable-audio-codecs.png
new file mode 100644
index 0000000000..a760bd6b6c
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-web-renderer-get-encodable-audio-codecs.png differ
diff --git a/packages/docs/static/generated/articles-docs-web-renderer-get-encodable-video-codecs.png b/packages/docs/static/generated/articles-docs-web-renderer-get-encodable-video-codecs.png
new file mode 100644
index 0000000000..ee14107243
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-web-renderer-get-encodable-video-codecs.png differ
diff --git a/packages/template-tiktok/src/CaptionedVideo/index.tsx b/packages/template-tiktok/src/CaptionedVideo/index.tsx
index b8979cf9c4..8584b923c7 100644
--- a/packages/template-tiktok/src/CaptionedVideo/index.tsx
+++ b/packages/template-tiktok/src/CaptionedVideo/index.tsx
@@ -76,7 +76,7 @@ export const CaptionedVideo: React.FC<{
} catch (e) {
cancelRender(e);
}
- }, [handle, subtitlesFile]);
+ }, [continueRender, handle, subtitlesFile]);
useEffect(() => {
fetchSubtitles();