Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b0932a9
Add template base
webmonch Oct 19, 2025
31c2b1e
Add types
webmonch Oct 19, 2025
0298293
Add timeline loading from props
webmonch Oct 19, 2025
ba8f82e
Add demo timeline
webmonch Oct 19, 2025
93104ac
Add word and subtitle components
webmonch Oct 19, 2025
26e7a1c
Add constants and background
webmonch Oct 19, 2025
f7f63a3
Add base render logic
webmonch Oct 19, 2025
be9ea9a
Move timeline from props to filename to avoid rendering issues
webmonch Oct 19, 2025
8d871c0
Move frame calc details
webmonch Oct 19, 2025
42c5d17
Add gen types
webmonch Oct 19, 2025
6733dc7
Add basic CLI and slides gen
webmonch Oct 20, 2025
052d2f0
Add image and voice gen
webmonch Oct 20, 2025
40ac337
Add story descriptor
webmonch Oct 21, 2025
aef9406
Add story gen with content
webmonch Oct 21, 2025
e56823d
Move cli files to cli folder
webmonch Oct 21, 2025
8c0e809
Add env examples
webmonch Oct 21, 2025
192a3df
Override expected error
webmonch Oct 21, 2025
e99ae5f
Fix cli math.random warnings
webmonch Oct 21, 2025
e02c4f0
Better grouping
webmonch Oct 21, 2025
2c8b0b4
Update fonts
webmonch Oct 22, 2025
a0c0cb7
Fix image ratio
webmonch Oct 22, 2025
42960d7
Cleanup
webmonch Oct 22, 2025
9d2fe77
Move image dimensions to vars
webmonch Oct 22, 2025
26961be
Refactor
webmonch Oct 22, 2025
5c51678
Cleanup
webmonch Oct 22, 2025
38264a0
Add promo
webmonch Oct 22, 2025
f639e8e
Add promo image
webmonch Oct 22, 2025
ff34d64
Update docs
webmonch Oct 22, 2025
d6ed2fe
Update docs
webmonch Oct 23, 2025
534c82a
Rm watermark prop
webmonch Oct 23, 2025
615fc5c
Rename project dir to project name
webmonch Oct 23, 2025
db93f50
Remove zod-incompatible AI sdk
webmonch Oct 24, 2025
8bb9fee
Docs update
webmonch Oct 24, 2025
e186e17
Add basic tech overview
webmonch Oct 24, 2025
a6eb736
Add deploy docs
webmonch Oct 24, 2025
8339bc7
Add optimisations docs
webmonch Oct 24, 2025
6fb7a18
Update docs with voice config
webmonch Oct 25, 2025
7d13a13
Update docs - wording
webmonch Oct 25, 2025
9c0840b
Update docs - wording
webmonch Oct 25, 2025
e51085e
Update docs
webmonch Oct 25, 2025
048b43a
Merge main
webmonch Oct 25, 2025
6489551
Fix bun lock
webmonch Oct 25, 2025
2f6962d
Refresh lock
webmonch Oct 25, 2025
2b09aa1
Remove unused ts error
webmonch Oct 25, 2025
644cfec
Add uuid types
webmonch Oct 25, 2025
0f5e696
Add template to list of templates
webmonch Oct 25, 2025
a7e7126
Add missing commands
webmonch Oct 26, 2025
0cbb2e5
Fix readme command for tests
webmonch Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
195 changes: 173 additions & 22 deletions bun.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion packages/create-video/src/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export async function selectAsync(
const {value} = await prompt({
limit: 11,
...questions,
// @ts-expect-error: onRender not in the types
onRender(this: {
cursor: number;
firstRender: boolean;
Expand Down
22 changes: 22 additions & 0 deletions packages/create-video/src/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export type Template = {
| 'google-tts'
| 'audiogram'
| 'music-visualization'
| 'ai-video'
| 'skia'
| 'overlay'
| 'stargazer'
Expand Down Expand Up @@ -376,6 +377,27 @@ export const FEATURED_TEMPLATES: Template[] = [
templateInMonorepo: 'template-music-visualization',
allowEnableTailwind: true,
},
{
homePageLabel: 'AI Video',
shortName: 'AI Video',
org: 'remotion-dev',
repoName: 'template-ai-video',
description: 'Create AI Videos from description',
longerDescription:
'A template that turns video descriptions into full videos that can be posted on Social Media.',
promoVideo: {
muxId: 'FGl01Rw6c5YOjBCTdVhn5wrmVaRWDOjDeT28iY3Sv47w',
height: 1920,
width: 1080,
},
cliId: 'ai-video' as const,
type: 'video' as const,
defaultBranch: 'main',
featuredOnHomePage: null,
previewURL: null,
templateInMonorepo: 'template-ai-video',
allowEnableTailwind: true,
},
{
homePageLabel: 'Skia',
shortName: 'Skia',
Expand Down
2 changes: 2 additions & 0 deletions packages/template-ai-video/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OPENAI_API_KEY=
ELEVENLABS_API_KEY=
7 changes: 7 additions & 0 deletions packages/template-ai-video/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
.DS_Store
.env

# Ignore the output video from Git but not videos you import into src/.
out
5 changes: 5 additions & 0 deletions packages/template-ai-video/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"useTabs": false,
"bracketSpacing": true,
"tabWidth": 2
}
Binary file added packages/template-ai-video/Promo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 120 additions & 0 deletions packages/template-ai-video/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Remotion AI Video template

<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://cdn.webmonch.dev/img/remotion-template-promo.png">
<img alt="Animated Remotion Logo" src="https://cdn.webmonch.dev/img/remotion-template-promo.png">
</picture>
</p>

Using this template you can create high quality **AI videos for TikTok or Instagram**.

It includes a CLI that will generate story script, images and voiceover using OpenAI and ElevenLabs.

## Getting started with demo video

**Install Dependencies**

```console
bun install
```

**Start Preview**

```console
npm run dev
```

## How do I render my video?

Run this:

```console
npx remotion render
```

Or check out the [Remotion docs](/docs/render/). There are lots of ways to render.

## Creating your own videos

You can easily create your own videos using provided CLI.

It will generate a script, images, voiceover and timeline based on your story title and topic. (topic can be e.g. history, eli5, fun facts, science, etc)

**Configure environment variables**

Create .env file with following env vars (you can also find them in .env.example):

```
OPENAI_API_KEY=
ELEVENLABS_API_KEY=
```

If you did not create env file - you will be prompted for these variables when using CLI.

**Select voice**

In **generateVoice()** function replace the voice id from ElevenLabs with the one you like. You can use their API for this. Alternatively, you can open any voice on their website and extract the Voice Id from the url (id comes after **voiceId=**)

```console
https://elevenlabs.io/app/voice-library?voiceId=aTxZrSrp47xsP6Ot4Kgd
```

**Generate srory timeline**

```console
bun gen
```

You will be prompted to enter story title and topic.

Title can be a vague one or long and detailed. Short title on the first slide will be generated based on it.

Topic can be e.g. History, Interesting facts, ELI5 etc.

After you enter title and topic, CLI will generate text, images and audio with timestamps, and combine all those into a timeline that van be used by this template to render a video.

## Technical overview

Remotion is rendering videos based on Timeline (timeline.json in project folder). This timeline is generated by CLI.

It consists of three blocks - Elements, Text and Audio.

Elements define slide backgrounds and include enter/exit transitions (e.g. blur) and animations that are applied while slide is active (e.g. scale, rotate).

Text and audio are self explanatory. The only special thing about them is that they are synced.

You can customize the generation of the timeline in **createTimeLineFromStoryWithDetails()** function.

## Deploying on a remove server

Current project nees light modification if you want to deploy it as a remote service.

Remotion renderer with template bundle shuold be deployed as per usual.

Then you have to update Root.tsx to use timeline url that you will pass as a prop (instead of project name).

The last thing - you have to upload generated resources (images and audio) to server and use urls to them instead of file names when generating a timeline.

## Optimisations

You can significantly speed up the story generation by generating audio and images in parallel.

## Issues

Found an issue with Remotion? Upgrade Remotion to receive fixes:

```
npx remotion upgrade
```

Didn't help? [File an issue here](https://github.com/remotion-dev/remotion/issues/new).

## Contributing

The source of this template is in the [Remotion Monorepo](https://github.com/remotion-dev/remotion/tree/main/packages/template-ai-video).
Don't send pull requests here, this is only a mirror.

## 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).
Loading