hyperframes 0.6.38 → 0.6.39

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.
Files changed (2) hide show
  1. package/dist/cli.js +41 -8
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -54,7 +54,7 @@ var VERSION;
54
54
  var init_version = __esm({
55
55
  "src/version.ts"() {
56
56
  "use strict";
57
- VERSION = true ? "0.6.38" : "0.0.0-dev";
57
+ VERSION = true ? "0.6.39" : "0.0.0-dev";
58
58
  }
59
59
  });
60
60
 
@@ -31396,7 +31396,7 @@ async function encodeFramesChunkedConcat(framesDir, framePattern, outputPath, op
31396
31396
  fileSize
31397
31397
  };
31398
31398
  }
31399
- async function muxVideoWithAudio(videoPath, audioPath, outputPath, signal, config) {
31399
+ async function muxVideoWithAudio(videoPath, audioPath, outputPath, signal, config, fps) {
31400
31400
  const outputDir = dirname7(outputPath);
31401
31401
  if (!existsSync21(outputDir)) mkdirSync11(outputDir, { recursive: true });
31402
31402
  const isWebm = outputPath.endsWith(".webm");
@@ -31410,6 +31410,9 @@ async function muxVideoWithAudio(videoPath, audioPath, outputPath, signal, confi
31410
31410
  args.push("-c:a", "aac", "-b:a", "192k", "-movflags", "+faststart");
31411
31411
  }
31412
31412
  args.push("-avoid_negative_ts", "make_zero");
31413
+ if (fps !== void 0) {
31414
+ args.push("-r", fpsToFfmpegArg(fps));
31415
+ }
31413
31416
  args.push("-shortest", "-y", outputPath);
31414
31417
  const processTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG2.ffmpegProcessTimeout;
31415
31418
  const result = await runFfmpeg(args, { signal, timeout: processTimeout });
@@ -31428,12 +31431,16 @@ async function muxVideoWithAudio(videoPath, audioPath, outputPath, signal, confi
31428
31431
  error: !result.success ? formatFfmpegError(result.exitCode, result.stderr) : void 0
31429
31432
  };
31430
31433
  }
31431
- async function applyFaststart(inputPath, outputPath, signal, config) {
31434
+ async function applyFaststart(inputPath, outputPath, signal, config, fps) {
31432
31435
  if (outputPath.endsWith(".webm") || outputPath.endsWith(".mov")) {
31433
31436
  if (inputPath !== outputPath) copyFileSync(inputPath, outputPath);
31434
31437
  return { success: true, outputPath, durationMs: 0 };
31435
31438
  }
31436
- const args = ["-i", inputPath, "-c", "copy", "-movflags", "+faststart", "-y", outputPath];
31439
+ const args = ["-i", inputPath, "-c", "copy", "-movflags", "+faststart"];
31440
+ if (fps !== void 0) {
31441
+ args.push("-r", fpsToFfmpegArg(fps));
31442
+ }
31443
+ args.push("-y", outputPath);
31437
31444
  const processTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG2.ffmpegProcessTimeout;
31438
31445
  const result = await runFfmpeg(args, { signal, timeout: processTimeout });
31439
31446
  if (signal?.aborted) {
@@ -42001,14 +42008,22 @@ async function runAssembleStage(input) {
42001
42008
  videoOnlyPath,
42002
42009
  audioOutputPath,
42003
42010
  outputPath,
42004
- abortSignal
42011
+ abortSignal,
42012
+ void 0,
42013
+ job.config.fps
42005
42014
  );
42006
42015
  assertNotAborted();
42007
42016
  if (!muxResult.success) {
42008
42017
  throw new Error(`Audio muxing failed: ${muxResult.error}`);
42009
42018
  }
42010
42019
  } else {
42011
- const faststartResult = await applyFaststart(videoOnlyPath, outputPath, abortSignal);
42020
+ const faststartResult = await applyFaststart(
42021
+ videoOnlyPath,
42022
+ outputPath,
42023
+ abortSignal,
42024
+ void 0,
42025
+ job.config.fps
42026
+ );
42012
42027
  assertNotAborted();
42013
42028
  if (!faststartResult.success) {
42014
42029
  throw new Error(`Faststart failed: ${faststartResult.error}`);
@@ -45349,7 +45364,13 @@ async function assemble(planDir, chunkPaths, audioPath, outputPath, options) {
45349
45364
  writeFileSync23(concatListPath, `${concatBody}
45350
45365
  `, "utf-8");
45351
45366
  const concatOutputPath = join56(workDir, `concat.${plan2.dimensions.format}`);
45367
+ const fpsArg = fpsToFfmpegArg({
45368
+ num: plan2.dimensions.fpsNum,
45369
+ den: plan2.dimensions.fpsDen
45370
+ });
45352
45371
  const concatArgs = [
45372
+ "-r",
45373
+ fpsArg,
45353
45374
  "-f",
45354
45375
  "concat",
45355
45376
  "-safe",
@@ -45391,13 +45412,24 @@ async function assemble(planDir, chunkPaths, audioPath, outputPath, options) {
45391
45412
  concatOutputPath,
45392
45413
  audioForMux,
45393
45414
  muxOutputPath,
45394
- abortSignal
45415
+ abortSignal,
45416
+ void 0,
45417
+ { num: plan2.dimensions.fpsNum, den: plan2.dimensions.fpsDen }
45395
45418
  );
45396
45419
  if (!muxResult.success) {
45397
45420
  throw new Error(`[assemble] audio mux failed: ${muxResult.error}`);
45398
45421
  }
45399
45422
  }
45400
- const faststartResult = await applyFaststart(muxOutputPath, outputPath, abortSignal);
45423
+ const faststartResult = await applyFaststart(
45424
+ muxOutputPath,
45425
+ outputPath,
45426
+ abortSignal,
45427
+ void 0,
45428
+ {
45429
+ num: plan2.dimensions.fpsNum,
45430
+ den: plan2.dimensions.fpsDen
45431
+ }
45432
+ );
45401
45433
  if (!faststartResult.success) {
45402
45434
  throw new Error(`[assemble] faststart failed: ${faststartResult.error}`);
45403
45435
  }
@@ -45466,6 +45498,7 @@ var init_assemble = __esm({
45466
45498
  "../producer/src/services/distributed/assemble.ts"() {
45467
45499
  "use strict";
45468
45500
  init_src2();
45501
+ init_src();
45469
45502
  init_logger();
45470
45503
  init_audioPadTrim();
45471
45504
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperframes",
3
- "version": "0.6.38",
3
+ "version": "0.6.39",
4
4
  "description": "HyperFrames CLI — create, preview, and render HTML video compositions",
5
5
  "repository": {
6
6
  "type": "git",