@amaster.ai/pi-video-gen 0.1.18 → 0.1.19

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.
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/jobs/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD;;;;;;;;;GASG;AAEH,yEAAyE;AACzE,MAAM,OAAO,GAAG,kCAAkC,CAAC;AAEnD,MAAM,UAAU,YAAY,CAAC,EAAU,EAAE,IAAY;IACnD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,aAAa,CACrB,WAAW,IAAI,6FAA6F,EAC5G,iBAAiB,IAAI,KAAK,CAC3B,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,MAAc;IACrC,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5F,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,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AQ;QACX,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,SAAiB,EAAE,QAA2B;IAC1E,MAAM,OAAO,GAAG,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9D,eAAe,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,EAAE,GAAG,QAAQ,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAClG,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,UAAU;IACJ,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IAE5C,6EAA6E;IAC7E,OAAO,CAAC,MAAc;QACpB,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,aAAa,CACrB,qGAAqG,EACrG,2BAA2B,CAC5B,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACxB,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7B,CAAC,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,51 @@
1
+ import { type ActiveJobs } from './jobs/store.js';
2
+ import type { VideoGenSettings } from './types.js';
3
+ export type RemotionSpec = {
4
+ projectDir: string;
5
+ entryPoint?: string;
6
+ compositionId: string;
7
+ assets?: Record<string, string>;
8
+ inputProps?: Record<string, unknown>;
9
+ browserExecutable?: string;
10
+ };
11
+ export declare function parseRemotionSpec(raw: string): RemotionSpec;
12
+ export declare function preflightRemotion(opts: {
13
+ spec: RemotionSpec;
14
+ cwd: string;
15
+ jobDir: string;
16
+ outputDir?: string;
17
+ assets: Record<string, string>;
18
+ shotIds?: string[];
19
+ ffmpegPath: string;
20
+ signal?: AbortSignal | undefined;
21
+ }): Promise<string>;
22
+ export declare function runRemotion(opts: {
23
+ specPath: string;
24
+ cwd: string;
25
+ settings: VideoGenSettings;
26
+ activeJobs: ActiveJobs;
27
+ trusted: boolean;
28
+ signal?: AbortSignal | undefined;
29
+ preflight?: boolean;
30
+ verifyOnly?: boolean;
31
+ verifyMedia?: boolean;
32
+ frozenProjectHash?: string | undefined;
33
+ assets?: Record<string, string>;
34
+ shotIds?: string[];
35
+ ffmpegPath: string;
36
+ }): Promise<{
37
+ jobId: string;
38
+ projectDir: string;
39
+ projectHash: string;
40
+ finalVideoPath: string;
41
+ resumed: boolean;
42
+ shotTimesSec?: never;
43
+ } | {
44
+ jobId: string;
45
+ projectDir: string;
46
+ projectHash: string;
47
+ finalVideoPath: string;
48
+ resumed: boolean;
49
+ shotTimesSec: Record<string, number> | undefined;
50
+ }>;
51
+ //# sourceMappingURL=remotion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remotion.d.ts","sourceRoot":"","sources":["../src/remotion.ts"],"names":[],"mappings":"AA0BA,OAAO,EACL,KAAK,UAAU,EAKhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAqCF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAoD3D;AAwUD,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,IAAI,EAAE,YAAY,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CAClC,mBAyEA;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;;;;;;;;;;;;;;GAgLA"}
@@ -0,0 +1,547 @@
1
+ import { execFile, spawn } from 'node:child_process';
2
+ import { createHash, randomUUID } from 'node:crypto';
3
+ import { existsSync } from 'node:fs';
4
+ import { copyFile, lstat, mkdir, mkdtemp, readdir, readFile, realpath, rename, rm, stat, } from 'node:fs/promises';
5
+ import { basename, dirname, extname, isAbsolute, join, resolve, sep } from 'node:path';
6
+ import { promisify } from 'node:util';
7
+ import { resolveOutputDir } from './config.js';
8
+ import { VideoGenError } from './errors.js';
9
+ import { probeDuration, probeStreams, resolveFfprobe, resolveGplFfmpeg, runFfmpegCommand, } from './ffmpeg.js';
10
+ import { assertSafeId, hashFileSha256, readJsonFile, writeJsonAtomic, } from './jobs/store.js';
11
+ class RemotionCleanupError extends VideoGenError {
12
+ }
13
+ const namespace = '__pi_video_gen__';
14
+ const sha = (data) => createHash('sha256').update(data).digest('hex');
15
+ const execFileAsync = promisify(execFile);
16
+ async function descendantGroups(rootPid) {
17
+ const { stdout } = await execFileAsync('ps', ['-axo', 'pid=,ppid=,pgid='], {
18
+ maxBuffer: 4 * 1024 * 1024,
19
+ timeout: 2_000,
20
+ });
21
+ const rows = stdout
22
+ .trim()
23
+ .split('\n')
24
+ .map((line) => line.trim().split(/\s+/).map(Number))
25
+ .filter(([pid, ppid, pgid]) => [pid, ppid, pgid].every((value) => value !== undefined && Number.isSafeInteger(value) && value > 0));
26
+ const family = new Set([rootPid]);
27
+ let previousSize = 0;
28
+ while (family.size !== previousSize) {
29
+ previousSize = family.size;
30
+ for (const [pid, ppid] of rows)
31
+ if (family.has(ppid))
32
+ family.add(pid);
33
+ }
34
+ return [...new Set(rows.filter(([pid]) => family.has(pid)).map(([, , pgid]) => pgid))];
35
+ }
36
+ export function parseRemotionSpec(raw) {
37
+ let spec;
38
+ try {
39
+ spec = JSON.parse(raw);
40
+ }
41
+ catch {
42
+ throw new VideoGenError('remotion-input.json is not valid JSON.', 'remotion: json');
43
+ }
44
+ if (!spec ||
45
+ typeof spec !== 'object' ||
46
+ Array.isArray(spec) ||
47
+ typeof spec.projectDir !== 'string' ||
48
+ !isAbsolute(spec.projectDir) ||
49
+ typeof spec.compositionId !== 'string' ||
50
+ !spec.compositionId.trim())
51
+ throw new VideoGenError('Remotion spec requires absolute projectDir and compositionId.', 'remotion: spec');
52
+ if (spec.entryPoint !== undefined &&
53
+ (typeof spec.entryPoint !== 'string' ||
54
+ isAbsolute(spec.entryPoint) ||
55
+ spec.entryPoint.startsWith('..')))
56
+ throw new VideoGenError('Remotion entryPoint must be project-relative.', 'remotion: entry');
57
+ if (spec.assets !== undefined &&
58
+ (!spec.assets || typeof spec.assets !== 'object' || Array.isArray(spec.assets)))
59
+ throw new VideoGenError('Remotion assets must be an ID-to-path object.', 'remotion: assets');
60
+ for (const [id, path] of Object.entries(spec.assets ?? {})) {
61
+ assertSafeId(id, 'asset');
62
+ if (typeof path !== 'string' || !isAbsolute(path))
63
+ throw new VideoGenError(`Remotion asset "${id}" needs an absolute local path.`, 'remotion: asset path');
64
+ }
65
+ if (spec.inputProps !== undefined &&
66
+ (!spec.inputProps ||
67
+ typeof spec.inputProps !== 'object' ||
68
+ Array.isArray(spec.inputProps) ||
69
+ 'videoGenAssets' in spec.inputProps))
70
+ throw new VideoGenError('inputProps must be an object without reserved videoGenAssets.', 'remotion: props');
71
+ return spec;
72
+ }
73
+ async function projectFiles(dir, prefix = '', ignoreBuild = true, excludeDir) {
74
+ const files = [];
75
+ for (const entry of await readdir(join(dir, prefix), { withFileTypes: true })) {
76
+ if (ignoreBuild && !prefix && ['node_modules', '.git'].includes(entry.name))
77
+ continue;
78
+ const rel = join(prefix, entry.name);
79
+ if (join(dir, rel) === excludeDir)
80
+ continue;
81
+ if (entry.isSymbolicLink())
82
+ throw new VideoGenError(`Remotion project contains a symlink: ${rel}.`, 'remotion: symlink');
83
+ if (entry.isDirectory())
84
+ files.push(...(await projectFiles(dir, rel, ignoreBuild, excludeDir)));
85
+ else if (entry.isFile())
86
+ files.push(rel);
87
+ }
88
+ return files.sort();
89
+ }
90
+ async function projectFingerprint(projectDir, excludedDir) {
91
+ const hash = createHash('sha256');
92
+ for (const rel of await projectFiles(projectDir, '', true, excludedDir)) {
93
+ hash.update(rel);
94
+ hash.update(await hashFileSha256(join(projectDir, rel)));
95
+ }
96
+ for (const name of [
97
+ 'remotion',
98
+ '@remotion/bundler',
99
+ '@remotion/renderer',
100
+ 'react',
101
+ 'react-dom',
102
+ ]) {
103
+ const packageFile = join(projectDir, 'node_modules', name, 'package.json');
104
+ const pkg = JSON.parse(await readFile(packageFile, 'utf8').catch(() => {
105
+ throw new VideoGenError(`Remotion project needs ${name} installed locally.`, 'remotion: dependency missing');
106
+ }));
107
+ if (typeof pkg.version !== 'string')
108
+ throw new VideoGenError(`Remotion dependency ${name} has no readable version.`, 'remotion: dependency version');
109
+ hash.update(`${name}@${pkg.version}`);
110
+ }
111
+ return hash.digest('hex');
112
+ }
113
+ async function resolveProject(spec, cwd) {
114
+ const projectDir = await realpath(spec.projectDir).catch(() => {
115
+ throw new VideoGenError('Remotion project directory is missing.', 'remotion: project');
116
+ });
117
+ const realCwd = await realpath(cwd);
118
+ if (projectDir !== realCwd && !projectDir.startsWith(`${realCwd}${sep}`))
119
+ throw new VideoGenError('Remotion project must be inside the trusted working directory.', 'remotion: untrusted project');
120
+ if (!(await stat(join(projectDir, 'package.json')).catch(() => null))?.isFile())
121
+ throw new VideoGenError('Remotion project needs package.json and installed dependencies.', 'remotion: package');
122
+ const candidates = ['src/index.ts', 'src/index.tsx', 'src/index.js', 'src/index.jsx'].filter((p) => existsSync(join(projectDir, p)));
123
+ const entry = spec.entryPoint ?? (candidates.length === 1 ? candidates[0] : undefined);
124
+ if (!entry)
125
+ throw new VideoGenError('Specify entryPoint; the Remotion project entry is missing or ambiguous.', 'remotion: entry ambiguous');
126
+ const entryPath = await realpath(join(projectDir, entry)).catch(() => null);
127
+ if (!entryPath?.startsWith(`${projectDir}${sep}`))
128
+ throw new VideoGenError('Remotion entryPoint escapes the project or is missing.', 'remotion: entry escape');
129
+ const browserExecutable = spec.browserExecutable ??
130
+ process.env.REMOTION_BROWSER_EXECUTABLE ??
131
+ [
132
+ '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
133
+ '/Applications/Chromium.app/Contents/MacOS/Chromium',
134
+ '/usr/bin/google-chrome',
135
+ '/usr/bin/chromium',
136
+ '/usr/bin/chromium-browser',
137
+ ].find(existsSync);
138
+ if (!browserExecutable || !(await stat(browserExecutable).catch(() => null))?.isFile())
139
+ throw new VideoGenError('A local Chrome or Chromium executable is required. Set browserExecutable or REMOTION_BROWSER_EXECUTABLE; no browser is downloaded.', 'remotion: browser missing');
140
+ for (const name of ['@remotion/bundler', '@remotion/renderer']) {
141
+ if (!existsSync(join(projectDir, 'node_modules', name)))
142
+ throw new VideoGenError(`Remotion project must install ${name} locally.`, 'remotion: dependency missing');
143
+ }
144
+ return { projectDir, entryPoint: entryPath, browserExecutable };
145
+ }
146
+ function assertOutputLocation(projectDir, outputDir, entryPoint) {
147
+ const publicDir = join(projectDir, 'public');
148
+ if (projectDir === outputDir ||
149
+ projectDir.startsWith(`${outputDir}${sep}`) ||
150
+ outputDir === publicDir ||
151
+ outputDir.startsWith(`${publicDir}${sep}`))
152
+ throw new VideoGenError('Remotion output directory must be outside the project public/ and cannot contain the project.', 'remotion: output overlap');
153
+ if (entryPoint === outputDir || entryPoint.startsWith(`${outputDir}${sep}`))
154
+ throw new VideoGenError('Remotion entryPoint cannot be inside the video output directory, which is excluded from the frozen project fingerprint.', 'remotion: entry in output');
155
+ }
156
+ async function snapshotPublic(projectDir, dest, assets, placeholder) {
157
+ if (await lstat(dest).catch(() => null))
158
+ throw new VideoGenError('Remotion public snapshot path already exists.', 'remotion: snapshot exists');
159
+ await mkdir(dest);
160
+ try {
161
+ const publicDir = join(projectDir, 'public');
162
+ if (existsSync(publicDir)) {
163
+ if (existsSync(join(publicDir, namespace)))
164
+ throw new VideoGenError(`Project public/ occupies reserved ${namespace}/ namespace.`, 'remotion: public collision');
165
+ for (const rel of await projectFiles(publicDir, '', false)) {
166
+ if (rel === namespace || rel.startsWith(`${namespace}${sep}`))
167
+ throw new VideoGenError(`Project public/ occupies reserved ${namespace}/ namespace.`, 'remotion: public collision');
168
+ const target = join(dest, rel);
169
+ await mkdir(dirname(target), { recursive: true });
170
+ await copyFile(join(publicDir, rel), target);
171
+ if ((await hashFileSha256(join(publicDir, rel))) !== (await hashFileSha256(target)))
172
+ throw new VideoGenError(`Original public resource ${rel} changed while being copied.`, 'remotion: public race');
173
+ }
174
+ }
175
+ await mkdir(join(dest, namespace), { recursive: true });
176
+ const mapped = {};
177
+ for (const [id, source] of Object.entries(assets)) {
178
+ const ext = extname(source).toLowerCase() || '.mp4';
179
+ if (!/^[.][a-z0-9]{1,8}$/.test(ext))
180
+ throw new VideoGenError(`Unsupported asset extension for ${id}.`, 'remotion: extension');
181
+ const rel = `${namespace}/${id}${ext}`;
182
+ if (placeholder && /\.(mp4|mov|webm|m4v)$/.test(ext))
183
+ await copyFile(placeholder, join(dest, rel));
184
+ else
185
+ await copyFile(source, join(dest, rel));
186
+ mapped[id] = rel;
187
+ }
188
+ return mapped;
189
+ }
190
+ catch (error) {
191
+ await rm(dest, { recursive: true, force: true });
192
+ throw error;
193
+ }
194
+ }
195
+ const runner = `
196
+ const {createRequire} = require('node:module');
197
+ const {writeFileSync} = require('node:fs');
198
+ const {join} = require('node:path');
199
+ let stage = 19;
200
+ (async () => {
201
+ const x = JSON.parse(process.argv[1]);
202
+ const req = createRequire(join(x.projectDir, 'package.json'));
203
+ const {bundle} = req('@remotion/bundler');
204
+ const {selectComposition, renderStill, renderMedia} = req('@remotion/renderer');
205
+ stage = 20;
206
+ const serveUrl = await bundle({entryPoint: x.entryPoint, rootDir: x.projectDir, publicDir: x.publicDir});
207
+ stage = 21;
208
+ const composition = await selectComposition({serveUrl, id: x.compositionId, inputProps: x.inputProps, browserExecutable: x.browserExecutable});
209
+ if (x.shotIds) {
210
+ const times = composition.props.videoGenShotTimesSec;
211
+ if (!times || typeof times !== 'object' || Array.isArray(times) || x.shotIds.some((id) => !Number.isFinite(times[id]) || times[id] < 0 || times[id] >= composition.durationInFrames / composition.fps)) {
212
+ throw new Error('Composition must expose videoGenShotTimesSec for every shot.');
213
+ }
214
+ if (x.metadataPath) writeFileSync(x.metadataPath, JSON.stringify(Object.fromEntries(x.shotIds.map((id) => [id, times[id]]))));
215
+ }
216
+ if (x.mode === 'preflight') { stage = 22; await renderStill({serveUrl, composition, inputProps: x.inputProps, output: x.output, frame: 0, browserExecutable: x.browserExecutable}); }
217
+ else { stage = 23; await renderMedia({serveUrl, composition, inputProps: x.inputProps, codec: 'h264', outputLocation: x.output, browserExecutable: x.browserExecutable}); }
218
+ })().catch(() => { process.exitCode = stage; });`;
219
+ function runRunner(input, signal) {
220
+ return new Promise((done, fail) => {
221
+ const child = spawn(process.execPath, ['-e', runner, JSON.stringify(input)], {
222
+ stdio: 'ignore',
223
+ detached: process.platform !== 'win32',
224
+ });
225
+ let spawnFailed = false;
226
+ let stopTree;
227
+ const onAbort = () => {
228
+ if (!child.pid || stopTree)
229
+ return;
230
+ if (process.platform === 'win32') {
231
+ stopTree = new Promise((resolve) => {
232
+ const killer = spawn('taskkill', ['/PID', String(child.pid), '/T', '/F'], {
233
+ stdio: 'ignore',
234
+ });
235
+ killer.once('error', () => {
236
+ child.kill('SIGKILL');
237
+ resolve(false);
238
+ });
239
+ killer.once('close', (code) => {
240
+ if (code !== 0)
241
+ child.kill('SIGKILL');
242
+ resolve(code === 0);
243
+ });
244
+ });
245
+ }
246
+ else {
247
+ stopTree = (async () => {
248
+ const rootPid = child.pid;
249
+ try {
250
+ process.kill(-rootPid, 'SIGSTOP');
251
+ }
252
+ catch {
253
+ child.kill('SIGKILL');
254
+ return false;
255
+ }
256
+ const groups = new Set([rootPid]);
257
+ let cleanupFailed = false;
258
+ const discoverDeadline = Date.now() + 7_000;
259
+ while (true) {
260
+ const fresh = (await descendantGroups(rootPid)).filter((group) => !groups.has(group));
261
+ if (fresh.length === 0)
262
+ break;
263
+ for (const group of fresh) {
264
+ groups.add(group);
265
+ try {
266
+ process.kill(-group, 'SIGSTOP');
267
+ }
268
+ catch (error) {
269
+ if (error.code !== 'ESRCH')
270
+ cleanupFailed = true;
271
+ }
272
+ }
273
+ if (Date.now() >= discoverDeadline) {
274
+ cleanupFailed = true;
275
+ break;
276
+ }
277
+ }
278
+ for (const group of groups) {
279
+ try {
280
+ process.kill(-group, 'SIGKILL');
281
+ }
282
+ catch (error) {
283
+ if (error.code !== 'ESRCH') {
284
+ if (group === rootPid)
285
+ child.kill('SIGKILL');
286
+ cleanupFailed = true;
287
+ }
288
+ }
289
+ }
290
+ const deadline = Date.now() + 7_000;
291
+ while (Date.now() < deadline) {
292
+ const alive = [...groups].some((group) => {
293
+ try {
294
+ process.kill(-group, 0);
295
+ return true;
296
+ }
297
+ catch (error) {
298
+ return error.code !== 'ESRCH';
299
+ }
300
+ });
301
+ if (!alive)
302
+ return !cleanupFailed;
303
+ await new Promise((resolve) => setTimeout(resolve, 25));
304
+ }
305
+ return false;
306
+ })().catch(() => {
307
+ try {
308
+ process.kill(-child.pid, 'SIGKILL');
309
+ }
310
+ catch {
311
+ child.kill('SIGKILL');
312
+ }
313
+ return false;
314
+ });
315
+ }
316
+ };
317
+ child.on('error', () => {
318
+ spawnFailed = true;
319
+ });
320
+ child.on('close', (code) => {
321
+ void (async () => {
322
+ signal?.removeEventListener('abort', onAbort);
323
+ const stopped = await stopTree;
324
+ if (stopped === false)
325
+ throw new RemotionCleanupError('Remotion cancellation could not stop the renderer process tree. Stop remaining processes and restart Pi before resuming this job.', 'remotion: cancellation cleanup failed');
326
+ if (signal?.aborted)
327
+ throw new VideoGenError('Remotion rendering was cancelled.', 'remotion: cancelled');
328
+ if (spawnFailed)
329
+ throw new VideoGenError('Remotion process could not start.', 'remotion: spawn');
330
+ if (code === 0)
331
+ return done();
332
+ const reason = {
333
+ 19: 'Remotion dependencies could not load.',
334
+ 20: 'Remotion bundle failed; check the project entry and source.',
335
+ 21: 'Remotion composition could not be selected; check its ID, videoGenShotTimesSec metadata and browser.',
336
+ 22: 'Remotion frame preflight failed; check browser access and static assets.',
337
+ 23: 'Remotion video rendering failed; check media compatibility and project code.',
338
+ }[code ?? -1] ?? 'Remotion process failed.';
339
+ throw new VideoGenError(reason, `remotion: process stage ${code}`);
340
+ })().catch(fail);
341
+ });
342
+ if (signal?.aborted)
343
+ onAbort();
344
+ else
345
+ signal?.addEventListener('abort', onAbort, { once: true });
346
+ });
347
+ }
348
+ export async function preflightRemotion(opts) {
349
+ const project = await resolveProject(opts.spec, opts.cwd);
350
+ const realJob = await realpath(opts.jobDir);
351
+ const realOutput = await realpath(opts.outputDir ?? dirname(realJob));
352
+ assertOutputLocation(project.projectDir, realOutput, project.entryPoint);
353
+ const fingerprint = await projectFingerprint(project.projectDir, realOutput);
354
+ const assemblyDir = join(opts.jobDir, 'assembly');
355
+ await mkdir(assemblyDir, { recursive: true });
356
+ if (!(await realpath(assemblyDir)).startsWith(`${await realpath(opts.jobDir)}${sep}`))
357
+ throw new VideoGenError('Remotion assembly directory escapes the job.', 'remotion: assembly escape');
358
+ const dir = await mkdtemp(join(assemblyDir, '.preflight-'));
359
+ let cleanupSafe = true;
360
+ try {
361
+ const placeholder = join(dir, 'placeholder.mp4');
362
+ const encoder = resolveGplFfmpeg(opts.ffmpegPath);
363
+ if (!encoder.runnable)
364
+ throw new VideoGenError('Remotion preflight needs an H.264-capable ffmpeg to create browser-playable placeholder video.', 'remotion: h264 encoder missing');
365
+ await runFfmpegCommand(encoder.path, [
366
+ '-y',
367
+ '-f',
368
+ 'lavfi',
369
+ '-i',
370
+ 'color=c=black:s=640x360:r=25',
371
+ '-t',
372
+ '2',
373
+ '-c:v',
374
+ 'libx264',
375
+ '-pix_fmt',
376
+ 'yuv420p',
377
+ '-movflags',
378
+ '+faststart',
379
+ placeholder,
380
+ ], opts.signal);
381
+ const mapped = await snapshotPublic(project.projectDir, join(dir, 'public'), opts.assets, placeholder);
382
+ await runRunner({
383
+ ...project,
384
+ publicDir: join(dir, 'public'),
385
+ compositionId: opts.spec.compositionId,
386
+ shotIds: opts.shotIds,
387
+ inputProps: { ...opts.spec.inputProps, videoGenAssets: mapped },
388
+ output: join(dir, 'frame.png'),
389
+ mode: 'preflight',
390
+ }, opts.signal);
391
+ if ((await projectFingerprint(project.projectDir, realOutput)) !== fingerprint)
392
+ throw new VideoGenError('Remotion project changed during preflight. Retry in a new job.', 'remotion: project preflight race');
393
+ return fingerprint;
394
+ }
395
+ catch (error) {
396
+ if (error instanceof RemotionCleanupError)
397
+ cleanupSafe = false;
398
+ throw error;
399
+ }
400
+ finally {
401
+ if (cleanupSafe)
402
+ await rm(dir, { recursive: true, force: true });
403
+ }
404
+ }
405
+ export async function runRemotion(opts) {
406
+ if (!opts.trusted)
407
+ throw new VideoGenError('Remotion execution requires a trusted project.', 'remotion: untrusted');
408
+ const abs = resolve(opts.cwd, opts.specPath);
409
+ if (basename(abs) !== 'remotion-input.json')
410
+ throw new VideoGenError('Expected remotion-input.json.', 'remotion: filename');
411
+ const jobDir = await realpath(dirname(abs));
412
+ const output = await realpath(resolveOutputDir(opts.settings, opts.cwd)).catch(() => resolve(resolveOutputDir(opts.settings, opts.cwd)));
413
+ if (!jobDir.startsWith(`${output}${sep}`))
414
+ throw new VideoGenError('Remotion job must be inside the video-gen output directory.', 'remotion: job location');
415
+ const spec = parseRemotionSpec(await readFile(abs, 'utf8'));
416
+ const assets = { ...spec.assets, ...opts.assets };
417
+ const release = opts.activeJobs.acquire(jobDir);
418
+ let releaseLock = true;
419
+ try {
420
+ const project = await resolveProject(spec, opts.cwd);
421
+ assertOutputLocation(project.projectDir, output, project.entryPoint);
422
+ const projectHash = await projectFingerprint(project.projectDir, output);
423
+ if (opts.frozenProjectHash && projectHash !== opts.frozenProjectHash)
424
+ throw new VideoGenError('Remotion project changed since preflight. Start a new job.', 'remotion: project drift');
425
+ if (opts.preflight)
426
+ return {
427
+ jobId: basename(jobDir),
428
+ projectDir: project.projectDir,
429
+ projectHash,
430
+ finalVideoPath: '',
431
+ resumed: false,
432
+ };
433
+ const hashes = {};
434
+ for (const [id, path] of Object.entries(assets)) {
435
+ if (!(await stat(path).catch(() => null))?.isFile())
436
+ throw new VideoGenError(`Remotion asset ${id} is missing.`, 'remotion: missing asset');
437
+ hashes[id] = await hashFileSha256(path);
438
+ }
439
+ const fingerprint = sha(JSON.stringify({ spec, projectHash, hashes }));
440
+ const manifestPath = join(jobDir, 'remotion-manifest.json');
441
+ const manifest = readJsonFile(manifestPath);
442
+ if (manifest) {
443
+ if (manifest.kind !== 'remotion' || manifest.fingerprint !== fingerprint)
444
+ throw new VideoGenError('Remotion project or assets changed; use a new job directory.', 'remotion: drift');
445
+ if (manifest.finalVideoPath !== join(jobDir, 'final_video.mp4'))
446
+ throw new VideoGenError('Remotion manifest final path changed.', 'remotion: final path');
447
+ const finalStat = await lstat(manifest.finalVideoPath).catch(() => null);
448
+ if (!finalStat?.isFile() || finalStat.isSymbolicLink())
449
+ throw new VideoGenError('Remotion final video is not a regular file.', 'remotion: final file invalid');
450
+ const finalHash = await hashFileSha256(manifest.finalVideoPath).catch(() => null);
451
+ if (!finalHash || finalHash !== manifest.finalVideoHash)
452
+ throw new VideoGenError('Remotion final video is missing or changed; refusing to silently rebuild.', 'remotion: final drift');
453
+ if (opts.shotIds?.some((id) => !Number.isFinite(manifest.shotTimesSec?.[id]) ||
454
+ (manifest.shotTimesSec?.[id] ?? -1) < 0))
455
+ throw new VideoGenError('Remotion shot timing metadata is missing.', 'remotion: shot timings');
456
+ return {
457
+ jobId: basename(jobDir),
458
+ projectDir: project.projectDir,
459
+ projectHash,
460
+ finalVideoPath: manifest.finalVideoPath,
461
+ resumed: true,
462
+ shotTimesSec: manifest.shotTimesSec,
463
+ };
464
+ }
465
+ if (opts.verifyOnly)
466
+ throw new VideoGenError('Completed Remotion assembly manifest is missing; refusing to rebuild.', 'remotion: missing manifest');
467
+ const publicDir = join(jobDir, `public-snapshot-${randomUUID()}`);
468
+ const temp = join(jobDir, `final_video.${randomUUID()}.tmp.mp4`);
469
+ const metadataPath = join(jobDir, `shot-times.${randomUUID()}.json`);
470
+ let ownsSnapshot = false;
471
+ let retainSnapshot = false;
472
+ let cleanupSafe = true;
473
+ try {
474
+ const mapped = await snapshotPublic(project.projectDir, publicDir, assets, undefined);
475
+ ownsSnapshot = true;
476
+ for (const [id, expected] of Object.entries(hashes))
477
+ if ((await hashFileSha256(join(publicDir, mapped[id]))) !== expected)
478
+ throw new VideoGenError(`Remotion asset "${id}" changed while being copied.`, 'remotion: asset race');
479
+ await runRunner({
480
+ ...project,
481
+ publicDir,
482
+ compositionId: spec.compositionId,
483
+ shotIds: opts.shotIds,
484
+ metadataPath,
485
+ inputProps: { ...spec.inputProps, videoGenAssets: mapped },
486
+ output: temp,
487
+ mode: 'render',
488
+ }, opts.signal);
489
+ const outputStat = await stat(temp).catch(() => null);
490
+ if (!outputStat?.isFile() || !outputStat.size)
491
+ throw new VideoGenError('Remotion produced no video.', 'remotion: empty video');
492
+ const shotTimesSec = opts.shotIds
493
+ ? JSON.parse(await readFile(metadataPath, 'utf8'))
494
+ : undefined;
495
+ if (opts.verifyMedia !== false) {
496
+ const ffprobe = resolveFfprobe(opts.ffmpegPath);
497
+ if (!ffprobe.runnable)
498
+ throw new VideoGenError('ffprobe is required to verify Remotion output.', 'remotion: ffprobe missing');
499
+ await probeStreams(ffprobe.path, temp, opts.signal);
500
+ await probeDuration(ffprobe.path, temp, opts.signal);
501
+ }
502
+ if ((await projectFingerprint(project.projectDir, output)) !== projectHash)
503
+ throw new VideoGenError('Remotion project changed during rendering; refusing to commit output.', 'remotion: project render race');
504
+ const finalVideoPath = join(jobDir, 'final_video.mp4');
505
+ await rename(temp, finalVideoPath);
506
+ writeJsonAtomic(manifestPath, {
507
+ kind: 'remotion',
508
+ fingerprint,
509
+ finalVideoPath,
510
+ finalVideoHash: await hashFileSha256(finalVideoPath),
511
+ shotTimesSec,
512
+ });
513
+ retainSnapshot = true;
514
+ return {
515
+ jobId: basename(jobDir),
516
+ projectDir: project.projectDir,
517
+ projectHash,
518
+ finalVideoPath,
519
+ resumed: false,
520
+ shotTimesSec,
521
+ };
522
+ }
523
+ catch (error) {
524
+ if (error instanceof RemotionCleanupError)
525
+ cleanupSafe = false;
526
+ throw error;
527
+ }
528
+ finally {
529
+ if (cleanupSafe) {
530
+ await rm(temp, { force: true });
531
+ await rm(metadataPath, { force: true });
532
+ if (ownsSnapshot && !retainSnapshot)
533
+ await rm(publicDir, { recursive: true, force: true });
534
+ }
535
+ }
536
+ }
537
+ catch (error) {
538
+ if (error instanceof RemotionCleanupError)
539
+ releaseLock = false;
540
+ throw error;
541
+ }
542
+ finally {
543
+ if (releaseLock)
544
+ release();
545
+ }
546
+ }
547
+ //# sourceMappingURL=remotion.js.map