Skip to content

🎥 Make videos programmatically with React

update docs

Jonny Burger308ac2407454
diff --git a/packages/docs/docs/media-parser/webcodecs.mdx b/packages/docs/docs/media-parser/webcodecs.mdx
index eea345de5e..c10d255c14 100644
--- a/packages/docs/docs/media-parser/webcodecs.mdx
+++ b/packages/docs/docs/media-parser/webcodecs.mdx
@@ -49,6 +49,7 @@ Video files usually come in one of two container formats: ISO BMFF (.mp4, .mov)
Libraries like mp4box.js do a good job of parsing these containers, but are scoped to the specific container format, meaning you need to mix multiple libraries.
[`parseMedia()`](/docs/media-parser/parse-media) allows to to read an arbitrary video file (in the future: an arbitrary media file) and interface with it regardless of container, video codec and audio codec.
+
It uses modern Web APIs like `fetch()`, `ReadableStream` and resizeable ArrayBuffers, and returns data structures that are designed to be used with WebCodecs APIs.
## Will Remotion switch to WebCodecs?
@@ -61,6 +62,8 @@ An exception is the `canvas` element, however Remotion supports all ways of draw
We are interested in WebCodecs because it still has the potential to solve a lot of problems for developers and `@remotion/media-parser` as a whole can solve a lot of problems for users.
+See also: [Can I render videos in the browser?](/docs/miscellaneous/render-in-browser).
+
## Practical considerations
If you use `parseMedia()` with codecs, make the following considerations for your implementation.
diff --git a/packages/docs/docs/miscellaneous/render-in-browser.mdx b/packages/docs/docs/miscellaneous/render-in-browser.mdx
index 49ca0bc2c0..9feffccd88 100644
--- a/packages/docs/docs/miscellaneous/render-in-browser.mdx
+++ b/packages/docs/docs/miscellaneous/render-in-browser.mdx
@@ -9,7 +9,7 @@ crumb: "FAQ"
## Will it be supported in the future?
-Currently there is no browser API that allows to capture the viewport. A proposed API that would allow this is [Element Capture](https://github.com/WICG/proposals/issues/73).
+Currently there is no browser API that allows to capture the viewport. There [are](https://x.com/fserb/status/1794058245901824349) [some](https://github.com/WICG/proposals/issues/73) proposed APIs for it.
If such an API gets introduced, we can consider supporting browser rendering in the future.
## Why not...
@@ -18,10 +18,6 @@ If such an API gets introduced, we can consider supporting browser rendering in
Chrome extensions do get the privilege of capturing the viewport. We may explore this in the future, but the combination of asking the user to install an extension and slow render times means we are not prioritizing this feature.
-### [ffmpeg.wasm](https://github.com/ffmpegwasm/ffmpeg.wasm)?
-
-It is an excellent project that allows us to encode videos in the browser, which may be part of a solution, but we can still not capture the viewport of the browser.
-
### [`canvas.getImageData()`](https://developer.mozilla.org/de/docs/Web/API/CanvasRenderingContext2D/getImageData)?
It allows to capture the pixels from a canvas, however Remotion videos can be written with any web technology including HTML and SVG. Canvas elements are just a subset of what's supported in Remotion.
diff --git a/packages/docs/docusaurus.config.js b/packages/docs/docusaurus.config.js
index a3314ccb6b..7ff2ccbfe6 100644
--- a/packages/docs/docusaurus.config.js
+++ b/packages/docs/docusaurus.config.js
@@ -4,323 +4,324 @@
* @returns
*/
const config = (mode) => ({
- title: "Remotion | Make videos programmatically",
- tagline: "Make videos programmatically",
- url: "https://www.remotion.dev",
- baseUrl: "/",
- onBrokenLinks: "throw",
- onBrokenMarkdownLinks: "warn",
- favicon: "img/favicon.png",
- organizationName: "remotion-dev", // Usually your GitHub org/user name.
- projectName: "remotion", // Usually your repo name.
- webpack: {
- jsLoader: (isServer) => ({
- loader: require.resolve("swc-loader"),
- options: {
- jsc: {
- parser: {
- syntax: "typescript",
- tsx: true,
- },
- target: "es2017",
- },
- module: {
- type: isServer ? "commonjs" : "es6",
- },
- },
- }),
- },
- themeConfig: {
- algolia: {
- appId: "PLSDUOL1CA",
- apiKey: "3e42dbd4f895fe93ff5cf40d860c4a85",
- indexName: "remotion",
- contextualSearch: false,
- },
- image: "img/social-preview.png",
- navbar: {
- logo: {
- alt: "Remotion Logo",
- src: "img/new-logo.png",
- srcDark: "img/remotion-white.png",
- },
- items: [
- {
- to: "/docs",
- label: "Docs",
- position: "left",
- type: mode === "complete" ? "docSidebar" : "doc",
- docId: mode === "complete" ? undefined : "new-doc",
- sidebarId: mode === "complete" ? "mainSidebar" : undefined,
- },
- mode === "complete"
- ? {
- to: "/docs/api",
- label: "API",
- position: "left",
- type: "docSidebar",
- sidebarId: "apiSidebar",
- }
- : null,
- {
- to: "https://www.remotion.pro/license",
- label: "Pricing",
- position: "left",
- },
- {
- type: "dropdown",
- label: "More",
- position: "left",
- items: [
- {
- to: "/docs/resources",
- label: "Resources",
- },
- { to: "showcase", label: "Showcase" },
- { to: "success-stories", label: "Success Stories" },
- { to: "blog", label: "Blog" },
- { to: "learn", label: "Learn" },
- { to: "experts", label: "Experts" },
- { to: "https://remotion.pro/store", label: "Store" },
- { to: "/docs/support", label: "Support" },
- { to: "about", label: "About us" },
- { to: "contact", label: "Contact us" },
- ],
- },
- {
- href: "https://github.com/remotion-dev/remotion",
- position: "right",
- className: "header-github-link",
- "aria-label": "GitHub repository",
- },
- {
- href: "https://remotion.dev/discord",
- position: "right",
- className: "header-discord-link",
- "aria-label": "Discord",
- },
- {
- href: "https://x.com/remotion",
- position: "right",
- className: "header-x-link",
- "aria-label": "X / Twitter",
- },
- ].filter(Boolean),
- },
- footer: {
- style: "light",
- links: [
- {
- title: "Remotion",
- items: [
- {
- label: "Getting started",
- to: "/docs/",
- },
- {
- label: "API Reference",
- to: "/docs/api",
- },
- {
- label: "Player",
- to: "/player",
- },
- {
- label: "Lambda",
- to: "/lambda",
- },
- {
- label: "Learn",
- to: "/learn",
- },
- {
- label: "Store",
- href: "https://remotion.pro/store",
- },
- {
- label: "Changelog",
- href: "https://remotion.dev/changelog",
- },
- {
- label: "GitHub",
- href: "https://github.com/remotion-dev/remotion",
- },
- {
- label: "Remotion Pro",
- href: "https://remotion.pro",
- },
- ],
- },
- {
- title: "Community",
- items: [
- {
- label: "Showcase",
- to: "showcase",
- },
- {
- label: "Experts",
- to: "experts",
- },
+ title: 'Remotion | Make videos programmatically',
+ tagline: 'Make videos programmatically',
+ url: 'https://www.remotion.dev',
+ baseUrl: '/',
+ onBrokenLinks: 'throw',
+ onBrokenMarkdownLinks: 'warn',
+ favicon: 'img/favicon.png',
+ organizationName: 'remotion-dev', // Usually your GitHub org/user name.
+ projectName: 'remotion', // Usually your repo name.
+ webpack: {
+ jsLoader: (isServer) => ({
+ loader: require.resolve('swc-loader'),
+ options: {
+ jsc: {
+ parser: {
+ syntax: 'typescript',
+ tsx: true,
+ },
+ target: 'es2017',
+ },
+ module: {
+ type: isServer ? 'commonjs' : 'es6',
+ },
+ },
+ }),
+ },
+ themeConfig: {
+ algolia: {
+ appId: 'PLSDUOL1CA',
+ apiKey: '3e42dbd4f895fe93ff5cf40d860c4a85',
+ indexName: 'remotion',
+ contextualSearch: false,
+ },
+ image: 'img/social-preview.png',
+ navbar: {
+ logo: {
+ alt: 'Remotion Logo',
+ src: 'img/new-logo.png',
+ srcDark: 'img/remotion-white.png',
+ },
+ items: [
+ {
+ to: '/docs',
+ label: 'Docs',
+ position: 'left',
+ type: mode === 'complete' ? 'docSidebar' : 'doc',
+ docId: mode === 'complete' ? undefined : 'new-doc',
+ sidebarId: mode === 'complete' ? 'mainSidebar' : undefined,
+ },
+ mode === 'complete'
+ ? {
+ to: '/docs/api',
+ label: 'API',
+ position: 'left',
+ type: 'docSidebar',
+ sidebarId: 'apiSidebar',
+ }
+ : null,
+ {
+ to: 'https://www.remotion.pro/license',
+ label: 'Pricing',
+ position: 'left',
+ },
+ {
+ type: 'dropdown',
+ label: 'More',
+ position: 'left',
+ items: [
+ {
+ to: '/docs/resources',
+ label: 'Resources',
+ },
+ {to: 'showcase', label: 'Showcase'},
+ {to: 'success-stories', label: 'Success Stories'},
+ {to: 'blog', label: 'Blog'},
+ {to: 'learn', label: 'Learn'},
+ {to: 'experts', label: 'Experts'},
+ {to: 'https://remotion.pro/store', label: 'Store'},
+ {to: '/docs/support', label: 'Support'},
+ {to: 'about', label: 'About us'},
+ {to: 'contact', label: 'Contact us'},
+ ],
+ },
+ {
+ href: 'https://github.com/remotion-dev/remotion',
+ position: 'right',
+ className: 'header-github-link',
+ 'aria-label': 'GitHub repository',
+ },
+ {
+ href: 'https://remotion.dev/discord',
+ position: 'right',
+ className: 'header-discord-link',
+ 'aria-label': 'Discord',
+ },
+ {
+ href: 'https://x.com/remotion',
+ position: 'right',
+ className: 'header-x-link',
+ 'aria-label': 'X / Twitter',
+ },
+ ].filter(Boolean),
+ },
+ footer: {
+ style: 'light',
+ links: [
+ {
+ title: 'Remotion',
+ items: [
+ {
+ label: 'Getting started',
+ to: '/docs/',
+ },
+ {
+ label: 'API Reference',
+ to: '/docs/api',
+ },
+ {
+ label: 'Player',
+ to: '/player',
+ },
+ {
+ label: 'Lambda',
+ to: '/lambda',
+ },
+ {
+ label: 'Learn',
+ to: '/learn',
+ },
+ {
+ label: 'Store',
+ href: 'https://remotion.pro/store',
+ },
+ {
+ label: 'Changelog',
+ href: 'https://remotion.dev/changelog',
+ },
+ {
+ label: 'GitHub',
+ href: 'https://github.com/remotion-dev/remotion',
+ },
+ {
+ label: 'Remotion Pro',
+ href: 'https://remotion.pro',
+ },
+ ],
+ },
+ {
+ title: 'Community',
+ items: [
+ {
+ label: 'Showcase',
+ to: 'showcase',
+ },
+ {
+ label: 'Experts',
+ to: 'experts',
+ },
- {
- label: "Discord",
- href: "https://remotion.dev/discord",
- },
- {
- label: "X",
- href: "https://x.com/remotion",
- },
- {
- label: "YouTube",
- href: "https://youtube.com/@remotion_dev",
- },
- {
- label: "LinkedIn",
- href: "https://www.linkedin.com/company/remotion-dev/",
- },
- {
- label: "Instagram",
- href: "https://instagram.com/remotion",
- },
- {
- label: "TikTok",
- href: "https://www.tiktok.com/@remotion",
- },
- {
- label: "Threads",
- href: "https://www.threads.net/@remotion",
- },
- ],
- },
- {
- title: "More",
- items: [
- {
- label: "About us",
- to: "about",
- },
- {
- label: "Contact us",
- to: "contact",
- },
- mode === "complete"
- ? {
- label: "Blog",
- to: "blog",
- }
- : null,
- {
- label: "Success Stories",
- to: "success-stories",
- },
- {
- label: "Support",
- to: "/docs/support",
- },
- {
- label: "Acknowledgements",
- href: "https://remotion.dev/acknowledgements",
- },
- {
- label: "License",
- href: "https://remotion.dev/license",
- },
- {
- label: "Brand",
- href: "https://remotion.dev/brand",
- },
- ].filter(Boolean),
- },
- ],
- },
- colorMode: {
- respectPrefersColorScheme: true,
- },
- },
- presets: [
- [
- "@docusaurus/preset-classic",
- {
- gtag: {
- trackingID: "G-Z6B254S5Q4",
- },
- docs: {
- path: mode === "complete" ? "docs" : "new-docs",
- sidebarPath:
- mode === "complete" ? require.resolve("./sidebars.js") : undefined,
- editUrl:
- "https://github.com/remotion-dev/remotion/edit/main/packages/docs/",
- },
- blog: {
- path:
- mode === "complete" ? undefined : "intentionally-not-existing-path",
- showReadingTime: true,
- // Please change this to your repo.
- editUrl:
- "https://github.com/remotion-dev/remotion/edit/main/packages/docs/blog/",
- },
- theme: {
- customCss: [require.resolve("./src/css/custom.css")],
- },
- },
- ],
- [
- "./shiki",
- {
- vfsRoot: process.cwd(),
- themes: ["github-light", "github-dark"],
- defaultCompilerOptions: {
- types: ["node"],
- },
- },
- ],
- ],
- plugins:
- mode === "complete"
- ? [
- [
- "@docusaurus/plugin-content-blog",
- {
- /**
- * Required for any multi-instance plugin
- */
- id: "success-stories",
- /**
- * URL route for the blog section of your site.
- * *DO NOT* include a trailing slash.
- */
- routeBasePath: "success-stories",
- /**
- * Path to data on filesystem relative to site dir.
- */
- path: "./success-stories",
- blogSidebarTitle: "Success stories",
- },
- ],
- [
- "@docusaurus/plugin-content-blog",
- {
- /**
- * Required for any multi-instance plugin
- */
- id: "learn",
- /**
- * URL route for the blog section of your site.
- * *DO NOT* include a trailing slash.
- */
- routeBasePath: "learn",
- /**
- * Path to data on filesystem relative to site dir.
- */
- path: "./learn",
- blogSidebarTitle: "Learn",
- },
- ],
- "./route-plugin",
- ]
- : [],
+ {
+ label: 'Discord',
+ href: 'https://remotion.dev/discord',
+ },
+ {
+ label: 'X',
+ href: 'https://x.com/remotion',
+ },
+ {
+ label: 'YouTube',
+ href: 'https://youtube.com/@remotion_dev',
+ },
+ {
+ label: 'LinkedIn',
+ href: 'https://www.linkedin.com/company/remotion-dev/',
+ },
+ {
+ label: 'Instagram',
+ href: 'https://instagram.com/remotion',
+ },
+ {
+ label: 'TikTok',
+ href: 'https://www.tiktok.com/@remotion',
+ },
+ {
+ label: 'Threads',
+ href: 'https://www.threads.net/@remotion',
+ },
+ ],
+ },
+ {
+ title: 'More',
+ items: [
+ {
+ label: 'About us',
+ to: 'about',
+ },
+ {
+ label: 'Contact us',
+ to: 'contact',
+ },
+ mode === 'complete'
+ ? {
+ label: 'Blog',
+ to: 'blog',
+ }
+ : null,
+ {
+ label: 'Success Stories',
+ to: 'success-stories',
+ },
+ {
+ label: 'Support',
+ to: '/docs/support',
+ },
+ {
+ label: 'Acknowledgements',
+ href: 'https://remotion.dev/acknowledgements',
+ },
+ {
+ label: 'License',
+ href: 'https://remotion.dev/license',
+ },
+ {
+ label: 'Brand',
+ href: 'https://remotion.dev/brand',
+ },
+ ].filter(Boolean),
+ },
+ ],
+ },
+ colorMode: {
+ respectPrefersColorScheme: true,
+ },
+ },
+ presets: [
+ [
+ '@docusaurus/preset-classic',
+ {
+ gtag: {
+ trackingID: 'G-Z6B254S5Q4',
+ },
+ docs: {
+ path: mode === 'complete' ? 'docs' : 'new-docs',
+ sidebarPath:
+ mode === 'complete' ? require.resolve('./sidebars.js') : undefined,
+ editUrl:
+ 'https://github.com/remotion-dev/remotion/edit/main/packages/docs/',
+ showLastUpdateTime: true,
+ },
+ blog: {
+ path:
+ mode === 'complete' ? undefined : 'intentionally-not-existing-path',
+ showReadingTime: true,
+ // Please change this to your repo.
+ editUrl:
+ 'https://github.com/remotion-dev/remotion/edit/main/packages/docs/blog/',
+ },
+ theme: {
+ customCss: [require.resolve('./src/css/custom.css')],
+ },
+ },
+ ],
+ [
+ './shiki',
+ {
+ vfsRoot: process.cwd(),
+ themes: ['github-light', 'github-dark'],
+ defaultCompilerOptions: {
+ types: ['node'],
+ },
+ },
+ ],
+ ],
+ plugins:
+ mode === 'complete'
+ ? [
+ [
+ '@docusaurus/plugin-content-blog',
+ {
+ /**
+ * Required for any multi-instance plugin
+ */
+ id: 'success-stories',
+ /**
+ * URL route for the blog section of your site.
+ * *DO NOT* include a trailing slash.
+ */
+ routeBasePath: 'success-stories',
+ /**
+ * Path to data on filesystem relative to site dir.
+ */
+ path: './success-stories',
+ blogSidebarTitle: 'Success stories',
+ },
+ ],
+ [
+ '@docusaurus/plugin-content-blog',
+ {
+ /**
+ * Required for any multi-instance plugin
+ */
+ id: 'learn',
+ /**
+ * URL route for the blog section of your site.
+ * *DO NOT* include a trailing slash.
+ */
+ routeBasePath: 'learn',
+ /**
+ * Path to data on filesystem relative to site dir.
+ */
+ path: './learn',
+ blogSidebarTitle: 'Learn',
+ },
+ ],
+ './route-plugin',
+ ]
+ : [],
});
-module.exports = config("complete");
-module.exports.customFields = { config };
+module.exports = config('complete');
+module.exports.customFields = {config};