agentreel 0.1.1 → 0.1.2
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/README.md +1 -1
- package/bin/agentreel.mjs +29 -7
- package/package.json +3 -1
package/README.md
CHANGED
package/bin/agentreel.mjs
CHANGED
|
@@ -258,7 +258,7 @@ function extractBrowserHighlights(videoPath, task) {
|
|
|
258
258
|
|
|
259
259
|
// ── Render ──────────────────────────────────────────────────
|
|
260
260
|
|
|
261
|
-
function renderVideo(props, output, musicPath) {
|
|
261
|
+
async function renderVideo(props, output, musicPath) {
|
|
262
262
|
const publicDir = join(ROOT, "public");
|
|
263
263
|
if (!existsSync(publicDir)) mkdirSync(publicDir, { recursive: true });
|
|
264
264
|
if (musicPath && existsSync(musicPath)) {
|
|
@@ -267,11 +267,33 @@ function renderVideo(props, output, musicPath) {
|
|
|
267
267
|
|
|
268
268
|
const absOutput = resolve(output);
|
|
269
269
|
const propsJSON = JSON.stringify(props);
|
|
270
|
-
const remotion = join(ROOT, "node_modules", ".bin", "remotion");
|
|
271
270
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
271
|
+
// Render using Remotion's Node.js API — no CLI binary needed
|
|
272
|
+
const { bundle } = await import("@remotion/bundler");
|
|
273
|
+
const { renderMedia, selectComposition } = await import("@remotion/renderer");
|
|
274
|
+
|
|
275
|
+
const entryPoint = join(ROOT, "src", "index.ts");
|
|
276
|
+
|
|
277
|
+
console.error(" Bundling...");
|
|
278
|
+
const serveUrl = await bundle({
|
|
279
|
+
entryPoint,
|
|
280
|
+
webpackOverride: (config) => config,
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
console.error(" Selecting composition...");
|
|
284
|
+
const composition = await selectComposition({
|
|
285
|
+
serveUrl,
|
|
286
|
+
id: "CastVideo",
|
|
287
|
+
inputProps: props,
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
console.error(" Rendering...");
|
|
291
|
+
await renderMedia({
|
|
292
|
+
composition,
|
|
293
|
+
serveUrl,
|
|
294
|
+
codec: "h264",
|
|
295
|
+
outputLocation: absOutput,
|
|
296
|
+
inputProps: props,
|
|
275
297
|
});
|
|
276
298
|
|
|
277
299
|
const size = statSync(absOutput).size;
|
|
@@ -413,7 +435,7 @@ async function main() {
|
|
|
413
435
|
console.error(` ${highlights.length} highlights extracted`);
|
|
414
436
|
|
|
415
437
|
console.error("Step 3/3: Rendering video...");
|
|
416
|
-
renderVideo({
|
|
438
|
+
await renderVideo({
|
|
417
439
|
title: videoTitle,
|
|
418
440
|
subtitle: prompt,
|
|
419
441
|
highlights,
|
|
@@ -443,7 +465,7 @@ async function main() {
|
|
|
443
465
|
console.error(` ${highlights.length} highlights extracted`);
|
|
444
466
|
|
|
445
467
|
console.error("Step 3/3: Rendering video...");
|
|
446
|
-
renderVideo({
|
|
468
|
+
await renderVideo({
|
|
447
469
|
title: videoTitle,
|
|
448
470
|
subtitle: prompt,
|
|
449
471
|
highlights,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentreel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Turn Claude Code sessions into viral demo videos",
|
|
5
5
|
"bin": {
|
|
6
6
|
"agentreel": "./bin/agentreel.mjs"
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
"render": "remotion render CastVideo out/cast.mp4"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
+
"@remotion/bundler": "^4",
|
|
14
|
+
"@remotion/renderer": "^4",
|
|
13
15
|
"@remotion/cli": "^4",
|
|
14
16
|
"remotion": "^4",
|
|
15
17
|
"react": "^18",
|