AI prompts
base on Create Videos with Code <br/>
<p align="center">
<a href="https://re.video">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./logo_dark.svg">
<img width="360" alt="Revideo logo" src="./logo.svg">
</picture>
</a>
</p>
<p align="center">
<a href="https://lerna.js.org"><img src="https://img.shields.io/badge/published%20with-lerna-c084fc?style=flat" alt="published with lerna"></a>
<a href="https://vitejs.dev"><img src="https://img.shields.io/badge/powered%20by-vite-646cff?style=flat" alt="powered by vite"></a>
<a href="https://www.npmjs.com/package/@revideo/core"><img src="https://img.shields.io/npm/v/@revideo/core?style=flat" alt="npm package version"></a>
<a href="https://discord.com/invite/JDjbfp6q2G"><img src="https://img.shields.io/discord/1071029581009657896?style=flat&logo=discord&logoColor=fff&color=404eed" alt="discord"></a>
</p>
<br/>
# Revideo - Create Videos with Code
Revideo is an open source framework for programmatic video editing. It is forked
from the amazing [Motion Canvas](https://motioncanvas.io/) editor, with the goal
of turning it from a standalone application into a library that developers can
use to build entire video editing apps.
Revideo lets you create video templates in Typescript and deploy an API endpoint
to render them with dynamic inputs. It also provides a React player component to
preview changes in the browser in real-time. If you want to learn more, you can
check out our [docs](https://docs.re.video/), our
[examples repository](https://github.com/redotvideo/revideo-examples), and join
our [Discord server](https://discord.com/invite/MVJsrqjy3j).
#### News 🔥
- [05/21/2024] We released an
[example](https://github.com/redotvideo/revideo-examples/tree/main/google-cloud-run-parallelized)
on how to parallelize rendering jobs with Google Cloud Functions
- [05/20/2024] We have a [new website](https://re.video/)!
<br/>
## Getting Started
To create an example project, run the following command:
```bash
npm init @revideo@latest
```
The example project will have the following code, which defines the video shown
below.
```tsx
import {Audio, Img, Video, makeScene2D} from '@revideo/2d';
import {all, chain, createRef, waitFor} from '@revideo/core';
export default makeScene2D('scene', function* (view) {
const logoRef = createRef<Img>();
yield view.add(
<>
<Video
src={'https://revideo-example-assets.s3.amazonaws.com/stars.mp4'}
size={['100%', '100%']}
play={true}
/>
<Audio
src={'https://revideo-example-assets.s3.amazonaws.com/chill-beat.mp3'}
play={true}
time={17.0}
/>
</>,
);
yield* waitFor(1);
view.add(
<Img
width={'1%'}
ref={logoRef}
src={
'https://revideo-example-assets.s3.amazonaws.com/revideo-logo-white.png'
}
/>,
);
yield* chain(
all(logoRef().scale(40, 2), logoRef().rotation(360, 2)),
logoRef().scale(60, 1),
);
});
```
https://github.com/havenhq/revideo/assets/122226645/4d4e56ba-5143-4e4b-9acf-d8a04330d162
<br/>
## Differences between Revideo and Motion Canvas
Motion Canvas aims to be a
[standalone editor](https://github.com/orgs/motion-canvas/discussions/1015) for
animations. While it happens to be distributed as an npm package, the
maintainers don't intend for it to be used as a library.
We started out as users of Motion Canvas ourselves but ran into these
limitations when we wanted to build a video editing app on top of it. After
building our initial version using Motion Canvas' plugin system, we realized
that we wanted to make more fundamental changes to the codebase that would be
difficult to implement while keeping compatibility with the existing Motion
Canvas API.
That's why we decided to fork the project and turn it into Revideo. We wrote a
bit more about it on our [blog](https://re.video/blog/fork).
Concretely, some of the differences to Motion Canvas are the following ones:
- **Headless Rendering:** Motion Canvas currently requires you to press a button
in its UI to render a video. We have exposed this functionality as a
[function call](https://docs.re.video/renderer/renderVideo/) and are making it
possible to deploy a rendering API to services like Google Cloud Run
([example](https://github.com/redotvideo/revideo-examples/tree/main/google-cloud-run),
or to use our CLI to expose a rendering endpoint from your Revideo project
([docs](https://docs.re.video/render-endpoint))
- **Faster Rendering:** When building an app rather than creating videos for
yourself, rendering speeds are quite important. We have sped up rendering
speeds by enabling
[parallelized rendering](https://github.com/redotvideo/revideo/pull/74) and
replacing the `seek()` operation for HTML video with our ffmpeg-based
[video frame extractor](https://github.com/redotvideo/revideo/pull/33)
- **Better Audio Support:** We have enabled audio export from `<Video/>` tags
during rendering, and have also added an `<Audio/>` tag that makes it easy to
synchronize audio with your animations.
<br/>
## Telemetry
To understand how people use Revideo, we **anonymously** track how many videos
are rendered using the open-source tool
[Posthog](https://github.com/PostHog/posthog). You can find our code
implementing Posthog
[here](https://github.com/redotvideo/revideo/tree/main/packages/telemetry).
If you want to disable telemetry, just set the following environment variable:
```bash
DISABLE_TELEMETRY=true
```
## Learn More
To learn more about Revideo, feel free to check out our
[documentation](http://docs.re.video/) or join our
[Discord server](https://discord.gg/hexYBZGBY8).
", Assign "at most 3 tags" to the expected json: {"id":"10746","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"