🎥 Make videos programmatically with React
yes
Jonny Burger8df8c676be36
diff --git a/packages/docs/docs/audio.mdx b/packages/docs/docs/audio.mdxindex 8a682e7508..0096ed14a2 100644--- a/packages/docs/docs/audio.mdx+++ b/packages/docs/docs/audio.mdx@@ -164,6 +164,34 @@ Accepts a number between `0.01` and `2`, where `1` represents the original pitchA `toneFrequency` of 0.5 would lower the pitch by half, and a `toneFrequency` of `1.5` would increase the pitch by 50%.+### `audioChannelIndex?`<AvailableFrom v="4.0.340" />++Select the audio stream to use. The default is `0`.++```tsx twoslash+import {AbsoluteFill, Audio} from 'remotion';++// ---cut---+export const MyComposition = () => {+ return (+ <AbsoluteFill>+ <Audio audioChannelIndex={1} src={'https://parser.media/multichannel-audio.mov'} />+ </AbsoluteFill>+ );+};+```++:::note+This prop only works during rendering.+Browsers do not support selecting the audio track without enabling experimental flags.++Not to be confused with audio channels. A video can have multiple audio streams, each stream can have multiple channels.+Multiple audio streams can be used for example for adding multiple languages to a video.++Audio streams are zero-indexed.+:::++### `acceptableTimeShiftInSeconds?`<AvailableFrom v="3.2.42"/>In the [Remotion Studio](/docs/terminology/studio) or in the [Remotion Player](/docs/player), Remotion will seek the audio if it gets too much out of sync with Remotion's internal time - be it due to the audio loading or the page being too slow to keep up in real-time. By default, a seek is triggered if `0.45` seconds of time shift is encountered. Using this prop, you can customize the threshold.diff --git a/packages/docs/docs/new-video/index.mdx b/packages/docs/docs/new-video/index.mdxindex 92986ba05d..e9fcfdd2ad 100644--- a/packages/docs/docs/new-video/index.mdx+++ b/packages/docs/docs/new-video/index.mdx@@ -207,6 +207,33 @@ Accepts a number between `0.01` and `2`, where `1` represents the original pitchA `toneFrequency` of 0.5 would lower the pitch by half, and a `toneFrequency` of `1.5` would increase the pitch by 50%.+### `audioChannelIndex?`<AvailableFrom v="4.0.340" />++Select the audio stream to use. The default is `0`.++```tsx twoslash+import {AbsoluteFill, Audio} from 'remotion';++// ---cut---+export const MyComposition = () => {+ return (+ <AbsoluteFill>+ <Audio audioChannelIndex={1} src={'https://parser.media/multichannel-audio.mov'} />+ </AbsoluteFill>+ );+};+```++:::note+This prop only works during rendering.+Browsers do not support selecting the audio track without enabling experimental flags.++Not to be confused with audio channels. A video can have multiple audio streams, each stream can have multiple channels.+Multiple audio streams can be used for example for adding multiple languages to a video.++Audio streams are zero-indexed.+:::+### `pauseWhenBuffering?`<AvailableFrom v="4.0.111"/>If set to `true` and the video is loading, the Player will enter into the [native buffering state](/docs/player/buffer-state). The default is `false`, but will become `true` in Remotion 5.0.diff --git a/packages/docs/docs/offthreadvideo.mdx b/packages/docs/docs/offthreadvideo.mdxindex c2381ed2c7..457a39b631 100644--- a/packages/docs/docs/offthreadvideo.mdx+++ b/packages/docs/docs/offthreadvideo.mdx@@ -229,6 +229,33 @@ Disabling tone mapping will speed up rendering, but may result in less vibrant cPrior to Remotion 4.0.117, tone mapping was always disabled, and the `toneMapped` prop was not available.+### `audioChannelIndex?`<AvailableFrom v="4.0.340" />++Select the audio stream to use. The default is `0`.++```tsx twoslash+import {AbsoluteFill, OffthreadVideo} from 'remotion';++// ---cut---+export const MyComposition = () => {+ return (+ <AbsoluteFill>+ <OffthreadVideo audioChannelIndex={1} src={'https://parser.media/multichannel-audio.mov'} />+ </AbsoluteFill>+ );+};+```++:::note+This prop only works during rendering.+Browsers do not support selecting the audio track without enabling experimental flags.++Not to be confused with audio channels. A video can have multiple audio streams, each stream can have multiple channels.+Multiple audio streams can be used for example for adding multiple languages to a video.++Audio streams are zero-indexed.+:::+### `showInTimeline?`<AvailableFrom v="4.0.122"/>If set to `false`, no layer will be shown in the timeline of the Remotion Studio. The default is `true`.diff --git a/packages/docs/docs/video.mdx b/packages/docs/docs/video.mdxindex 079549b439..225133863e 100644--- a/packages/docs/docs/video.mdx+++ b/packages/docs/docs/video.mdx@@ -220,6 +220,34 @@ Accepts a number between `0.01` and `2`, where `1` represents the original pitchA `toneFrequency` of 0.5 would lower the pitch by half, and a `toneFrequency` of `1.5` would increase the pitch by 50%.+### `audioChannelIndex?`<AvailableFrom v="4.0.340" />++Select the audio stream to use. The default is `0`.++```tsx twoslash+import {AbsoluteFill, Video} from 'remotion';++// ---cut---+export const MyComposition = () => {+ return (+ <AbsoluteFill>+ <Video audioChannelIndex={1} src={'https://parser.media/multichannel-audio.mov'} />+ </AbsoluteFill>+ );+};+```++:::note+This prop only works during rendering.+Browsers do not support selecting the audio track without enabling experimental flags.++Not to be confused with audio channels. A video can have multiple audio streams, each stream can have multiple channels.+Multiple audio streams can be used for example for adding multiple languages to a video.++Audio streams are zero-indexed.+:::++### `onError?`Handle an error playing the video. From v3.3.89, if you pass an `onError` callback, then no exception will be thrown. Previously, the error could not be caught.