@revideo/create 0.5.11-beta.1104 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/examples/avatar-with-background/package.json +7 -14
- package/examples/avatar-with-background/src/{scenes/example.tsx → project.tsx} +19 -3
- package/examples/avatar-with-background/src/render.ts +4 -3
- package/examples/avatar-with-background/tsconfig.json +2 -1
- package/examples/default/package.json +6 -6
- package/examples/default/src/project.tsx +2 -2
- package/examples/github-stars-celebration/package.json +7 -11
- package/examples/github-stars-celebration/src/{scenes/example.tsx → project.tsx} +24 -4
- package/examples/github-stars-celebration/src/render.ts +1 -1
- package/examples/github-stars-celebration/tsconfig.json +2 -1
- package/examples/marketing-templates/marketing-template/README.md +19 -0
- package/examples/marketing-templates/marketing-template/package.json +7 -11
- package/examples/marketing-templates/marketing-template/src/{scenes/example.tsx → project.tsx} +23 -3
- package/examples/marketing-templates/marketing-template/src/render.ts +1 -1
- package/examples/marketing-templates/marketing-template/tsconfig.json +2 -1
- package/examples/marketing-templates/multiple-videos-in-one/README.md +19 -0
- package/examples/marketing-templates/multiple-videos-in-one/package.json +7 -11
- package/examples/marketing-templates/multiple-videos-in-one/src/{scenes/example.tsx → project.tsx} +21 -3
- package/examples/marketing-templates/multiple-videos-in-one/src/render.ts +1 -1
- package/examples/marketing-templates/multiple-videos-in-one/tsconfig.json +2 -1
- package/examples/minimal-drag-drop/README.md +14 -18
- package/examples/minimal-drag-drop/{next/app → app}/page.tsx +51 -39
- package/examples/minimal-drag-drop/{next/next-env.d.ts → next-env.d.ts} +1 -1
- package/examples/minimal-drag-drop/{next/package.json → package.json} +9 -4
- package/examples/minimal-drag-drop/revideo/project.tsx +54 -0
- package/examples/parallelized-aws-lambda/Dockerfile +0 -2
- package/examples/parallelized-aws-lambda/README.md +331 -100
- package/examples/parallelized-aws-lambda/revideo-project/package.json +9 -11
- package/examples/parallelized-aws-lambda/revideo-project/src/lambda.ts +2 -3
- package/examples/parallelized-aws-lambda/revideo-project/src/{scenes/example.tsx → project.tsx} +9 -5
- package/examples/parallelized-aws-lambda/revideo-project/src/render.ts +1 -1
- package/examples/parallelized-aws-lambda/revideo-project/tsconfig.json +1 -0
- package/examples/rive-explanation-video/README.md +0 -3
- package/examples/rive-explanation-video/package.json +8 -12
- package/examples/rive-explanation-video/src/project.tsx +234 -0
- package/examples/rive-explanation-video/src/render.ts +1 -1
- package/examples/rive-explanation-video/tsconfig.json +2 -1
- package/examples/saas-template/package.json +39 -39
- package/examples/stitching-videos/README.md +15 -3
- package/examples/stitching-videos/package.json +7 -10
- package/examples/stitching-videos/src/{scenes/example.tsx → project.tsx} +36 -3
- package/examples/stitching-videos/src/render.ts +4 -16
- package/examples/stitching-videos/tsconfig.json +2 -1
- package/examples/three-js-example/package.json +10 -13
- package/examples/three-js-example/src/project.tsx +105 -0
- package/examples/three-js-example/src/render.ts +1 -1
- package/examples/three-js-example/tsconfig.json +2 -1
- package/examples/youtube-shorts/README.md +14 -60
- package/examples/youtube-shorts/package.json +8 -12
- package/examples/youtube-shorts/src/{scenes/example.tsx → project.tsx} +20 -3
- package/examples/youtube-shorts/src/render.ts +11 -8
- package/examples/youtube-shorts/src/utils.ts +1 -1
- package/examples/youtube-shorts/tsconfig.json +2 -1
- package/index.js +2 -26
- package/package.json +9 -9
- package/examples/avatar-with-background/src/project.meta +0 -31
- package/examples/avatar-with-background/src/project.ts +0 -6
- package/examples/avatar-with-background/src/revideo.d.ts +0 -1
- package/examples/avatar-with-background/src/scenes/example.meta +0 -5
- package/examples/avatar-with-background/vite.config.ts +0 -8
- package/examples/github-stars-celebration/src/project.meta +0 -28
- package/examples/github-stars-celebration/src/project.ts +0 -8
- package/examples/github-stars-celebration/src/revideo.d.ts +0 -1
- package/examples/github-stars-celebration/src/scenes/example.meta +0 -5
- package/examples/github-stars-celebration/vite.config.ts +0 -8
- package/examples/google-cloud-run-parallelized/README.md +0 -127
- package/examples/google-cloud-run-parallelized/render-orchestrator/Dockerfile +0 -56
- package/examples/google-cloud-run-parallelized/render-orchestrator/package.json +0 -22
- package/examples/google-cloud-run-parallelized/render-orchestrator/src/index.ts +0 -72
- package/examples/google-cloud-run-parallelized/render-orchestrator/src/revideo.d.ts +0 -1
- package/examples/google-cloud-run-parallelized/render-orchestrator/tsconfig.json +0 -10
- package/examples/google-cloud-run-parallelized/render-worker/.gcloudignore +0 -17
- package/examples/google-cloud-run-parallelized/render-worker/.puppeteerrc.cjs +0 -9
- package/examples/google-cloud-run-parallelized/render-worker/package.json +0 -30
- package/examples/google-cloud-run-parallelized/render-worker/src/index.ts +0 -45
- package/examples/google-cloud-run-parallelized/render-worker/src/project.meta +0 -31
- package/examples/google-cloud-run-parallelized/render-worker/src/project.ts +0 -6
- package/examples/google-cloud-run-parallelized/render-worker/src/render.ts +0 -14
- package/examples/google-cloud-run-parallelized/render-worker/src/revideo.d.ts +0 -1
- package/examples/google-cloud-run-parallelized/render-worker/src/scenes/example.tsx +0 -30
- package/examples/google-cloud-run-parallelized/render-worker/tsconfig.json +0 -13
- package/examples/google-cloud-run-parallelized/render-worker/vite.config.ts +0 -9
- package/examples/marketing-templates/marketing-template/src/globals.css +0 -0
- package/examples/marketing-templates/marketing-template/src/project.meta +0 -28
- package/examples/marketing-templates/marketing-template/src/project.ts +0 -9
- package/examples/marketing-templates/marketing-template/src/revideo.d.ts +0 -1
- package/examples/marketing-templates/marketing-template/src/scenes/example.meta +0 -5
- package/examples/marketing-templates/marketing-template/vite.config.ts +0 -9
- package/examples/marketing-templates/multiple-videos-in-one/src/project.meta +0 -28
- package/examples/marketing-templates/multiple-videos-in-one/src/project.ts +0 -9
- package/examples/marketing-templates/multiple-videos-in-one/src/revideo.d.ts +0 -1
- package/examples/marketing-templates/multiple-videos-in-one/src/scenes/example.meta +0 -5
- package/examples/marketing-templates/multiple-videos-in-one/vite.config.ts +0 -9
- package/examples/minimal-drag-drop/next/package-lock.json +0 -5577
- package/examples/minimal-drag-drop/next/public/favicon.ico +0 -0
- package/examples/minimal-drag-drop/next/public/next.svg +0 -1
- package/examples/minimal-drag-drop/next/public/vercel.svg +0 -1
- package/examples/minimal-drag-drop/revideo/package-lock.json +0 -3771
- package/examples/minimal-drag-drop/revideo/package.json +0 -24
- package/examples/minimal-drag-drop/revideo/src/project.meta +0 -28
- package/examples/minimal-drag-drop/revideo/src/project.ts +0 -9
- package/examples/minimal-drag-drop/revideo/src/render.ts +0 -15
- package/examples/minimal-drag-drop/revideo/src/revideo.d.ts +0 -1
- package/examples/minimal-drag-drop/revideo/src/scenes/example.meta +0 -5
- package/examples/minimal-drag-drop/revideo/src/scenes/example.tsx +0 -44
- package/examples/minimal-drag-drop/revideo/tsconfig.json +0 -9
- package/examples/minimal-drag-drop/revideo/vite.config.ts +0 -6
- package/examples/parallelized-aws-lambda/revideo-project/.puppeteerrc.cjs +0 -9
- package/examples/parallelized-aws-lambda/revideo-project/src/project.meta +0 -28
- package/examples/parallelized-aws-lambda/revideo-project/src/project.ts +0 -7
- package/examples/parallelized-aws-lambda/revideo-project/src/revideo.d.ts +0 -1
- package/examples/parallelized-aws-lambda/revideo-project/src/scenes/example.meta +0 -5
- package/examples/parallelized-aws-lambda/revideo-project/vite.config.ts +0 -9
- package/examples/reddit-post-video/README.md +0 -84
- package/examples/reddit-post-video/package-lock.json +0 -2941
- package/examples/reddit-post-video/package.json +0 -27
- package/examples/reddit-post-video/src/global.css +0 -1
- package/examples/reddit-post-video/src/metadata.json +0 -576
- package/examples/reddit-post-video/src/project.meta +0 -31
- package/examples/reddit-post-video/src/project.ts +0 -9
- package/examples/reddit-post-video/src/render.ts +0 -157
- package/examples/reddit-post-video/src/revideo.d.ts +0 -1
- package/examples/reddit-post-video/src/scenes/example.meta +0 -5
- package/examples/reddit-post-video/src/scenes/example.tsx +0 -74
- package/examples/reddit-post-video/tsconfig.json +0 -9
- package/examples/reddit-post-video/vite.config.ts +0 -6
- package/examples/rive-explanation-video/src/project.meta +0 -31
- package/examples/rive-explanation-video/src/project.ts +0 -8
- package/examples/rive-explanation-video/src/revideo.d.ts +0 -1
- package/examples/rive-explanation-video/src/scenes/example.meta +0 -5
- package/examples/rive-explanation-video/src/scenes/example.tsx +0 -218
- package/examples/rive-explanation-video/vite.config.ts +0 -8
- package/examples/stitching-videos/src/project.meta +0 -28
- package/examples/stitching-videos/src/project.ts +0 -20
- package/examples/stitching-videos/src/revideo.d.ts +0 -1
- package/examples/stitching-videos/vite.config.ts +0 -8
- package/examples/three-js-example/README.md +0 -8
- package/examples/three-js-example/src/project.meta +0 -31
- package/examples/three-js-example/src/project.ts +0 -8
- package/examples/three-js-example/src/revideo.d.ts +0 -1
- package/examples/three-js-example/src/scenes/basic3D.meta +0 -5
- package/examples/three-js-example/src/scenes/basic3D.tsx +0 -89
- package/examples/three-js-example/vite.config.ts +0 -6
- package/examples/youtube-shorts/src/project.meta +0 -28
- package/examples/youtube-shorts/src/project.ts +0 -9
- package/examples/youtube-shorts/src/revideo.d.ts +0 -1
- package/examples/youtube-shorts/vite.config.ts +0 -8
- /package/examples/minimal-drag-drop/{next/app → app}/api/render/route.ts +0 -0
- /package/examples/minimal-drag-drop/{next/app → app}/globals.css +0 -0
- /package/examples/minimal-drag-drop/{next/app → app}/layout.tsx +0 -0
- /package/examples/minimal-drag-drop/{next/next.config.mjs → next.config.mjs} +0 -0
- /package/examples/minimal-drag-drop/{next/postcss.config.js → postcss.config.js} +0 -0
- /package/examples/minimal-drag-drop/revideo/{src/global.css → global.css} +0 -0
- /package/examples/minimal-drag-drop/{next/tailwind.config.ts → tailwind.config.ts} +0 -0
- /package/examples/minimal-drag-drop/{next/tsconfig.json → tsconfig.json} +0 -0
- /package/examples/minimal-drag-drop/{next/utils → utils}/parse.ts +0 -0
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
FROM node:18-bullseye
|
|
2
|
-
|
|
3
|
-
RUN apt-get update && apt-get install -y \
|
|
4
|
-
nscd \
|
|
5
|
-
libnss3 \
|
|
6
|
-
libdbus-1-3 \
|
|
7
|
-
libatk1.0-0 \
|
|
8
|
-
libatk-bridge2.0-0 \
|
|
9
|
-
libcups2 \
|
|
10
|
-
libxkbcommon0 \
|
|
11
|
-
libxcomposite1 \
|
|
12
|
-
libxdamage1 \
|
|
13
|
-
libxrandr2 \
|
|
14
|
-
libgbm1 \
|
|
15
|
-
libpango-1.0-0 \
|
|
16
|
-
libcairo2 \
|
|
17
|
-
libasound2 \
|
|
18
|
-
libatspi2.0-0
|
|
19
|
-
|
|
20
|
-
RUN apt-get install -y libxfixes3
|
|
21
|
-
|
|
22
|
-
WORKDIR /usr/src/app
|
|
23
|
-
|
|
24
|
-
RUN wget https://github.com/eugeneware/ffmpeg-static/releases/download/b6.0/ffmpeg-linux-x64
|
|
25
|
-
|
|
26
|
-
RUN chmod +x ffmpeg-linux-x64
|
|
27
|
-
|
|
28
|
-
RUN mv ffmpeg-linux-x64 ffmpeg
|
|
29
|
-
|
|
30
|
-
RUN mv ffmpeg /usr/local/bin/
|
|
31
|
-
|
|
32
|
-
ENV FFMPEG_PATH=ffmpeg
|
|
33
|
-
|
|
34
|
-
RUN wget https://github.com/eugeneware/ffmpeg-static/releases/download/b6.0/ffprobe-linux-x64
|
|
35
|
-
|
|
36
|
-
RUN chmod +x ffprobe-linux-x64
|
|
37
|
-
|
|
38
|
-
RUN mv ffprobe-linux-x64 ffprobe
|
|
39
|
-
|
|
40
|
-
RUN mv ffprobe /usr/local/bin/
|
|
41
|
-
|
|
42
|
-
ENV FFPROBE_PATH=ffprobe
|
|
43
|
-
|
|
44
|
-
COPY package*.json ./
|
|
45
|
-
|
|
46
|
-
COPY . ./
|
|
47
|
-
|
|
48
|
-
RUN npm install
|
|
49
|
-
|
|
50
|
-
RUN npx puppeteer browsers install chrome
|
|
51
|
-
|
|
52
|
-
RUN apt-get update && apt-get install -y nscd libnss3
|
|
53
|
-
|
|
54
|
-
RUN ffmpeg -version
|
|
55
|
-
|
|
56
|
-
CMD service nscd start && npm start
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "google-cloud-run",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"start": "tsc && node dist/index.js"
|
|
7
|
-
},
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"@google-cloud/storage": "^7.11.0",
|
|
10
|
-
"@revideo/2d": "0.5.10",
|
|
11
|
-
"@revideo/core": "0.5.10",
|
|
12
|
-
"@revideo/ffmpeg": "0.5.10",
|
|
13
|
-
"express": "^4.19.2",
|
|
14
|
-
"uuid": "^9.0.1"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@types/express": "^4.17.21",
|
|
18
|
-
"@types/uuid": "^9.0.8",
|
|
19
|
-
"typescript": "^5.4.5",
|
|
20
|
-
"vite": "^4.5"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { mergeAudioWithVideo, concatenateMedia } from '@revideo/ffmpeg';
|
|
2
|
-
import { Storage } from '@google-cloud/storage';
|
|
3
|
-
import * as express from 'express';
|
|
4
|
-
import * as fs from 'fs';
|
|
5
|
-
import axios from 'axios';
|
|
6
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
7
|
-
|
|
8
|
-
const storage = new Storage();
|
|
9
|
-
|
|
10
|
-
const app = express();
|
|
11
|
-
app.use(express.json());
|
|
12
|
-
|
|
13
|
-
app.get('/', (req, res) => {
|
|
14
|
-
res.status(200).send(`Hello World!`);
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
app.post('/render', async (req, res) => {
|
|
18
|
-
try {
|
|
19
|
-
const { variables, numWorkers } = req.body;
|
|
20
|
-
const jobId = uuidv4();
|
|
21
|
-
|
|
22
|
-
const renderPromises = [];
|
|
23
|
-
for (let i = 0; i < numWorkers; i++) {
|
|
24
|
-
renderPromises.push(makeRenderRequest(variables, i, numWorkers));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const results = await Promise.all(renderPromises);
|
|
28
|
-
const audios = results.map(result => result.audioUrl);
|
|
29
|
-
const videos = results.map(result => result.videoUrl);
|
|
30
|
-
|
|
31
|
-
await Promise.all([
|
|
32
|
-
concatenateMedia(audios, `${jobId}-audio.wav`),
|
|
33
|
-
concatenateMedia(videos, `${jobId}-visuals.mp4`)
|
|
34
|
-
]);
|
|
35
|
-
|
|
36
|
-
await mergeAudioWithVideo(`${jobId}-audio.wav`, `${jobId}-visuals.mp4`, `${jobId}.mp4`);
|
|
37
|
-
|
|
38
|
-
const resultFileBuffer = fs.readFileSync(`${jobId}.mp4`);
|
|
39
|
-
await storage.bucket(process.env.GCP_BUCKET_NAME).file(`${jobId}.mp4`).save(resultFileBuffer);
|
|
40
|
-
|
|
41
|
-
res.status(200).json({
|
|
42
|
-
file: `https://storage.googleapis.com/${process.env.GCP_BUCKET_NAME}/${`${jobId}.mp4`}`
|
|
43
|
-
});
|
|
44
|
-
} catch (err) {
|
|
45
|
-
console.error('Error rendering video:', err);
|
|
46
|
-
res.status(500).send(`Error rendering video: ${err}`);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
const port = parseInt(process.env.PORT) || 8080;
|
|
51
|
-
app.listen(port, () => {
|
|
52
|
-
console.log(`listening on port ${port}`);
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
async function makeRenderRequest(variables: any, workerId: number, numWorkers: number) {
|
|
56
|
-
try {
|
|
57
|
-
const response = await axios.post(`${process.env.RENDER_WORKER_URL}`, {
|
|
58
|
-
variables,
|
|
59
|
-
workerId,
|
|
60
|
-
numWorkers
|
|
61
|
-
}, {
|
|
62
|
-
headers: {
|
|
63
|
-
'Content-Type': 'application/json'
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
return response.data;
|
|
68
|
-
} catch (error) {
|
|
69
|
-
console.error('Error making render request:', error);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="@revideo/core/project" />
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# This file specifies files that are *not* uploaded to Google Cloud
|
|
2
|
-
# using gcloud. It follows the same syntax as .gitignore, with the addition of
|
|
3
|
-
# "#!include" directives (which insert the entries of the given .gitignore-style
|
|
4
|
-
# file at that point).
|
|
5
|
-
#
|
|
6
|
-
# For more information, run:
|
|
7
|
-
# $ gcloud topic gcloudignore
|
|
8
|
-
#
|
|
9
|
-
.gcloudignore
|
|
10
|
-
# If you would like to upload your .git directory, .gitignore file or files
|
|
11
|
-
# from your .gitignore file, remove the corresponding line
|
|
12
|
-
# below:
|
|
13
|
-
.git
|
|
14
|
-
.gitignore
|
|
15
|
-
|
|
16
|
-
node_modules
|
|
17
|
-
#!include:.gitignore
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"main": "dist/index.js",
|
|
3
|
-
"scripts": {
|
|
4
|
-
"editor": "vite",
|
|
5
|
-
"build": "tsc",
|
|
6
|
-
"start": "functions-framework --target=render-worker",
|
|
7
|
-
"prestart": "npm run build",
|
|
8
|
-
"gcp-build": "node node_modules/puppeteer/install.mjs && npm run build"
|
|
9
|
-
},
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
12
|
-
"@ffprobe-installer/ffprobe": "^2.1.2",
|
|
13
|
-
"@google-cloud/functions-framework": "^3.4.0",
|
|
14
|
-
"@google-cloud/storage": "^7.11.0",
|
|
15
|
-
"@revideo/2d": "0.5.10",
|
|
16
|
-
"@revideo/cli": "0.5.10",
|
|
17
|
-
"@revideo/core": "0.5.10",
|
|
18
|
-
"@revideo/ffmpeg": "0.5.10",
|
|
19
|
-
"@revideo/renderer": "0.5.10",
|
|
20
|
-
"@revideo/ui": "0.5.10",
|
|
21
|
-
"@revideo/vite-plugin": "0.5.10",
|
|
22
|
-
"@types/express": "^4.17.21",
|
|
23
|
-
"@types/uuid": "^9.0.8",
|
|
24
|
-
"express": "^4.19.2",
|
|
25
|
-
"puppeteer": "^22.9.0",
|
|
26
|
-
"typescript": "5.5.4",
|
|
27
|
-
"uuid": "^9.0.1",
|
|
28
|
-
"vite": "^4.5"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as ff from '@google-cloud/functions-framework';
|
|
2
|
-
import { renderPartialVideo } from '@revideo/renderer';
|
|
3
|
-
import { Storage } from '@google-cloud/storage';
|
|
4
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
5
|
-
import * as fs from 'fs';
|
|
6
|
-
|
|
7
|
-
const storage = new Storage();
|
|
8
|
-
|
|
9
|
-
ff.http('render-worker', async (req: ff.Request, res: ff.Response) => {
|
|
10
|
-
try {
|
|
11
|
-
const { workerId, numWorkers, variables } = req.body;
|
|
12
|
-
const jobId = uuidv4();
|
|
13
|
-
|
|
14
|
-
console.log("Rendering video...")
|
|
15
|
-
const {audioFile, videoFile} = await renderPartialVideo({
|
|
16
|
-
projectFile: "./src/project.ts",
|
|
17
|
-
workerId,
|
|
18
|
-
numWorkers,
|
|
19
|
-
variables,
|
|
20
|
-
settings: { outFile: `${jobId}.mp4`, logProgress: true, puppeteer: { args: ['--no-sandbox', '--disable-setuid-sandbox'] }}
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const audioFileName = `${jobId}-audio.mp3`;
|
|
24
|
-
const audioFileBuffer = fs.readFileSync(audioFile);
|
|
25
|
-
const audioFileUploadPromise = storage.bucket(process.env.GCP_BUCKET_NAME || "").file(audioFileName).save(audioFileBuffer);
|
|
26
|
-
|
|
27
|
-
const videoFileName = `${jobId}-video.mp4`;
|
|
28
|
-
const videoFileBuffer = fs.readFileSync(videoFile);
|
|
29
|
-
const videoFileUploadPromise = storage.bucket(process.env.GCP_BUCKET_NAME || "").file(videoFileName).save(videoFileBuffer);
|
|
30
|
-
|
|
31
|
-
await Promise.all([audioFileUploadPromise, videoFileUploadPromise]);
|
|
32
|
-
const audioFileUrl = `https://storage.googleapis.com/${process.env.GCP_BUCKET_NAME || ""}/${audioFileName}`;
|
|
33
|
-
const videoFileUrl = `https://storage.googleapis.com/${process.env.GCP_BUCKET_NAME || ""}/${videoFileName}`;
|
|
34
|
-
|
|
35
|
-
console.log("done");
|
|
36
|
-
res.status(200).json({
|
|
37
|
-
audioUrl: audioFileUrl,
|
|
38
|
-
videoUrl: videoFileUrl
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
} catch (err) {
|
|
42
|
-
console.error('Error rendering video:', err);
|
|
43
|
-
res.status(500).send(`Error rendering video: ${err}`);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 0,
|
|
3
|
-
"shared": {
|
|
4
|
-
"background": "rgb(0,0,0)",
|
|
5
|
-
"range": [
|
|
6
|
-
0,
|
|
7
|
-
null
|
|
8
|
-
],
|
|
9
|
-
"size": {
|
|
10
|
-
"x": 1920,
|
|
11
|
-
"y": 1080
|
|
12
|
-
},
|
|
13
|
-
"audioOffset": 0
|
|
14
|
-
},
|
|
15
|
-
"preview": {
|
|
16
|
-
"fps": 30,
|
|
17
|
-
"resolutionScale": 1
|
|
18
|
-
},
|
|
19
|
-
"rendering": {
|
|
20
|
-
"fps": 30,
|
|
21
|
-
"resolutionScale": 1,
|
|
22
|
-
"colorSpace": "srgb",
|
|
23
|
-
"exporter": {
|
|
24
|
-
"name": "@revideo/core/wasm",
|
|
25
|
-
"options": {
|
|
26
|
-
"fastStart": true,
|
|
27
|
-
"includeAudio": true
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {renderVideo} from '@revideo/renderer';
|
|
2
|
-
|
|
3
|
-
async function render() {
|
|
4
|
-
console.log('Rendering video...');
|
|
5
|
-
|
|
6
|
-
const file = await renderVideo({
|
|
7
|
-
projectFile: './src/project.ts',
|
|
8
|
-
settings: {logProgress: true}
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
console.log(`Rendered video to ${file}`);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
render();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="@revideo/core/project" />
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {Audio, Txt, Video, makeScene2D} from '@revideo/2d';
|
|
2
|
-
import {all, chain, createRef, waitFor, useScene} from '@revideo/core';
|
|
3
|
-
|
|
4
|
-
export default makeScene2D(function* (view) {
|
|
5
|
-
const textRef = createRef<Txt>();
|
|
6
|
-
|
|
7
|
-
yield view.add(
|
|
8
|
-
<>
|
|
9
|
-
<Video
|
|
10
|
-
src={'https://revideo-example-assets.s3.amazonaws.com/beach-3.mp4'}
|
|
11
|
-
size={['100%', '100%']}
|
|
12
|
-
play={true}
|
|
13
|
-
/>
|
|
14
|
-
<Audio
|
|
15
|
-
src={'https://revideo-example-assets.s3.amazonaws.com/chill-beat.mp3'}
|
|
16
|
-
play={true}
|
|
17
|
-
time={17.0}
|
|
18
|
-
/>
|
|
19
|
-
</>,
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
yield* waitFor(1);
|
|
23
|
-
|
|
24
|
-
view.add(
|
|
25
|
-
<Txt fontFamily={"Sans-Serif"} fill={"white"} fontSize={10} ref={textRef}>Hello {useScene().variables.get("username", "user")()}</Txt>
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
yield* textRef().scale(10, 1);
|
|
29
|
-
yield* waitFor(30);
|
|
30
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@revideo/2d/tsconfig.project.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "es2016",
|
|
5
|
-
"module": "commonjs",
|
|
6
|
-
"esModuleInterop": true,
|
|
7
|
-
"strict": true,
|
|
8
|
-
"outDir": "dist",
|
|
9
|
-
"noEmit": false
|
|
10
|
-
},
|
|
11
|
-
"include": ["src/**/*"],
|
|
12
|
-
"exclude": ["node_modules"]
|
|
13
|
-
}
|
|
File without changes
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 0,
|
|
3
|
-
"shared": {
|
|
4
|
-
"background": null,
|
|
5
|
-
"range": [
|
|
6
|
-
0,
|
|
7
|
-
null
|
|
8
|
-
],
|
|
9
|
-
"size": {
|
|
10
|
-
"x": 1920,
|
|
11
|
-
"y": 1080
|
|
12
|
-
},
|
|
13
|
-
"audioOffset": 0
|
|
14
|
-
},
|
|
15
|
-
"preview": {
|
|
16
|
-
"fps": 30,
|
|
17
|
-
"resolutionScale": 1
|
|
18
|
-
},
|
|
19
|
-
"rendering": {
|
|
20
|
-
"fps": 30,
|
|
21
|
-
"resolutionScale": 1,
|
|
22
|
-
"colorSpace": "srgb",
|
|
23
|
-
"exporter": {
|
|
24
|
-
"name": "@revideo/core/wasm",
|
|
25
|
-
"options": {}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import {makeProject} from '@revideo/core';
|
|
2
|
-
|
|
3
|
-
import example from './scenes/example?scene';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export default makeProject({
|
|
7
|
-
scenes: [example],
|
|
8
|
-
variables: { backgroundColor: "#FDCFE5", texts: ["gift cards", "discounts", "+ more!!"]} // ["gift cards", "discounts", "+ more!!"] ["events", "special offers", "and more..."]
|
|
9
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="@revideo/core/project" />
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 0,
|
|
3
|
-
"shared": {
|
|
4
|
-
"background": "rgb(255,255,255)",
|
|
5
|
-
"range": [
|
|
6
|
-
0,
|
|
7
|
-
null
|
|
8
|
-
],
|
|
9
|
-
"size": {
|
|
10
|
-
"x": 1920,
|
|
11
|
-
"y": 1080
|
|
12
|
-
},
|
|
13
|
-
"audioOffset": 0
|
|
14
|
-
},
|
|
15
|
-
"preview": {
|
|
16
|
-
"fps": 30,
|
|
17
|
-
"resolutionScale": 1
|
|
18
|
-
},
|
|
19
|
-
"rendering": {
|
|
20
|
-
"fps": 30,
|
|
21
|
-
"resolutionScale": 1,
|
|
22
|
-
"colorSpace": "srgb",
|
|
23
|
-
"exporter": {
|
|
24
|
-
"name": "@revideo/core/wasm",
|
|
25
|
-
"options": {}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import {makeProject} from '@revideo/core';
|
|
2
|
-
|
|
3
|
-
import example from './scenes/example?scene';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export default makeProject({
|
|
7
|
-
scenes: [example],
|
|
8
|
-
variables: { backgroundColor: "#FDCFE5", texts: ["gift cards", "discounts", "+ more!!"]} // ["gift cards", "discounts", "+ more!!"] ["events", "special offers", "and more..."]
|
|
9
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="@revideo/core/project" />
|