Skip to content

🎥 Make videos programmatically with React

add to docs

JonnyBurger6728228f8446
diff --git a/packages/docs/docs/media/audio.mdx b/packages/docs/docs/media/audio.mdx
index f71627020b..0470659bd6 100644
--- a/packages/docs/docs/media/audio.mdx
+++ b/packages/docs/docs/media/audio.mdx
@@ -193,6 +193,29 @@ Customize the [timeout](/docs/delay-render#modifying-the-timeout) of the [`delay
Customize the [number of retries](/docs/delay-render#retrying) of the [`delayRender()`](/docs/delay-render) call that this component makes.
+### `audioStreamIndex?`
+
+Select the audio stream to use. The default is `0`.
+
+```tsx twoslash
+import {AbsoluteFill} from 'remotion';
+import {experimental_Audio as Audio} from '@remotion/media';
+
+// ---cut---
+export const MyComposition = () => {
+ return (
+ <AbsoluteFill>
+ <Audio audioStreamIndex={1} src={'https://remotion.media/multiple-audio-streams.mov'} />
+ </AbsoluteFill>
+ );
+};
+```
+
+:::note
+Currently only works during rendering.
+Planning to support it during preview as well.
+:::
+
### `disallowFallbackToHtml5Audio?`<AvailableFrom v="3.0.356" />
By default, if the video cannot be embedded using this tag, [a fallback to `<Audio>` from `remotion`](/docs/media/fallback) will be attempted.
diff --git a/packages/docs/docs/media/video.mdx b/packages/docs/docs/media/video.mdx
index c4b599e400..252d2b3efe 100644
--- a/packages/docs/docs/media/video.mdx
+++ b/packages/docs/docs/media/video.mdx
@@ -225,6 +225,29 @@ A callback function that gets called when a frame is extracted from the video.
Useful for [video manipulation](/docs/video-manipulation).
The callback is called with a [`CanvasImageSource`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasImageSource) object, more specifically, either an `ImageBitmap` or a `VideoFrame`.
+### `audioStreamIndex?`
+
+Select the audio stream to use. The default is `0`.
+
+```tsx twoslash
+import {AbsoluteFill} from 'remotion';
+import {experimental_Video as Video} from '@remotion/media';
+
+// ---cut---
+export const MyComposition = () => {
+ return (
+ <AbsoluteFill>
+ <Video audioStreamIndex={1} src={'https://remotion.media/multiple-audio-streams.mov'} />
+ </AbsoluteFill>
+ );
+};
+```
+
+:::note
+Currently only works during rendering.
+Planning to support it during preview as well.
+:::
+
### `disallowFallbackToOffthreadVideo?`<AvailableFrom v="3.0.356" />
By default, if the video cannot be embedded using this tag, [a fallback to `<OffthreadVideo>`](/docs/media/fallback) will be attempted.