🎥 Make videos programmatically with React
Add template base
Vlad Mb0932a9b1867
diff --git a/bun.lock b/bun.lockindex 7469f6877e..5582cae690 100644--- a/bun.lock+++ b/bun.lock@@ -1316,6 +1316,26 @@"@remotion/bundler": "workspace:*",},},+ "packages/template-ai-video": {+ "name": "template-ai-video",+ "version": "1.0.0",+ "dependencies": {+ "@remotion/cli": "workspace:*",+ "@remotion/zod-types": "workspace:*",+ "react": "19.0.0",+ "react-dom": "19.0.0",+ "remotion": "workspace:*",+ "zod": "3.22.3",+ },+ "devDependencies": {+ "@remotion/eslint-config-flat": "workspace:*",+ "@types/react": "19.0.0",+ "@types/web": "0.0.166",+ "eslint": "9.19.0",+ "prettier": "3.6.0",+ "typescript": "5.8.2",+ },+ },"packages/template-audiogram": {"name": "template-audiogram","version": "1.0.0",@@ -6452,6 +6472,8 @@"teeny-request": ["[email protected]", "", { "dependencies": { "http-proxy-agent": "5.0.0", "https-proxy-agent": "5.0.1", "node-fetch": "2.6.9", "stream-events": "1.0.5", "uuid": "9.0.1" } }, "sha512-resvxdc6Mgb7YEThw6G6bExlXKkv6+YbuzGg9xuXxSgxJF7Ozs+o8Y9+2R3sArdWdW8nOokoQb1yrpFB0pQK2g=="],+ "template-ai-video": ["template-ai-video@workspace:packages/template-ai-video"],+"template-audiogram": ["template-audiogram@workspace:packages/template-audiogram"],"template-code-hike": ["template-code-hike@workspace:packages/template-code-hike"],diff --git a/packages/template-ai-video/.gitignore b/packages/template-ai-video/.gitignorenew file mode 100644index 0000000000..b62197ba2f--- /dev/null+++ b/packages/template-ai-video/.gitignore@@ -0,0 +1,7 @@+node_modules+dist+.DS_Store+.env++# Ignore the output video from Git but not videos you import into src/.+outdiff --git a/packages/template-ai-video/.prettierrc b/packages/template-ai-video/.prettierrcnew file mode 100644index 0000000000..37d5071748--- /dev/null+++ b/packages/template-ai-video/.prettierrc@@ -0,0 +1,5 @@+{+ "useTabs": false,+ "bracketSpacing": true,+ "tabWidth": 2+}diff --git a/packages/template-ai-video/README.md b/packages/template-ai-video/README.mdnew file mode 100644index 0000000000..671fa55834--- /dev/null+++ b/packages/template-ai-video/README.md@@ -0,0 +1,54 @@+# Remotion video++<p align="center">+ <a href="https://github.com/remotion-dev/logo">+ <picture>+ <source media="(prefers-color-scheme: dark)" srcset="https://github.com/remotion-dev/logo/raw/main/animated-logo-banner-dark.gif">+ <img alt="Animated Remotion Logo" src="https://github.com/remotion-dev/logo/raw/main/animated-logo-banner-light.gif">+ </picture>+ </a>+</p>++Welcome to your Remotion AI Video project!++## Commands++**Install Dependencies**++```console+npm install+```++**Start Preview**++```console+npm run dev+```++**Render video**++```console+npx remotion render+```++**Upgrade Remotion**++```console+npx remotion upgrade+```++This template allows you to create generated AI Videos for social media.++## Docs++## Help++We provide help on our [Discord server](https://discord.gg/6VzzNDwUwV).++## Issues++Found an issue with Remotion? [File an issue here](https://github.com/remotion-dev/remotion/issues/new).++## License++Note that for some entities a company license is needed. [Read the terms here](https://github.com/remotion-dev/remotion/blob/main/LICENSE.md).diff --git a/packages/template-ai-video/eslint.config.mjs b/packages/template-ai-video/eslint.config.mjsnew file mode 100644index 0000000000..13b44a0d65--- /dev/null+++ b/packages/template-ai-video/eslint.config.mjs@@ -0,0 +1,3 @@+import { config } from "@remotion/eslint-config-flat";++export default config;diff --git a/packages/template-ai-video/package.json b/packages/template-ai-video/package.jsonnew file mode 100644index 0000000000..515e5a549b--- /dev/null+++ b/packages/template-ai-video/package.json@@ -0,0 +1,30 @@+{+ "name": "template-ai-video",+ "version": "1.0.0",+ "description": "Create AI videos using remotion",+ "scripts": {+ "dev": "remotion studio",+ "build": "remotion bundle",+ "upgrade": "remotion upgrade",+ "lint": "eslint src && tsc"+ },+ "repository": {},+ "license": "UNLICENSED",+ "dependencies": {+ "@remotion/cli": "workspace:*",+ "@remotion/zod-types": "workspace:*",+ "react": "19.0.0",+ "react-dom": "19.0.0",+ "remotion": "workspace:*",+ "zod": "3.22.3"+ },+ "devDependencies": {+ "@remotion/eslint-config-flat": "workspace:*",+ "@types/react": "19.0.0",+ "@types/web": "0.0.166",+ "eslint": "9.19.0",+ "prettier": "3.6.0",+ "typescript": "5.8.2"+ },+ "private": true+}diff --git a/packages/template-ai-video/remotion.config.ts b/packages/template-ai-video/remotion.config.tsnew file mode 100644index 0000000000..2fb58bae46--- /dev/null+++ b/packages/template-ai-video/remotion.config.ts@@ -0,0 +1,9 @@+// See all configuration options: https://remotion.dev/docs/config+// Each option also is available as a CLI flag: https://remotion.dev/docs/cli++// Note: When using the Node.JS APIs, the config file doesn't apply. Instead, pass options directly to the APIs++import { Config } from "@remotion/cli/config";++Config.setVideoImageFormat("jpeg");+Config.setOverwriteOutput(true);diff --git a/packages/template-ai-video/src/AIVideo.tsx b/packages/template-ai-video/src/AIVideo.tsxnew file mode 100644index 0000000000..5a4cf40743--- /dev/null+++ b/packages/template-ai-video/src/AIVideo.tsx@@ -0,0 +1,8 @@+import { AbsoluteFill } from "remotion";+import { z } from "zod";++export const aiVideoSchema = z.object({});++export const AIVideo: React.FC<z.infer<typeof aiVideoSchema>> = () => {+ return <AbsoluteFill style={{ backgroundColor: "white" }}></AbsoluteFill>;+};diff --git a/packages/template-ai-video/src/Root.tsx b/packages/template-ai-video/src/Root.tsxnew file mode 100644index 0000000000..81dc6044f1--- /dev/null+++ b/packages/template-ai-video/src/Root.tsx@@ -0,0 +1,19 @@+import { Composition } from "remotion";+import { AIVideo, aiVideoSchema } from "./AIVideo";++export const RemotionRoot: React.FC = () => {+ return (+ <>+ <Composition+ id="AIVideo"+ component={AIVideo}+ durationInFrames={150}+ fps={30}+ width={1080}+ height={1920}+ schema={aiVideoSchema}+ defaultProps={{}}+ />+ </>+ );+};diff --git a/packages/template-ai-video/src/index.ts b/packages/template-ai-video/src/index.tsnew file mode 100644index 0000000000..f31c790edb--- /dev/null+++ b/packages/template-ai-video/src/index.ts@@ -0,0 +1,4 @@+import { registerRoot } from "remotion";+import { RemotionRoot } from "./Root";++registerRoot(RemotionRoot);diff --git a/packages/template-ai-video/tsconfig.json b/packages/template-ai-video/tsconfig.jsonnew file mode 100644index 0000000000..4bdf271b9d--- /dev/null+++ b/packages/template-ai-video/tsconfig.json@@ -0,0 +1,15 @@+{+ "compilerOptions": {+ "target": "ES2018",+ "module": "commonjs",+ "jsx": "react-jsx",+ "strict": true,+ "noEmit": true,+ "lib": ["es2015"],+ "esModuleInterop": true,+ "skipLibCheck": true,+ "forceConsistentCasingInFileNames": true,+ "noUnusedLocals": true+ },+ "exclude": ["remotion.config.ts"]+}