🎥 Make videos programmatically with React
call the package `@remotion/video`
JonnyBurger44337200c7c3
diff --git a/packages/STATS.md b/packages/STATS.mdindex cd051b24b5..764e7c39f4 100644--- a/packages/STATS.md+++ b/packages/STATS.md@@ -1,4 +1,5 @@# Download statistics+Monthly downloads of Remotion packages[](https://npmcharts.com/compare/@remotion/animated-emoji?minimal=true)[](https://npmcharts.com/compare/@remotion/animation-utils?minimal=true)@@ -34,7 +35,7 @@ Monthly downloads of Remotion packages[](https://npmcharts.com/compare/@remotion/media-parser?minimal=true)[](https://npmcharts.com/compare/@remotion/media-utils?minimal=true)[](https://npmcharts.com/compare/@remotion/motion-blur?minimal=true)-[](https://npmcharts.com/compare/@remotion/new-video?minimal=true)+[](https://npmcharts.com/compare/@remotion/video?minimal=true)[](https://npmcharts.com/compare/@remotion/noise?minimal=true)[](https://npmcharts.com/compare/@remotion/openai-whisper?minimal=true)[](https://npmcharts.com/compare/@remotion/paths?minimal=true)@@ -56,4 +57,4 @@ Monthly downloads of Remotion packages[](https://npmcharts.com/compare/@remotion/transitions?minimal=true)[](https://npmcharts.com/compare/@remotion/webcodecs?minimal=true)[](https://npmcharts.com/compare/@remotion/whisper-web?minimal=true)-[](https://npmcharts.com/compare/@remotion/zod-types?minimal=true)+[](https://npmcharts.com/compare/@remotion/zod-types?minimal=true)diff --git a/packages/cli/src/list-of-remotion-packages.ts b/packages/cli/src/list-of-remotion-packages.tsindex fb2eda4c13..90d4e80913 100644--- a/packages/cli/src/list-of-remotion-packages.ts+++ b/packages/cli/src/list-of-remotion-packages.ts@@ -77,5 +77,5 @@ export const listOfRemotionPackages = ['@remotion/compositor','@remotion/example-videos','@remotion/whisper-web',- '@remotion/new-video',+ '@remotion/video',];diff --git a/packages/create-video/src/list-of-remotion-packages.ts b/packages/create-video/src/list-of-remotion-packages.tsindex fb2eda4c13..90d4e80913 100644--- a/packages/create-video/src/list-of-remotion-packages.ts+++ b/packages/create-video/src/list-of-remotion-packages.ts@@ -77,5 +77,5 @@ export const listOfRemotionPackages = ['@remotion/compositor','@remotion/example-videos','@remotion/whisper-web',- '@remotion/new-video',+ '@remotion/video',];diff --git a/packages/docs/components/TableOfContents/api.tsx b/packages/docs/components/TableOfContents/api.tsxindex 13bcf89da5..ff8f206a98 100644--- a/packages/docs/components/TableOfContents/api.tsx+++ b/packages/docs/components/TableOfContents/api.tsx@@ -1,39 +1,39 @@import React from 'react';import {TableOfContents as AnimatedEmojiTableOfContents} from '../../docs/animated-emoji/TableOfContents';-import { TableOfContents as NewVideoTableOfContents } from '../../docs/new-video/table-of-contents';+import {TableOfContents as AnimationUtilsTableOfContents} from '../../docs/animation-utils/table-of-contents';+import {TableOfContents as BundlerTableOfContents} from '../../docs/bundler/table-of-contents';import {TableOfContents as CaptionsTableOfContents} from '../../docs/captions/TableOfContents';+import {TableOfContents as CloudrunTableOfContents} from '../../docs/cloudrun/table-of-contents';import {TableOfContents as EnableScssTableOfContents} from '../../docs/enable-scss/TableOfContents';import {TableOfContents as FontsTableOfContents} from '../../docs/fonts-api/TableOfContents';+import {TableOfContents as GifTableOfContents} from '../../docs/gif/table-of-contents';import {TableOfContents as GoogleFontsTableOfContents} from '../../docs/google-fonts/TableOfContents';import {TableOfContents as InstallWhisperCppTableOfContents} from '../../docs/install-whisper-cpp/install-whisper-cpp';-import {TableOfContents as LicensingTableOfContents} from '../../docs/licensing/TableOfContents';-import {TableOfContents as MediaParserTableOfContents} from '../../docs/media-parser/TableOfContents';-import {TableOfContents as OpenAiWhisperTableOfContents} from '../../docs/openai-whisper/TableOfContents';-import {PlayerTableOfContents} from '../../docs/player/TableOfContents';-import {TableOfContents as RendererTableOfContents} from '../../docs/renderer/TableOfContents';-import {TableOfContents as SkiaTableOfContents} from '../../docs/skia/TableOfContents';-import {TableOfContents as StudioTableOfContents} from '../../docs/studio/TableOfContents';-import {TableOfContents as TailwindV4TableOfContents} from '../../docs/tailwind-v4/TableOfContents';-import {TableOfContents as TailwindTableOfContents} from '../../docs/tailwind/TableOfContents';-import {TableOfContents as ThreeTableOfContents} from '../../docs/three/TableOfContents';-import {TableOfContents as WebcodecsTableOfContents} from '../../docs/webcodecs/TableOfContents';-import {ZodTypesTableOfContents} from '../../docs/zod-types/TableOfContents';-import {TableOfContents as AnimationUtilsTableOfContents} from '../../docs/animation-utils/table-of-contents';-import {TableOfContents as BundlerTableOfContents} from '../../docs/bundler/table-of-contents';-import {TableOfContents as CloudrunTableOfContents} from '../../docs/cloudrun/table-of-contents';-import {TableOfContents as GifTableOfContents} from '../../docs/gif/table-of-contents';import {TableOfContents as LambdaTableOfContents} from '../../docs/lambda/table-of-contents';import {TableOfContents as LayoutUtilsTableOfContents} from '../../docs/layout-utils/table-of-contents';+import {TableOfContents as LicensingTableOfContents} from '../../docs/licensing/TableOfContents';import {TableOfContents as LottieTableOfContents} from '../../docs/lottie/table-of-contents';+import {TableOfContents as MediaParserTableOfContents} from '../../docs/media-parser/TableOfContents';import {TableOfContents as MediaUtilsTableOfContents} from '../../docs/media-utils/table-of-contents';import {TableOfContents as MotionBlurTableOfContents} from '../../docs/motion-blur/table-of-contents';import {TableOfContents as NoiseTableOfContents} from '../../docs/noise/table-of-contents';+import {TableOfContents as OpenAiWhisperTableOfContents} from '../../docs/openai-whisper/TableOfContents';import {TableOfContents as PathsTableOfContents} from '../../docs/paths/table-of-contents';+import {PlayerTableOfContents} from '../../docs/player/TableOfContents';import {TableOfContents as PreloadTableOfContents} from '../../docs/preload/table-of-contents';import {TableOfContents as RemotionTableOfContents} from '../../docs/remotion/table-of-contents';+import {TableOfContents as RendererTableOfContents} from '../../docs/renderer/TableOfContents';import {TableOfContents as RiveTableOfContents} from '../../docs/rive/table-of-contents';import {TableOfContents as ShapesTableOfContents} from '../../docs/shapes/table-of-contents';+import {TableOfContents as SkiaTableOfContents} from '../../docs/skia/TableOfContents';+import {TableOfContents as StudioTableOfContents} from '../../docs/studio/TableOfContents';+import {TableOfContents as TailwindV4TableOfContents} from '../../docs/tailwind-v4/TableOfContents';+import {TableOfContents as TailwindTableOfContents} from '../../docs/tailwind/TableOfContents';+import {TableOfContents as ThreeTableOfContents} from '../../docs/three/TableOfContents';import {TableOfContents as TransitionsTableOfContents} from '../../docs/transitions/table-of-contents';+import {TableOfContents as NewVideoTableOfContents} from '../../docs/video/table-of-contents';+import {TableOfContents as WebcodecsTableOfContents} from '../../docs/webcodecs/TableOfContents';+import {ZodTypesTableOfContents} from '../../docs/zod-types/TableOfContents';import {Grid} from './Grid';import {TOCItem} from './TOCItem';@@ -60,9 +60,10 @@ export const TableOfContents: React.FC = () => {etc.</p><RemotionTableOfContents />- <h2>@remotion/new-video</h2>+ <h2>@remotion/video</h2><p>- The experimental <code><NewVideo /></code> for embedding videos.+ An experimental <code><NewVideo /></code> tag for embedding+ videos.</p><NewVideoTableOfContents /><h2>@remotion/bundler</h2>diff --git a/packages/docs/docs/new-video/index.mdx b/packages/docs/docs/new-video/index.mdxindex 4f5b84556c..ac84c9f5a2 100644--- a/packages/docs/docs/new-video/index.mdx+++ b/packages/docs/docs/new-video/index.mdx@@ -1,5 +1,4 @@----image: /generated/articles-docs-new-video-index.pngtitle: '<NewVideo>'crumb: 'API'---@@ -8,13 +7,13 @@ crumb: 'API'**Experimental Tag**: This tag is currently under development and experimental phase, which means that it can still be used but the API is unstable.:::-This component imports and displays a video, similar to [`<OffthreadVideo/>`](/docs/offthreadvideo) but during rendering, extracts the exact frame from the video using [`extractFrames()`](/docs/webcodecs/extract-frames) and displays it in a `<canvas>` tag, this ensures that the video is rendered with high accuracy and supports a wide range of codecs more reliably, significantly reducing the [flickering issues](/docs/flickering).+This component imports and displays a video, similar to [`<OffthreadVideo/>`](/docs/offthreadvideo) but during rendering, extracts the exact frame from the video using [`extractFrames()`](/docs/webcodecs/extract-frames) and displays it in a `<canvas>` tag, this ensures that the video is rendered with high accuracy and supports a wide range of codecs more reliably, significantly reducing the [flickering issues](/docs/flickering).## Example```tsx twoslashimport {AbsoluteFill, staticFile} from 'remotion';-import {NewVideo} from '@remotion/new-video'+import {NewVideo} from '@remotion/video';export const MyVideo = () => {return (@@ -29,7 +28,7 @@ You can load a video from an URL as well:```tsx twoslashimport {AbsoluteFill} from 'remotion';-import {NewVideo} from '@remotion/new-video'+import {NewVideo} from '@remotion/video';// ---cut---export const MyComposition = () => {return (@@ -61,7 +60,7 @@ For exact behavior, see: [Order of operations](/docs/audio/order-of-operations).```tsx twoslashimport {AbsoluteFill, staticFile} from 'remotion';-import {NewVideo} from '@remotion/new-video'+import {NewVideo} from '@remotion/video';// ---cut---export const MyComposition = () => {@@ -75,7 +74,7 @@ export const MyComposition = () => {### `trimAfter?`<AvailableFrom v="4.0.319"/>-Removes a portion of the video at the end (right side). See [`trimBefore`](/docs/new-video#trimbefore) for an explanation.+Removes a portion of the video at the end (right side). See [`trimBefore`](/docs/video#trimbefore) for an explanation.### ~~`startFrom?`~~@@ -96,7 +95,7 @@ For exact behavior, see: [Order of operations](/docs/audio/order-of-operations).```tsx twoslashimport {AbsoluteFill, staticFile} from 'remotion';-import {NewVideo} from '@remotion/new-video';+import {NewVideo} from '@remotion/video';// ---cut---export const MyComposition = () => {@@ -114,7 +113,7 @@ export const MyComposition = () => {This prop has been renamed to [`trimAfter`](#trimafter) in 4.0.319. It will continue to work but you cannot use it together with the new prop.:::-Removes a portion of the video at the end. See [`startFrom`](/docs/new-video#startfrom) for an explanation.+Removes a portion of the video at the end. See [`startFrom`](/docs/video#startfrom) for an explanation.### `volume?`@@ -122,7 +121,7 @@ Allows you to control the volume for the whole track or change it on a per-frame```tsx twoslash title="Example using static volume"import {AbsoluteFill, staticFile} from 'remotion';-import {NewVideo} from '@remotion/new-video'+import {NewVideo} from '@remotion/video';// ---cut---export const MyComposition = () => {@@ -136,7 +135,7 @@ export const MyComposition = () => {```tsx twoslash title="Example of a ramp up over 100 frames"import {AbsoluteFill, interpolate, staticFile} from 'remotion';-import {NewVideo} from '@remotion/new-video';+import {NewVideo} from '@remotion/video';// ---cut---export const MyComposition = () => {@@ -198,8 +197,7 @@ While Remotion doesn't limit the range of possible playback speeds, in developme```tsx twoslash title="Example of a video playing twice as fast"import {AbsoluteFill, staticFile} from 'remotion';-import {NewVideo} from '@remotion/new-video';-+import {NewVideo} from '@remotion/video';// ---cut---export const MyComposition = () => {@@ -217,7 +215,7 @@ You can drop the audio of the video by adding a `muted` prop:```tsx twoslash title="Example of a muted video"import {AbsoluteFill, OffthreadVideo} from 'remotion';-import {NewVideo} from '@remotion/new-video';+import {NewVideo} from '@remotion/video';// ---cut---export const MyComposition = () => {return (@@ -244,7 +242,6 @@ A `toneFrequency` of 0.5 would lower the pitch by half, and a `toneFrequency` ofIf 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.-### `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`.@@ -295,9 +292,8 @@ Deprecated since v4.0.279: This prop intended to opt into setting the volume toThe option does not make sense anymore, because it is now possible to set the volume higher than `1`.To prevent synthetic amplification, set a volume not higher than 1.-## See also-- [Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/new-video/src/new-video.tsx)+- [Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/video/src/video.tsx)- [`<Video />`](/docs/video)- [`<OffthreadVideo>`](/docs/offthreadvideo)diff --git a/packages/docs/docs/new-video/table-of-contents.tsx b/packages/docs/docs/new-video/table-of-contents.tsxindex f921da75fc..6d568819d4 100644--- a/packages/docs/docs/new-video/table-of-contents.tsx+++ b/packages/docs/docs/new-video/table-of-contents.tsx@@ -1,16 +1,16 @@-import React from "react";-import { Grid } from "../../components/TableOfContents/Grid";-import { TOCItem } from "../../components/TableOfContents/TOCItem";+import React from 'react';+import {Grid} from '../../components/TableOfContents/Grid';+import {TOCItem} from '../../components/TableOfContents/TOCItem';export const TableOfContents: React.FC = () => {- return (- <div>- <Grid>- <TOCItem link="/docs/new-video">- <strong>{"<NewVideo>"}</strong>- <div>Tag for reliable and accurate video embedding</div>- </TOCItem>- </Grid>- </div>- );+ return (+ <div>+ <Grid>+ <TOCItem link="/docs/video">+ <strong>{'<NewVideo>'}</strong>+ <div>Tag for reliable and accurate video embedding</div>+ </TOCItem>+ </Grid>+ </div>+ );};diff --git a/packages/docs/package.json b/packages/docs/package.jsonindex 2af32481b8..ae2bcfb5d3 100644--- a/packages/docs/package.json+++ b/packages/docs/package.json@@ -34,7 +34,7 @@"@remotion/svg-3d-engine": "workspace:*","@remotion/animated-emoji": "workspace:*","@remotion/animation-utils": "workspace:*",- "@remotion/new-video": "workspace:*",+ "@remotion/video": "workspace:*","@remotion/babel-loader": "workspace:*","@remotion/bundler": "workspace:*","@remotion/cli": "workspace:*",diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.tsindex 6621da0a80..8e61cbf56c 100644--- a/packages/docs/sidebars.ts+++ b/packages/docs/sidebars.ts@@ -175,16 +175,14 @@ const sidebars: SidebarsConfig = {'watchstaticfile',],},- {+ {type: 'category',- label: '@remotion/new-video',+ label: '@remotion/video',link: {type: 'doc',- id: 'new-video/index',+ id: 'video/index',},- items: [- 'new-video/index'- ],+ items: ['video/index'],},{type: 'category',diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.tsindex 361865a39c..74087b8b67 100644--- a/packages/docs/src/data/articles.ts+++ b/packages/docs/src/data/articles.ts@@ -3433,13 +3433,13 @@ export const articles = [slug: 'multiple-fps',},{- id: 'new-video/index',+ id: 'video/index',title: '<NewVideo>',- relativePath: 'docs/new-video/index.mdx',- compId: 'articles-docs-new-video-index',+ relativePath: 'docs/video/index.mdx',+ compId: 'articles-docs-video-index',crumb: 'API',noAi: false,- slug: 'new-video/index',+ slug: 'video/index',},{id: 'noise-visualization',diff --git a/packages/docs/static/generated/articles-docs-new-video-index.png b/packages/docs/static/generated/articles-docs-new-video-index.pngdeleted file mode 100644index 713068db36..0000000000Binary files a/packages/docs/static/generated/articles-docs-new-video-index.png and /dev/null differdiff --git a/packages/example/package.json b/packages/example/package.jsonindex 637c256c02..9d65820beb 100644--- a/packages/example/package.json+++ b/packages/example/package.json@@ -35,7 +35,7 @@"@remotion/animated-emoji": "workspace:*","@remotion/animation-utils": "workspace:*","@remotion/babel-loader": "workspace:*",- "@remotion/new-video": "workspace:*",+ "@remotion/video": "workspace:*","@remotion/webcodecs": "workspace:*","@remotion/bundler": "workspace:*","@remotion/cli": "workspace:*",diff --git a/packages/example/runlambda.sh b/packages/example/runlambda.shindex 5a7ddc5825..68ce531e8c 100644--- a/packages/example/runlambda.sh+++ b/packages/example/runlambda.sh@@ -8,4 +8,4 @@ cd examplebunx remotion lambda functions rmall -fbunx remotion lambda functions deploy --memory=3000 --disk=10000bunx remotion lambda sites create --site-name=testbed-v6 --log=verbose --enable-folder-expiry-bunx remotion lambda render testbed-v6 OffthreadRemoteVideo --log=verbose --delete-after="1-day" --api-key=rm_pub_9a996d341238eaa34e696b099968d8510420b9f6ba4aa0ee --frames-per-lambda=20+bunx remotion lambda render testbed-v6 longVideo --log=verbose --delete-after="1-day" --api-key=rm_pub_9a996d341238eaa34e696b099968d8510420b9f6ba4aa0ee --frames-per-lambda=20diff --git a/packages/example/src/longVideoNoFlicker/longVideo.tsx b/packages/example/src/NewVideo/NewVideo.tsxsimilarity index 84%rename from packages/example/src/longVideoNoFlicker/longVideo.tsxrename to packages/example/src/NewVideo/NewVideo.tsxindex 37118b21e3..96f0540cbb 100644--- a/packages/example/src/longVideoNoFlicker/longVideo.tsx+++ b/packages/example/src/NewVideo/NewVideo.tsx@@ -1,7 +1,7 @@-import {NewVideo} from '@remotion/new-video';+import {NewVideo} from '@remotion/video';import {AbsoluteFill, staticFile} from 'remotion';-export const LongVideo: React.FC = () => {+export const NewVideoExample: React.FC = () => {return (<><AbsoluteFill>diff --git a/packages/example/src/Root.tsx b/packages/example/src/Root.tsxindex 8cc5a05198..e579b60f7b 100644--- a/packages/example/src/Root.tsx+++ b/packages/example/src/Root.tsx@@ -124,7 +124,7 @@ import {} from './Compose/WhatIsRemotion';import {EdgeBlur} from './EdgeBlur/EdgeBlur';import {Empty} from './Empty';-import {LongVideo} from './longVideoNoFlicker/longVideo';+import {NewVideoExample} from './NewVideo/NewVideo';import {LoopedOffthreadRemoteVideo} from './OffthreadRemoteVideo/LoopedOffthreadRemoteVideo';import {OffthreadRemoteSeries} from './OffthreadRemoteVideo/OffthreadRemoteSeries';import {ParseAndDownloadMedia} from './ParseAndDownloadMedia';@@ -703,7 +703,7 @@ export const Index: React.FC = () => {/><Compositionid="longVideo"- component={LongVideo}+ component={NewVideoExample}fps={30}height={720}width={1280}diff --git a/packages/example/src/VideoTesting/index.tsx b/packages/example/src/VideoTesting/index.tsxindex 4d88073575..43d5067215 100644--- a/packages/example/src/VideoTesting/index.tsx+++ b/packages/example/src/VideoTesting/index.tsx@@ -1,3 +1,4 @@+import {NewVideo} from '@remotion/video';import {OffthreadVideo,Sequence,@@ -5,7 +6,6 @@ import {useVideoConfig,Video,} from 'remotion';-import {NewVideo} from '../../../new-video/dist';export const VideoTesting: React.FC<{codec: 'mp4' | 'webm';diff --git a/packages/studio-shared/src/package-info.ts b/packages/studio-shared/src/package-info.tsindex bbac6a536b..d7f53ffb18 100644--- a/packages/studio-shared/src/package-info.ts+++ b/packages/studio-shared/src/package-info.ts@@ -76,7 +76,7 @@ export const packages = ['compositor','example-videos','whisper-web',- 'new-video',+ 'video',] as const;export type Pkgs = (typeof packages)[number];@@ -163,7 +163,7 @@ export const descriptions: {[key in Pkgs]: string | null} = {'promo-pages': null,'svg-3d-engine': '3D SVG extrusion effects','serverless-client': null,- 'new-video': 'Experimental tag for reliable and accurate video embedding',+ video: 'Experimental tag for reliable and accurate video embedding',};export const installableMap: {[key in Pkgs]: boolean} = {'svg-3d-engine': false,@@ -243,7 +243,7 @@ export const installableMap: {[key in Pkgs]: boolean} = {'openai-whisper': true,compositor: false,'example-videos': false,- 'new-video': false,+ video: false,};export const apiDocs: {[key in Pkgs]: string | null} = {@@ -327,5 +327,5 @@ export const apiDocs: {[key in Pkgs]: string | null} = {'example-videos': null,'promo-pages': null,'svg-3d-engine': null,- 'new-video': null,+ video: null,};diff --git a/packages/new-video/README.md b/packages/video/README.mdsimilarity index 96%rename from packages/new-video/README.mdrename to packages/video/README.mdindex 295670856d..faa2ef581c 100644--- a/packages/new-video/README.md+++ b/packages/video/README.md@@ -1,7 +1,7 @@# @remotion/new-video-+Experimental tag for reliable and accurate video embedding-+## Usage-+This is an internal package and has no documentation.diff --git a/packages/new-video/bundle.ts b/packages/video/bundle.tssimilarity index 100%rename from packages/new-video/bundle.tsrename to packages/video/bundle.tsdiff --git a/packages/new-video/eslint.config.mjs b/packages/video/eslint.config.mjssimilarity index 100%rename from packages/new-video/eslint.config.mjsrename to packages/video/eslint.config.mjsdiff --git a/packages/new-video/package.json b/packages/video/package.jsonsimilarity index 96%rename from packages/new-video/package.jsonrename to packages/video/package.jsonindex 08f054cc6a..a75dd5a5f0 100644--- a/packages/new-video/package.json+++ b/packages/video/package.json@@ -1,11 +1,11 @@{- "name": "@remotion/new-video",+ "name": "@remotion/video","version": "4.0.325","main": "dist/index.js","types": "dist/index.d.ts","module": "dist/esm/index.mjs","repository": {- "url": "https://github.com/remotion-dev/remotion/tree/main/packages/new-video"+ "url": "https://github.com/remotion-dev/remotion/tree/main/packages/video"},"sideEffects": false,"author": "Hunain Ahmed <[email protected]>",diff --git a/packages/new-video/src/index.ts b/packages/video/src/index.tssimilarity index 100%rename from packages/new-video/src/index.tsrename to packages/video/src/index.tsdiff --git a/packages/new-video/src/newVideoForRendering.tsx b/packages/video/src/new-video-for-rendering.tsxsimilarity index 93%rename from packages/new-video/src/newVideoForRendering.tsxrename to packages/video/src/new-video-for-rendering.tsxindex 4b3a4b0a85..08a96bc642 100644--- a/packages/new-video/src/newVideoForRendering.tsx+++ b/packages/video/src/new-video-for-rendering.tsx@@ -138,15 +138,10 @@ export const NewVideoForRendering: React.FC<RemotionOffthreadVideoProps> = ({extractFrames({src,// eslint-disable-next-line require-await- timestampsInSeconds: async ({container}) => {+ timestampsInSeconds: async () => {const actualFPS = playbackRate ? fps / playbackRate : fps;- let timestamp;- if (container === 'mp4') {- timestamp = Math.round(((frame + 1) / actualFPS) * 1000 + 1) / 1000;- } else {- timestamp = Math.round((frame / actualFPS) * 1000) / 1000;- }+ const timestamp = Math.round((frame / actualFPS) * 1000) / 1000;return [timestamp];},onFrame: (extractedFrame) => {diff --git a/packages/new-video/src/new-video.tsx b/packages/video/src/new-video.tsxsimilarity index 90%rename from packages/new-video/src/new-video.tsxrename to packages/video/src/new-video.tsxindex 2c0c3f6526..9d2131d561 100644--- a/packages/new-video/src/new-video.tsx+++ b/packages/video/src/new-video.tsx@@ -1,17 +1,15 @@import React, {useCallback} from 'react';import type {RemotionOffthreadVideoProps} from 'remotion';import {getRemotionEnvironment, Internals, Sequence} from 'remotion';-import {NewVideoForRendering} from './newVideoForRendering';+import {NewVideoForRendering} from './new-video-for-rendering';+const {validateMediaTrimProps,resolveTrimProps,validateMediaProps,VideoForPreview,} = Internals;-/*- * @description This method uses extractFrames() under the hood to reliably and accurately render video codecs.- * @see [Documentation](https://www.remotion.dev/docs/new-video)- */+export const NewVideo: React.FC<RemotionOffthreadVideoProps> = (props) => {// Should only destruct `startFrom` and `endAt` from props,// rest gets drilled downdiff --git a/packages/new-video/tsconfig.json b/packages/video/tsconfig.jsonsimilarity index 100%rename from packages/new-video/tsconfig.jsonrename to packages/video/tsconfig.jsondiff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex e9930edf81..d5e34d80e8 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -647,9 +647,6 @@ importers:'@remotion/motion-blur':specifier: workspace:*version: link:../motion-blur- '@remotion/new-video':- specifier: workspace:*- version: link:../new-video'@remotion/noise':specifier: workspace:*version: link:../noise@@ -698,6 +695,9 @@ importers:'@remotion/transitions':specifier: workspace:*version: link:../transitions+ '@remotion/video':+ specifier: workspace:*+ version: link:../video'@remotion/webcodecs':specifier: workspace:*version: link:../webcodecs@@ -1037,9 +1037,6 @@ importers:'@remotion/motion-blur':specifier: workspace:*version: link:../motion-blur- '@remotion/new-video':- specifier: workspace:*- version: link:../new-video'@remotion/noise':specifier: workspace:*version: link:../noise@@ -1079,6 +1076,9 @@ importers:'@remotion/transitions':specifier: workspace:*version: link:../transitions+ '@remotion/video':+ specifier: workspace:*+ version: link:../video'@remotion/webcodecs':specifier: workspace:*version: link:../webcodecs@@ -1685,28 +1685,6 @@ importers:specifier: 19.0.0version: 19.0.0([email protected])- packages/new-video:- dependencies:- '@remotion/webcodecs':- specifier: workspace:*- version: link:../webcodecs- remotion:- specifier: workspace:*- version: link:../core- devDependencies:- '@remotion/eslint-config-internal':- specifier: workspace:*- version: link:../eslint-config-internal- eslint:- specifier: 9.19.0- version: 9.19.0- react:- specifier: 19.0.0- version: 19.0.0- react-dom:- specifier: 19.0.0- version: 19.0.0([email protected])-packages/noise:dependencies:remotion:@@ -3678,6 +3656,28 @@ importers:specifier: 19.0.0version: 19.0.0([email protected])+ packages/video:+ dependencies:+ '@remotion/webcodecs':+ specifier: workspace:*+ version: link:../webcodecs+ remotion:+ specifier: workspace:*+ version: link:../core+ devDependencies:+ '@remotion/eslint-config-internal':+ specifier: workspace:*+ version: link:../eslint-config-internal+ eslint:+ specifier: 9.19.0+ version: 9.19.0+ react:+ specifier: 19.0.0+ version: 19.0.0+ react-dom:+ specifier: 19.0.0+ version: 19.0.0([email protected])+packages/webcodecs:dependencies:'@remotion/licensing':diff --git a/tsconfig.json b/tsconfig.jsonindex c9b2030f47..3f602e1ffc 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -233,6 +233,9 @@},{"path": "./packages/zod-types"+ },+ {+ "path": "./packages/video"}]}