Skip to content

🎥 Make videos programmatically with React

call the package `@remotion/video`

JonnyBurger44337200c7c3
diff --git a/packages/STATS.md b/packages/STATS.md
index cd051b24b5..764e7c39f4 100644
--- a/packages/STATS.md
+++ b/packages/STATS.md
@@ -1,4 +1,5 @@
# Download statistics
+
Monthly downloads of Remotion packages
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/animated-emoji.svg?style=flat&color=black&label=@remotion/animated-emoji)](https://npmcharts.com/compare/@remotion/animated-emoji?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/animation-utils.svg?style=flat&color=black&label=@remotion/animation-utils)](https://npmcharts.com/compare/@remotion/animation-utils?minimal=true)
@@ -34,7 +35,7 @@ Monthly downloads of Remotion packages
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/media-parser.svg?style=flat&color=black&label=@remotion/media-parser)](https://npmcharts.com/compare/@remotion/media-parser?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/media-utils.svg?style=flat&color=black&label=@remotion/media-utils)](https://npmcharts.com/compare/@remotion/media-utils?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/motion-blur.svg?style=flat&color=black&label=@remotion/motion-blur)](https://npmcharts.com/compare/@remotion/motion-blur?minimal=true)
-[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/new-video.svg?style=flat&color=black&label=@remotion/new-video)](https://npmcharts.com/compare/@remotion/new-video?minimal=true)
+[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/video.svg?style=flat&color=black&label=@remotion/video)](https://npmcharts.com/compare/@remotion/video?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/noise.svg?style=flat&color=black&label=@remotion/noise)](https://npmcharts.com/compare/@remotion/noise?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/openai-whisper.svg?style=flat&color=black&label=@remotion/openai-whisper)](https://npmcharts.com/compare/@remotion/openai-whisper?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/paths.svg?style=flat&color=black&label=@remotion/paths)](https://npmcharts.com/compare/@remotion/paths?minimal=true)
@@ -56,4 +57,4 @@ Monthly downloads of Remotion packages
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/transitions.svg?style=flat&color=black&label=@remotion/transitions)](https://npmcharts.com/compare/@remotion/transitions?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/webcodecs.svg?style=flat&color=black&label=@remotion/webcodecs)](https://npmcharts.com/compare/@remotion/webcodecs?minimal=true)
[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/whisper-web.svg?style=flat&color=black&label=@remotion/whisper-web)](https://npmcharts.com/compare/@remotion/whisper-web?minimal=true)
-[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/zod-types.svg?style=flat&color=black&label=@remotion/zod-types)](https://npmcharts.com/compare/@remotion/zod-types?minimal=true)
+[![NPM Downloads](https://img.shields.io/npm/dm/@remotion/zod-types.svg?style=flat&color=black&label=@remotion/zod-types)](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.ts
index 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.ts
index 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.tsx
index 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>&lt;NewVideo /&gt;</code> for embedding videos.
+ An experimental <code>&lt;NewVideo /&gt;</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.mdx
index 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.png
title: '<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 twoslash
import {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 twoslash
import {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 twoslash
import {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 twoslash
import {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` of
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.
-
### `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 to
The 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.tsx
index 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.json
index 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.ts
index 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.ts
index 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.png
deleted file mode 100644
index 713068db36..0000000000
Binary files a/packages/docs/static/generated/articles-docs-new-video-index.png and /dev/null differ
diff --git a/packages/example/package.json b/packages/example/package.json
index 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.sh
index 5a7ddc5825..68ce531e8c 100644
--- a/packages/example/runlambda.sh
+++ b/packages/example/runlambda.sh
@@ -8,4 +8,4 @@ cd example
bunx remotion lambda functions rmall -f
bunx remotion lambda functions deploy --memory=3000 --disk=10000
bunx 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=20
diff --git a/packages/example/src/longVideoNoFlicker/longVideo.tsx b/packages/example/src/NewVideo/NewVideo.tsx
similarity index 84%
rename from packages/example/src/longVideoNoFlicker/longVideo.tsx
rename to packages/example/src/NewVideo/NewVideo.tsx
index 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.tsx
index 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 = () => {
/>
<Composition
id="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.tsx
index 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.ts
index 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.md
similarity index 96%
rename from packages/new-video/README.md
rename to packages/video/README.md
index 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.ts
similarity index 100%
rename from packages/new-video/bundle.ts
rename to packages/video/bundle.ts
diff --git a/packages/new-video/eslint.config.mjs b/packages/video/eslint.config.mjs
similarity index 100%
rename from packages/new-video/eslint.config.mjs
rename to packages/video/eslint.config.mjs
diff --git a/packages/new-video/package.json b/packages/video/package.json
similarity index 96%
rename from packages/new-video/package.json
rename to packages/video/package.json
index 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.ts
similarity index 100%
rename from packages/new-video/src/index.ts
rename to packages/video/src/index.ts
diff --git a/packages/new-video/src/newVideoForRendering.tsx b/packages/video/src/new-video-for-rendering.tsx
similarity index 93%
rename from packages/new-video/src/newVideoForRendering.tsx
rename to packages/video/src/new-video-for-rendering.tsx
index 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.tsx
similarity index 90%
rename from packages/new-video/src/new-video.tsx
rename to packages/video/src/new-video.tsx
index 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 down
diff --git a/packages/new-video/tsconfig.json b/packages/video/tsconfig.json
similarity index 100%
rename from packages/new-video/tsconfig.json
rename to packages/video/tsconfig.json
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 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.0
version: 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.0
version: 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.json
index c9b2030f47..3f602e1ffc 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -233,6 +233,9 @@
},
{
"path": "./packages/zod-types"
+ },
+ {
+ "path": "./packages/video"
}
]
}