@revideo/create 0.3.7-alpha.975 → 0.3.7-beta.987
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/package.json +9 -9
- package/examples/README.md +0 -39
- package/examples/avatar-with-background/package-lock.json +0 -3162
- package/examples/avatar-with-background/package.json +0 -26
- 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/render.ts +0 -36
- package/examples/avatar-with-background/src/revideo.d.ts +0 -1
- package/examples/avatar-with-background/src/scenes/example.tsx +0 -28
- package/examples/avatar-with-background/tsconfig.json +0 -9
- package/examples/avatar-with-background/vite.config.ts +0 -8
- package/examples/default/package.json +0 -24
- package/examples/default/src/project.meta +0 -31
- package/examples/default/src/project.ts +0 -7
- package/examples/default/src/render.ts +0 -17
- package/examples/default/src/revideo.d.ts +0 -1
- package/examples/default/src/scenes/example.tsx +0 -38
- package/examples/default/tsconfig.json +0 -9
- package/examples/google-cloud-run/Dockerfile +0 -56
- package/examples/google-cloud-run/README.md +0 -35
- package/examples/google-cloud-run/package-lock.json +0 -3862
- package/examples/google-cloud-run/package.json +0 -28
- package/examples/google-cloud-run/src/index.ts +0 -39
- package/examples/google-cloud-run/src/project.meta +0 -31
- package/examples/google-cloud-run/src/project.ts +0 -7
- package/examples/google-cloud-run/src/revideo.d.ts +0 -1
- package/examples/google-cloud-run/src/scenes/example.meta +0 -5
- package/examples/google-cloud-run/src/scenes/example.tsx +0 -30
- package/examples/google-cloud-run/tsconfig.json +0 -9
- package/examples/google-cloud-run/vite.config.ts +0 -9
- 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-lock.json +0 -2588
- 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-lock.json +0 -4871
- package/examples/google-cloud-run-parallelized/render-worker/package.json +0 -30
- package/examples/google-cloud-run-parallelized/render-worker/src/index.ts +0 -39
- package/examples/google-cloud-run-parallelized/render-worker/src/project.ts +0 -6
- 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/logo.svg +0 -6
- package/examples/logo_dark.svg +0 -6
- package/examples/marketing-templates/README.md +0 -10
- package/examples/marketing-templates/marketing-template/package-lock.json +0 -3824
- package/examples/marketing-templates/marketing-template/package.json +0 -24
- package/examples/marketing-templates/marketing-template/src/globals.css +0 -0
- package/examples/marketing-templates/marketing-template/src/project.meta +0 -31
- package/examples/marketing-templates/marketing-template/src/project.ts +0 -9
- package/examples/marketing-templates/marketing-template/src/render.ts +0 -17
- 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/src/scenes/example.tsx +0 -67
- package/examples/marketing-templates/marketing-template/tsconfig.json +0 -9
- package/examples/marketing-templates/marketing-template/vite.config.ts +0 -9
- package/examples/marketing-templates/multiple-videos-in-one/package-lock.json +0 -3824
- package/examples/marketing-templates/multiple-videos-in-one/package.json +0 -24
- package/examples/marketing-templates/multiple-videos-in-one/src/project.meta +0 -31
- package/examples/marketing-templates/multiple-videos-in-one/src/project.ts +0 -9
- package/examples/marketing-templates/multiple-videos-in-one/src/render.ts +0 -17
- 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/src/scenes/example.tsx +0 -122
- package/examples/marketing-templates/multiple-videos-in-one/tsconfig.json +0 -9
- package/examples/marketing-templates/multiple-videos-in-one/vite.config.ts +0 -9
- package/examples/saas-template/.prettierrc +0 -9
- package/examples/saas-template/README.md +0 -28
- package/examples/saas-template/next/app/actions.tsx +0 -113
- package/examples/saas-template/next/app/api/render/route.ts +0 -22
- package/examples/saas-template/next/app/globals.css +0 -3
- package/examples/saas-template/next/app/layout.tsx +0 -25
- package/examples/saas-template/next/app/page.tsx +0 -182
- package/examples/saas-template/next/next.config.mjs +0 -4
- package/examples/saas-template/next/package.json +0 -34
- package/examples/saas-template/next/postcss.config.js +0 -6
- package/examples/saas-template/next/public/favicon.ico +0 -0
- package/examples/saas-template/next/public/next.svg +0 -1
- package/examples/saas-template/next/public/vercel.svg +0 -1
- package/examples/saas-template/next/tailwind.config.ts +0 -30
- package/examples/saas-template/next/tsconfig.json +0 -26
- package/examples/saas-template/next/utils/parse.ts +0 -35
- package/examples/saas-template/revideo/package.json +0 -24
- package/examples/saas-template/revideo/src/global.css +0 -1
- package/examples/saas-template/revideo/src/project.meta +0 -31
- package/examples/saas-template/revideo/src/project.ts +0 -9
- package/examples/saas-template/revideo/src/render.ts +0 -14
- package/examples/saas-template/revideo/src/revideo.d.ts +0 -1
- package/examples/saas-template/revideo/src/scenes/example.meta +0 -5
- package/examples/saas-template/revideo/src/scenes/example.tsx +0 -178
- package/examples/saas-template/revideo/tsconfig.json +0 -9
- package/examples/saas-template/revideo/vite.config.ts +0 -6
- package/examples/stitching-videos/README.md +0 -7
- package/examples/stitching-videos/package-lock.json +0 -2801
- package/examples/stitching-videos/package.json +0 -23
- package/examples/stitching-videos/src/project.meta +0 -31
- package/examples/stitching-videos/src/project.ts +0 -26
- package/examples/stitching-videos/src/render.ts +0 -58
- package/examples/stitching-videos/src/revideo.d.ts +0 -1
- package/examples/stitching-videos/src/scenes/example.tsx +0 -30
- package/examples/stitching-videos/tsconfig.json +0 -9
- package/examples/stitching-videos/vite.config.ts +0 -8
- package/examples/youtube-shorts/README.md +0 -65
- package/examples/youtube-shorts/package-lock.json +0 -3914
- package/examples/youtube-shorts/package.json +0 -30
- package/examples/youtube-shorts/src/global.css +0 -3
- package/examples/youtube-shorts/src/metadata.json +0 -635
- package/examples/youtube-shorts/src/project.meta +0 -31
- package/examples/youtube-shorts/src/project.ts +0 -9
- package/examples/youtube-shorts/src/render.ts +0 -40
- package/examples/youtube-shorts/src/revideo.d.ts +0 -1
- package/examples/youtube-shorts/src/scenes/example.tsx +0 -211
- package/examples/youtube-shorts/src/utils.ts +0 -123
- package/examples/youtube-shorts/tsconfig.json +0 -9
- package/examples/youtube-shorts/vite.config.ts +0 -8
|
@@ -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.3.4",
|
|
11
|
-
"@revideo/core": "0.3.4",
|
|
12
|
-
"@revideo/ffmpeg": "0.3.4",
|
|
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
|