🎥 Make videos programmatically with React
Docs: How to get the FPS of a video (#10271)
Jonny Burgera57689e315c2
diff --git a/packages/docs/docs/dynamic-metadata.mdx b/packages/docs/docs/dynamic-metadata.mdxindex 817f6aaf7a..d7237537c9 100644--- a/packages/docs/docs/dynamic-metadata.mdx+++ b/packages/docs/docs/dynamic-metadata.mdx@@ -15,9 +15,24 @@ Consider a scenario where a video is dynamically specified as a background and tPass a [`calculateMetadata`](/docs/composition#calculatemetadata) callback function to a [`<Composition>`](/docs/composition). This function should take the [combined props](/docs/props-resolution) and calculate the metadata.+```twoslash include dynamic-metadata-frame-rate-helper+// @filename: get-video-frame-rate.ts+import type {Input} from 'mediabunny';++export type VideoFrameRate =+ | {type: 'constant'; rate: number}+ | {type: 'variable'; max: number; average: number};++export declare const getVideoFrameRate: (+ input: Input,+) => Promise<VideoFrameRate | null>;+```+```tsx twoslash title="src/Root.tsx"+// @include: dynamic-metadata-frame-rate-helper// @filename: get-media-metadata.tsimport {Input, ALL_FORMATS, UrlSource} from 'mediabunny';+import {getVideoFrameRate} from './get-video-frame-rate';export const getMediaMetadata = async (src: string) => {const input = new Input({@@ -35,8 +50,13 @@ export const getMediaMetadata = async (src: string) => {height: videoTrack.displayHeight,}: null;- const packetStats = await videoTrack?.computePacketStats();- const fps = packetStats?.averagePacketRate ?? null;+ const frameRate = await getVideoFrameRate(input);+ const fps =+ frameRate === null+ ? null+ : frameRate.type === 'constant'+ ? frameRate.rate+ : frameRate.max;return {durationInSeconds,@@ -73,10 +93,14 @@ export const Root: React.FC = () => {src: 'https://remotion.media/BigBuckBunny.mp4',}}calculateMetadata={async ({props}) => {- const {durationInSeconds} = await getMediaMetadata(props.src);+ const {durationInSeconds, fps} = await getMediaMetadata(props.src);+ const compositionFps = fps ?? 30;return {- durationInFrames: Math.floor(durationInSeconds * 30),+ durationInFrames: Math.floor(+ durationInSeconds * compositionFps,+ ),+ fps: compositionFps,};}}/>@@ -86,6 +110,7 @@ export const Root: React.FC = () => {:::noteSee [Getting metadata using Mediabunny](/docs/mediabunny/metadata) for the snippet for `get-media-metadata.ts`.+It uses the [`getVideoFrameRate()` helper](/docs/mediabunny/frame-rate) to match the composition FPS to the source video.:::The `props` defaults to the `defaultProps` specified, but may be overriden by [passing input props to the render](/docs/props-resolution).@@ -102,8 +127,10 @@ In the following example, Remotion is instructed to wait for the [`getMediaMetadBy calling [`delayRender()`](/docs/delay-render), Remotion will be blocked from proceeding until [`continueRender()`](/docs/continue-render) is called.```tsx twoslash title="src/Root.tsx"+// @include: dynamic-metadata-frame-rate-helper// @filename: get-media-metadata.tsimport {Input, ALL_FORMATS, UrlSource} from 'mediabunny';+import {getVideoFrameRate} from './get-video-frame-rate';export const getMediaMetadata = async (src: string) => {const input = new Input({@@ -121,8 +148,13 @@ export const getMediaMetadata = async (src: string) => {height: videoTrack.displayHeight,}: null;- const packetStats = await videoTrack?.computePacketStats();- const fps = packetStats?.averagePacketRate ?? null;+ const frameRate = await getVideoFrameRate(input);+ const fps =+ frameRate === null+ ? null+ : frameRate.type === 'constant'+ ? frameRate.rate+ : frameRate.max;return {durationInSeconds,@@ -142,12 +174,19 @@ import {getMediaMetadata} from './get-media-metadata';export const Index: React.FC = () => {const [handle] = useState(() => delayRender());- const [duration, setDuration] = useState(1);+ const [metadata, setMetadata] = useState({+ durationInFrames: 1,+ fps: 30,+ });useEffect(() => {getMediaMetadata('https://remotion.media/video.mp4')- .then(({durationInSeconds}) => {- setDuration(Math.round(durationInSeconds * 30));+ .then(({durationInSeconds, fps}) => {+ const compositionFps = fps ?? 30;+ setMetadata({+ durationInFrames: Math.round(durationInSeconds * compositionFps),+ fps: compositionFps,+ });continueRender(handle);}).catch((err) => {@@ -155,7 +194,7 @@ export const Index: React.FC = () => {});}, [handle]);- return <Composition id="dynamic-duration" component={VideoTesting} width={1080} height={1080} fps={30} durationInFrames={duration} />;+ return <Composition id="dynamic-duration" component={VideoTesting} width={1080} height={1080} fps={metadata.fps} durationInFrames={metadata.durationInFrames} />;};```@@ -199,8 +238,10 @@ The [`<Player>`](/docs/player) will react if the metadata being passed to it cha</p>```tsx twoslash title="MyApp.tsx"+// @include: dynamic-metadata-frame-rate-helper// @filename: get-media-metadata.tsimport {Input, ALL_FORMATS, UrlSource} from 'mediabunny';+import {getVideoFrameRate} from './get-video-frame-rate';export const getMediaMetadata = async (src: string) => {const input = new Input({@@ -218,8 +259,13 @@ export const getMediaMetadata = async (src: string) => {height: videoTrack.displayHeight,}: null;- const packetStats = await videoTrack?.computePacketStats();- const fps = packetStats?.averagePacketRate ?? null;+ const frameRate = await getVideoFrameRate(input);+ const fps =+ frameRate === null+ ? null+ : frameRate.type === 'constant'+ ? frameRate.rate+ : frameRate.max;return {durationInSeconds,@@ -237,19 +283,26 @@ import {Player} from '@remotion/player';import {getMediaMetadata} from './get-media-metadata';export const Index: React.FC = () => {- const [duration, setDuration] = useState(1);+ const [metadata, setMetadata] = useState({+ durationInFrames: 1,+ fps: 30,+ });useEffect(() => {getMediaMetadata('https://remotion.media/video.mp4')- .then(({durationInSeconds}) => {- setDuration(Math.round(durationInSeconds * 30));+ .then(({durationInSeconds, fps}) => {+ const compositionFps = fps ?? 30;+ setMetadata({+ durationInFrames: Math.round(durationInSeconds * compositionFps),+ fps: compositionFps,+ });}).catch((err) => {console.log(`Error fetching metadata: ${err}`);});}, []);- return <Player component={VideoTesting} compositionWidth={1080} compositionHeight={1080} fps={30} durationInFrames={duration} />;+ return <Player component={VideoTesting} compositionWidth={1080} compositionHeight={1080} fps={metadata.fps} durationInFrames={metadata.durationInFrames} />;};```diff --git a/packages/docs/docs/lambda/cost-example.mdx b/packages/docs/docs/lambda/cost-example.mdxindex eb42bec701..d2ea37e553 100644--- a/packages/docs/docs/lambda/cost-example.mdx+++ b/packages/docs/docs/lambda/cost-example.mdx@@ -27,9 +27,26 @@ Rendering the [`HelloWorld`](https://github.com/remotion-dev/template-helloworld## Rendering a 1 minute Video in the same S3 bucket+The video examples use the [`getVideoFrameRate()` helper](/docs/mediabunny/frame-rate) to account for constant and variable frame rate videos.++```twoslash include lambda-frame-rate-helper+// @filename: get-video-frame-rate.ts+import type {Input} from 'mediabunny';++export type VideoFrameRate =+ | {type: 'constant'; rate: number}+ | {type: 'variable'; max: number; average: number};++export declare const getVideoFrameRate: (+ input: Input,+) => Promise<VideoFrameRate | null>;+```+```tsx twoslash title="OffthreadRemoteVideo.tsx"+// @include: lambda-frame-rate-helper// @filename: get-media-metadata.tsimport {Input, ALL_FORMATS, UrlSource} from 'mediabunny';+import {getVideoFrameRate} from './get-video-frame-rate';export const getMediaMetadata = async (src: string) => {const input = new Input({@@ -47,8 +64,13 @@ export const getMediaMetadata = async (src: string) => {height: videoTrack.displayHeight,}: null;- const packetStats = await videoTrack?.computePacketStats();- const fps = packetStats?.averagePacketRate ?? null;+ const frameRate = await getVideoFrameRate(input);+ const fps =+ frameRate === null+ ? null+ : frameRate.type === 'constant'+ ? frameRate.rate+ : frameRate.max;return {durationInSeconds,@@ -69,10 +91,11 @@ const src = staticFile('bigbuckbunny.mp4');export const calculateMetadataFn: CalculateMetadataFunction<Record<string, unknown>> = async () => {const {durationInSeconds, dimensions, fps} = await getMediaMetadata(src);+ const compositionFps = fps ?? 30;return {- durationInFrames: Math.round(durationInSeconds * fps!), // 1440- fps: fps!,+ durationInFrames: Math.round(durationInSeconds * compositionFps), // 1440+ fps: compositionFps,width: dimensions!.width,height: dimensions!.height,};@@ -100,8 +123,10 @@ Rendering a video inside your video increases the cost significantly.## Rendering a 10 minute Remote HD Video```tsx twoslash title="OffthreadRemoteVideo.tsx"+// @include: lambda-frame-rate-helper// @filename: get-media-metadata.tsimport {Input, ALL_FORMATS, UrlSource} from 'mediabunny';+import {getVideoFrameRate} from './get-video-frame-rate';export const getMediaMetadata = async (src: string) => {const input = new Input({@@ -119,8 +144,13 @@ export const getMediaMetadata = async (src: string) => {height: videoTrack.displayHeight,}: null;- const packetStats = await videoTrack?.computePacketStats();- const fps = packetStats?.averagePacketRate ?? null;+ const frameRate = await getVideoFrameRate(input);+ const fps =+ frameRate === null+ ? null+ : frameRate.type === 'constant'+ ? frameRate.rate+ : frameRate.max;return {durationInSeconds,@@ -141,10 +171,11 @@ const src = 'https://remotion.media/BigBuckBunny.mp4';export const calculateMetadataFn: CalculateMetadataFunction<Record<string, unknown>> = async () => {const {durationInSeconds, dimensions, fps} = await getMediaMetadata(src);+ const compositionFps = fps ?? 30;return {- durationInFrames: Math.round(durationInSeconds * fps!), // 14315- fps: fps!,+ durationInFrames: Math.round(durationInSeconds * compositionFps), // 14315+ fps: compositionFps,width: dimensions!.width,height: dimensions!.height,};@@ -168,8 +199,10 @@ export const NewVideoComp = () => {## Rendering a 10 second Remote 4K Video```tsx twoslash title="OffthreadRemoteVideo.tsx"+// @include: lambda-frame-rate-helper// @filename: get-media-metadata.tsimport {Input, ALL_FORMATS, UrlSource} from 'mediabunny';+import {getVideoFrameRate} from './get-video-frame-rate';export const getMediaMetadata = async (src: string) => {const input = new Input({@@ -187,8 +220,13 @@ export const getMediaMetadata = async (src: string) => {height: videoTrack.displayHeight,}: null;- const packetStats = await videoTrack?.computePacketStats();- const fps = packetStats?.averagePacketRate ?? null;+ const frameRate = await getVideoFrameRate(input);+ const fps =+ frameRate === null+ ? null+ : frameRate.type === 'constant'+ ? frameRate.rate+ : frameRate.max;return {durationInSeconds,@@ -209,10 +247,11 @@ const src = 'https://videos.pexels.com/video-files/5530402/5530402-uhd_3840_2160export const calculateMetadataFn: CalculateMetadataFunction<Record<string, unknown>> = async () => {const {durationInSeconds, dimensions, fps} = await getMediaMetadata(src);+ const compositionFps = fps ?? 30;return {- durationInFrames: Math.round(durationInSeconds * fps!),- fps: fps!,+ durationInFrames: Math.round(durationInSeconds * compositionFps),+ fps: compositionFps,width: dimensions!.width,height: dimensions!.height,};diff --git a/packages/docs/docs/mediabunny/frame-rate.mdx b/packages/docs/docs/mediabunny/frame-rate.mdxnew file mode 100644index 0000000000..e9d8c7d85b--- /dev/null+++ b/packages/docs/docs/mediabunny/frame-rate.mdx@@ -0,0 +1,212 @@+---+image: /generated/articles-docs-mediabunny-frame-rate.png+title: Getting the frame rate of a video+crumb: 'Mediabunny'+sidebar_label: Getting the frame rate+---++Videos can have one of two types of frame rates:++- Constant frame rate: The time interval between frames is static.+ 30 FPS and 60 FPS are common values for constant frame rate videos.+- Variable frame rate: The time interval between frames varies.+ This is most common for screen recordings, where a frame is only sampled when the content has changed.++## Getting the frame rate using Mediabunny++Use [Mediabunny](https://mediabunny.dev) to determine the frame rate of a video.++There is no native method to determine whether a video has a variable frame rate, but you can probe it by reading some packets without causing expensive decoding work.++```ts twoslash title="get-video-frame-rate.ts"+import {EncodedPacketSink, Input} from 'mediabunny';++export type VideoFrameRate =+ | {+ type: 'constant';+ rate: number;+ }+ | {+ type: 'variable';+ max: number;+ average: number;+ };++const commonFpsValues = [+ 24000 / 1001,+ 24,+ 25,+ 30000 / 1001,+ 30,+ 50,+ 60000 / 1001,+ 60,+ 120,+];++const snapToCommonFps = (fps: number) => {+ return commonFpsValues.find(+ (commonFps) => Math.abs(fps - commonFps) < 0.01,+ ) ?? fps;+};++export const getVideoFrameRate = async (+ input: Input,+): Promise<VideoFrameRate | null> => {+ const videoTrack = await input.getPrimaryVideoTrack();+ if (!videoTrack) {+ return null;+ }++ const packetSampleCount = 121;+ const timestamps = new Set<number>();+ const sink = new EncodedPacketSink(videoTrack);+ let endTimestamp = -Infinity;++ for await (const packet of sink.packets(undefined, undefined, {+ metadataOnly: true,+ })) {+ if (+ timestamps.size >= packetSampleCount &&+ packet.timestamp >= endTimestamp+ ) {+ break;+ }++ timestamps.add(packet.timestamp);+ endTimestamp = Math.max(+ endTimestamp,+ packet.timestamp + packet.duration,+ );+ }++ if (timestamps.size < 2) {+ return null;+ }++ const sortedTimestamps = [...timestamps].sort((a, b) => a - b);+ sortedTimestamps.splice(packetSampleCount);++ const intervals = sortedTimestamps.slice(1).map((timestamp, index) => {+ return timestamp - sortedTimestamps[index];+ });+ const averageInterval =+ intervals.reduce((sum, interval) => sum + interval, 0) / intervals.length;+ const toleranceInSeconds = 1.01 / 1000;+ const intervalSpread = Math.max(...intervals) - Math.min(...intervals);+ const isConstant = intervalSpread <= toleranceInSeconds;++ if (isConstant) {+ return {+ type: 'constant',+ rate: snapToCommonFps(1 / averageInterval),+ };+ }++ return {+ type: 'variable',+ max: 1 / Math.min(...intervals),+ average: 1 / averageInterval,+ };+};+```++Note that:++- Video timestamps have limited precision. For example, Matroska timestamps commonly have millisecond precision, leading to uneven timestamps such as `33 ms`, `67 ms`, and `100 ms`.+ We still consider this a constant frame rate video, so we allow the intervals to vary by slightly more than one millisecond (also allowing for floating point inaccuracies).+- For the same reason, we snap constant frame rates to common values because the calculation may be slightly off depending on how many packets are read.+ You still want a 30 FPS timeline if the calculation returns, for example, 30.003 FPS.+- With too few packet timestamps, some frame rates cannot be distinguished, such as 29.97 and 30 FPS or 59.94 and 60 FPS. We sample 121 packet timestamps to reliably detect these fractional frame rates.+- Mediabunny returns encoded packets in decode order, which may differ from presentation order when a video uses B-frames. The loop may read a few additional packet timestamps to finish the current group before sorting them and keeping the first 121.++## Matching a Remotion composition to the frame rate++For constant frame rate videos, it is recommended to align Remotion's timeline frame rate to the source videos you are importing.++Remotion and pretty much every other video editor do not support variable frame rate timelines or outputting variable frame rate videos.+You must specify a constant frame rate for your composition.++Changing the frame rate can be lossy.++To minimize frame loss, set the composition frame rate based on the smallest interval between two frames of the source video.++<details>+<summary>+Don't use the average frame rate when dealing with variable frame rate videos+</summary>++Consider a 10-second screen recording where:++- For the first 5 seconds there is no movement on the screen+- For the next 5 seconds, as the mouse cursor starts moving, frames are written with up to 120 FPS.++A naive implementation would look at Mediabunny's [`averagePacketRate`](https://mediabunny.dev/api/PacketStats#averagepacketrate) and determine that the average FPS is 60.++However, by setting the timeline to 60 FPS, every second frame in the second half of the video will be dropped.++</details>++### Usage example++Use [`calculateMetadata()`](/docs/calculate-metadata) to match the composition FPS to the source video:++```twoslash include frame-rate-helper+// @filename: get-video-frame-rate.ts+import type {Input} from 'mediabunny';++export type VideoFrameRate =+ | {type: 'constant'; rate: number}+ | {type: 'variable'; max: number; average: number};++export declare const getVideoFrameRate: (+ input: Input,+) => Promise<VideoFrameRate | null>;+```++```ts twoslash title="calculate-metadata.ts"+// @include: frame-rate-helper+// @filename: calculate-metadata.ts+// ---cut---+import {ALL_FORMATS, Input, UrlSource} from 'mediabunny';+import type {CalculateMetadataFunction} from 'remotion';+import {getVideoFrameRate} from './get-video-frame-rate';++type Props = {+ src: string;+};++export const calculateMetadata: CalculateMetadataFunction<Props> = async ({+ props,+}) => {+ using input = new Input({+ formats: ALL_FORMATS,+ source: new UrlSource(props.src, {+ getRetryDelay: () => null,+ }),+ });++ const [frameRate, durationInSeconds] = await Promise.all([+ getVideoFrameRate(input),+ input.computeDuration(),+ ]);+ const fps =+ frameRate === null+ ? 30 // Fallback if none or not enough video frames are available+ : frameRate.type === 'constant'+ ? frameRate.rate+ : frameRate.max;++ return {+ fps,+ durationInFrames: Math.floor(durationInSeconds * fps),+ };+};+```++If the frame rate cannot be determined, the composition uses 30 FPS.+The `durationInFrames` is adjusted to preserve the duration of the source video.++## See also++- [Getting metadata from a video](/docs/mediabunny/metadata)diff --git a/packages/docs/docs/mediabunny/metadata.mdx b/packages/docs/docs/mediabunny/metadata.mdxindex bf5f06af30..d0b2d55199 100644--- a/packages/docs/docs/mediabunny/metadata.mdx+++ b/packages/docs/docs/mediabunny/metadata.mdx@@ -9,29 +9,17 @@ If you would like to obtain metadata from a video or audio in JavaScript, such a- Duration- Width and height (Dimensions)-- Frame rate (FPS)+- Frame ratethen [Mediabunny](https://mediabunny.dev) is the ideal library for doing so.+The example uses the [`getVideoFrameRate()` code snippet](/docs/mediabunny/frame-rate) to determine whether the frame rate is constant or variable.+## Getting metadata from a URL-```tsx twoslash title="get-media-metadata.ts"+```tsx title="get-media-metadata.ts"import {Input, ALL_FORMATS, UrlSource} from 'mediabunny';--const commonFpsValues = [- 24000 / 1001,- 24,- 25,- 30000 / 1001,- 30,- 50,- 60000 / 1001,- 60,-];--const snapToCommonFps = (fps: number) => {- return commonFpsValues.find((commonFps) => Math.abs(fps - commonFps) < 0.01) ?? fps;-};+import {getVideoFrameRate} from './get-video-frame-rate';export const getMediaMetadata = async (src: string) => {const input = new Input({@@ -49,10 +37,13 @@ export const getMediaMetadata = async (src: string) => {height: await videoTrack.getDisplayHeight(),}: null;- const packetStats = await videoTrack?.computePacketStats(50);- const fps = packetStats- ? snapToCommonFps(packetStats.averagePacketRate)- : null;+ const frameRate = await getVideoFrameRate(input);+ const fps =+ frameRate === null+ ? null+ : frameRate.type === 'constant'+ ? frameRate.rate+ : frameRate.max;return {durationInSeconds,@@ -67,60 +58,10 @@ export const getMediaMetadata = async (src: string) => {<p>We load a URL (e.g. `https://remotion.media/video.mp4`) and parse it using Mediabunny.</p><p>We don't care which format, so we load all parsers using `ALL_FORMATS`.</p><p>By setting `getRetryDelay` to `() => null`, we prevent Mediabunny from infinitely retrying if the request fails.</p>- <p>We compute the duration, the dimensions and the frame rate. If the media file is an audio file, we return `null` for the dimensions and the frame rate.</p>- <p>To avoid reading the entire file, we at most read 50 packets to compute the frame rate.</p>- <p>The FPS is an estimate based on packet timestamps. We snap it to common FPS values because container timestamp rounding can return values such as `29.999` or `30.006` for videos that are nominally 30 FPS. Values like `29.97` and `59.94` are represented exactly as `30000 / 1001` and `60000 / 1001`.</p>+ <p>We compute the duration, dimensions, and frame rate. If the media file is an audio file, we return `null` for the dimensions and frame rate.</p></details>-```tsx twoslash title="Usage example"-// @filename: get-media-metadata.ts-import {Input, ALL_FORMATS, UrlSource} from 'mediabunny';--const commonFpsValues = [- 24000 / 1001,- 24,- 25,- 30000 / 1001,- 30,- 50,- 60000 / 1001,- 60,-];--const snapToCommonFps = (fps: number) => {- return commonFpsValues.find((commonFps) => Math.abs(fps - commonFps) < 0.01) ?? fps;-};--export const getMediaMetadata = async (src: string) => {- const input = new Input({- formats: ALL_FORMATS,- source: new UrlSource(src, {- getRetryDelay: () => null,- }),- });-- const durationInSeconds = await input.computeDuration();- const videoTrack = await input.getPrimaryVideoTrack();- const dimensions = videoTrack- ? {- width: await videoTrack.getDisplayWidth(),- height: await videoTrack.getDisplayHeight(),- }- : null;- const packetStats = await videoTrack?.computePacketStats(50);- const fps = packetStats- ? snapToCommonFps(packetStats.averagePacketRate)- : null;-- return {- durationInSeconds,- dimensions,- fps,- };-};--// @filename: index.ts-// ---cut---+```tsx title="Usage example"import {getMediaMetadata} from './get-media-metadata';const metadata = await getMediaMetadata('https://remotion.media/video.mp4');@@ -146,3 +87,7 @@ It can return more metadata than the browser, for example the frame rate or theThe assets are loaded using `fetch()`, so they must be accessible for the current website and not be blocked by CORS.In that case, you are better off using the [`getVideoMetadata()`](/docs/get-video-metadata) function from the [`@remotion/media-utils`](/docs/media-utils) package, which uses the `<video>` tag internally.++## See also++- [`getVideoFrameRate()`](/docs/mediabunny/frame-rate)diff --git a/packages/docs/docs/offthreadvideo.mdx b/packages/docs/docs/offthreadvideo.mdxindex 9c0d5a1f5f..ebd854e94b 100644--- a/packages/docs/docs/offthreadvideo.mdx+++ b/packages/docs/docs/offthreadvideo.mdx@@ -366,13 +366,9 @@ export const getMediaMetadata = async (src: string) => {height: videoTrack.displayHeight,}: null;- const packetStats = await videoTrack?.computePacketStats();- const fps = packetStats?.averagePacketRate ?? null;-return {durationInSeconds,dimensions,- fps,};};diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.tsindex c06810e237..8d3d8ea1fe 100644--- a/packages/docs/sidebars.ts+++ b/packages/docs/sidebars.ts@@ -1405,6 +1405,7 @@ const sidebars: SidebarsConfig = {'mediabunny/index','mediabunny/new-video','mediabunny/metadata',+ 'mediabunny/frame-rate','mediabunny/extract-thumbnail','mediabunny/extract-frames','mediabunny/can-decode',diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.tsindex eaf91c459e..a44f0ae9af 100644--- a/packages/docs/src/data/articles.ts+++ b/packages/docs/src/data/articles.ts@@ -4490,6 +4490,15 @@ export const articles = [noAi: false,slug: 'mediabunny/formats',},+ {+ id: 'mediabunny/frame-rate',+ title: 'Getting the frame rate of a video',+ relativePath: 'docs/mediabunny/frame-rate.mdx',+ compId: 'articles-docs-mediabunny-frame-rate',+ crumb: 'Mediabunny',+ noAi: false,+ slug: 'mediabunny/frame-rate',+ },{id: 'mediabunny/index',title: 'Remotion and Mediabunny',diff --git a/packages/docs/static/generated/articles-docs-mediabunny-frame-rate.png b/packages/docs/static/generated/articles-docs-mediabunny-frame-rate.pngnew file mode 100644index 0000000000..9e26a0bb0aBinary files /dev/null and b/packages/docs/static/generated/articles-docs-mediabunny-frame-rate.png differ