@hyperframes/producer 0.8.191 → 0.8.192

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/dist/index.js CHANGED
@@ -8049,6 +8049,10 @@ async function runProbeStage(input) {
8049
8049
  if (el.loop && !existing.loop) {
8050
8050
  existing.loop = true;
8051
8051
  }
8052
+ const audio = composition.audios.find(
8053
+ (audio2) => audio2.type === "video" && audio2.id === `${el.id}-audio`
8054
+ );
8055
+ if (audio) audio.loop = existing.loop;
8052
8056
  }
8053
8057
  } else if (!compiled.droppedMediaIds.has(el.id)) {
8054
8058
  composition.videos.push({
@@ -8086,6 +8090,7 @@ async function runProbeStage(input) {
8086
8090
  el,
8087
8091
  authoredStarts.get(el.id) ?? existing.mediaStart
8088
8092
  );
8093
+ existing.loop = el.loop;
8089
8094
  if (el.volume > 0 && Math.abs((existing.volume ?? 1) - el.volume) > BROWSER_MEDIA_EPSILON) {
8090
8095
  existing.volume = el.volume;
8091
8096
  }
@@ -8097,6 +8102,7 @@ async function runProbeStage(input) {
8097
8102
  start: el.start,
8098
8103
  end: resolveBrowserMediaEnd(el.start, el.end, el.duration),
8099
8104
  mediaStart: el.mediaStart,
8105
+ loop: el.loop,
8100
8106
  layer: 0,
8101
8107
  volume: el.volume,
8102
8108
  type: "audio"
@@ -8351,6 +8357,10 @@ import {
8351
8357
  extractMediaMetadata as extractMediaMetadata3,
8352
8358
  isVideoPastTimelineEnd,
8353
8359
  isHdrColorSpace as isHdrColorSpace2,
8360
+ rebaseVideoToWindow,
8361
+ resolveFinalFrameExtractionWindow as resolveFinalFrameExtractionWindow2,
8362
+ resolveVideoExtractionWindow as resolveVideoExtractionWindow2,
8363
+ isHttpUrl as isHttpUrl2,
8354
8364
  resolveProjectRelativeSrc as resolveProjectRelativeSrc3,
8355
8365
  runVideoExtractionWithRetry,
8356
8366
  safeVideoExtractionSourceIdentity
@@ -8716,6 +8726,8 @@ function appendAutoDetectedVideoAudio(composition, extracted) {
8716
8726
  start: video.start,
8717
8727
  end: video.end,
8718
8728
  mediaStart: video.mediaStart,
8729
+ playbackRate: video.playbackRate,
8730
+ loop: video.loop,
8719
8731
  layer: 0,
8720
8732
  volume: 1,
8721
8733
  type: "video"
@@ -10422,6 +10434,7 @@ async function runCaptureHdrStage(input) {
10422
10434
  width,
10423
10435
  height,
10424
10436
  codec: preset.codec,
10437
+ useGpu: job.config.useGpu,
10425
10438
  preset: preset.preset,
10426
10439
  quality: effectiveQuality,
10427
10440
  bitrate: effectiveBitrate,
@@ -13867,7 +13880,8 @@ import {
13867
13880
  import {
13868
13881
  getEncoderPreset as getEncoderPreset4,
13869
13882
  normalizeVp9CpuUsed,
13870
- resolveConfig as resolveConfig3
13883
+ resolveConfig as resolveConfig3,
13884
+ declareContentAddressedUrl
13871
13885
  } from "@hyperframes/engine";
13872
13886
 
13873
13887
  // src/services/distributed/planFrameCost.ts
@@ -15915,6 +15929,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
15915
15929
  const needsAlpha = outputNeedsAlpha(config.format);
15916
15930
  const remoteFiles = Object.entries(options.remoteFiles ?? {});
15917
15931
  const remoteLocalPath = (rel) => join33(projectDir, ...rel.split("/"));
15932
+ for (const [, file] of remoteFiles) declareContentAddressedUrl(file.url, file.sha256);
15918
15933
  const urlByAbsentLocalPath = new Map(
15919
15934
  remoteFiles.map(([rel, file]) => [remoteLocalPath(rel), file.url])
15920
15935
  );
@@ -18752,7 +18767,7 @@ function cfrEncodeArgs(inputArgs, encoder, fpsArg) {
18752
18767
  "-r",
18753
18768
  fpsArg
18754
18769
  ];
18755
- appendSoftwareEncoderThreadsArg(args);
18770
+ appendSoftwareEncoderThreadsArg(args, "libx264");
18756
18771
  return args;
18757
18772
  }
18758
18773
  async function reencodeCfr(ctx, chunkPaths, encoder) {
@@ -8068,6 +8068,10 @@ async function runProbeStage(input) {
8068
8068
  if (el.loop && !existing.loop) {
8069
8069
  existing.loop = true;
8070
8070
  }
8071
+ const audio = composition.audios.find(
8072
+ (audio2) => audio2.type === "video" && audio2.id === `${el.id}-audio`
8073
+ );
8074
+ if (audio) audio.loop = existing.loop;
8071
8075
  }
8072
8076
  } else if (!compiled.droppedMediaIds.has(el.id)) {
8073
8077
  composition.videos.push({
@@ -8105,6 +8109,7 @@ async function runProbeStage(input) {
8105
8109
  el,
8106
8110
  authoredStarts.get(el.id) ?? existing.mediaStart
8107
8111
  );
8112
+ existing.loop = el.loop;
8108
8113
  if (el.volume > 0 && Math.abs((existing.volume ?? 1) - el.volume) > BROWSER_MEDIA_EPSILON) {
8109
8114
  existing.volume = el.volume;
8110
8115
  }
@@ -8116,6 +8121,7 @@ async function runProbeStage(input) {
8116
8121
  start: el.start,
8117
8122
  end: resolveBrowserMediaEnd(el.start, el.end, el.duration),
8118
8123
  mediaStart: el.mediaStart,
8124
+ loop: el.loop,
8119
8125
  layer: 0,
8120
8126
  volume: el.volume,
8121
8127
  type: "audio"
@@ -8339,6 +8345,10 @@ import {
8339
8345
  extractMediaMetadata as extractMediaMetadata3,
8340
8346
  isVideoPastTimelineEnd,
8341
8347
  isHdrColorSpace as isHdrColorSpace2,
8348
+ rebaseVideoToWindow,
8349
+ resolveFinalFrameExtractionWindow as resolveFinalFrameExtractionWindow2,
8350
+ resolveVideoExtractionWindow as resolveVideoExtractionWindow2,
8351
+ isHttpUrl as isHttpUrl2,
8342
8352
  resolveProjectRelativeSrc as resolveProjectRelativeSrc3,
8343
8353
  runVideoExtractionWithRetry,
8344
8354
  safeVideoExtractionSourceIdentity
@@ -8699,6 +8709,8 @@ function appendAutoDetectedVideoAudio(composition, extracted) {
8699
8709
  start: video.start,
8700
8710
  end: video.end,
8701
8711
  mediaStart: video.mediaStart,
8712
+ playbackRate: video.playbackRate,
8713
+ loop: video.loop,
8702
8714
  layer: 0,
8703
8715
  volume: 1,
8704
8716
  type: "video"
@@ -10405,6 +10417,7 @@ async function runCaptureHdrStage(input) {
10405
10417
  width,
10406
10418
  height,
10407
10419
  codec: preset.codec,
10420
+ useGpu: job.config.useGpu,
10408
10421
  preset: preset.preset,
10409
10422
  quality: effectiveQuality,
10410
10423
  bitrate: effectiveBitrate,
@@ -14055,7 +14068,8 @@ import {
14055
14068
  import {
14056
14069
  getEncoderPreset as getEncoderPreset4,
14057
14070
  normalizeVp9CpuUsed,
14058
- resolveConfig as resolveConfig3
14071
+ resolveConfig as resolveConfig3,
14072
+ declareContentAddressedUrl
14059
14073
  } from "@hyperframes/engine";
14060
14074
 
14061
14075
  // src/services/distributed/planFrameCost.ts
@@ -27,7 +27,7 @@
27
27
  * machines (symlinks don't survive S3 / GCS round-trips). Default
28
28
  * `false` preserves the in-process renderer's symlink behavior.
29
29
  */
30
- import { type CaptureVideoMetadataHint, type EngineConfig, type ExtractedFrames, type ExtractionResult, type FrameLookupTable, type HdrTransfer, type VideoExtractionFailureKind, type VideoColorSpace, classifyVideoExtractionError, extractAllVideoFrames } from "@hyperframes/engine";
30
+ import { type CaptureVideoMetadataHint, type EngineConfig, type ExtractionResult, type FrameLookupTable, type HdrTransfer, type VideoExtractionFailureKind, type VideoColorSpace, classifyVideoExtractionError, extractAllVideoFrames } from "@hyperframes/engine";
31
31
  import { type RenderJob } from "../../renderOrchestrator.js";
32
32
  import { type CompositionMetadata } from "../shared.js";
33
33
  import type { ProducerLogger } from "../../../logger.js";
@@ -127,4 +127,19 @@ export declare function runExtractVideosStage(input: ExtractVideosStageInput): P
127
127
  * to composition.audios. Both the file AND the element must declare audio —
128
128
  * a muted <video> whose source contains audio should not leak into the render.
129
129
  */
130
- export declare function appendAutoDetectedVideoAudio(composition: Pick<CompositionMetadata, "videos" | "audios">, extracted: ExtractedFrames[]): void;
130
+ export declare function appendAutoDetectedVideoAudio(composition: Pick<CompositionMetadata, "videos" | "audios">, extracted: ReadonlyArray<{
131
+ videoId: string;
132
+ metadata: {
133
+ hasAudio: boolean;
134
+ };
135
+ }>): void;
136
+ /**
137
+ * The audio-only form of the extract stage: which videos carry sound takes a probe per source, not their frames.
138
+ * Each video is moved to its extraction window first, as extraction does, so its sound lands where its picture does.
139
+ */
140
+ export declare function appendVideoAudioFromProbe(input: {
141
+ projectDir: string;
142
+ compiledDir: string;
143
+ composition: CompositionMetadata;
144
+ urlByAbsentLocalPath?: ReadonlyMap<string, string>;
145
+ }): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/producer",
3
- "version": "0.8.191",
3
+ "version": "0.8.192",
4
4
  "description": "HTML-to-video rendering engine using Chrome's BeginFrame API",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,11 +35,11 @@
35
35
  "postcss": "^8.4.0",
36
36
  "puppeteer": "^25.2.1",
37
37
  "puppeteer-core": "^25.2.1",
38
- "@hyperframes/lint": "0.8.191",
39
- "@hyperframes/core": "0.8.191",
40
- "@hyperframes/parsers": "0.8.191",
41
- "@hyperframes/studio-server": "0.8.191",
42
- "@hyperframes/engine": "0.8.191"
38
+ "@hyperframes/lint": "0.8.192",
39
+ "@hyperframes/core": "0.8.192",
40
+ "@hyperframes/parsers": "0.8.192",
41
+ "@hyperframes/studio-server": "0.8.192",
42
+ "@hyperframes/engine": "0.8.192"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "^25.0.10",
@@ -48,7 +48,7 @@
48
48
  "tsx": "^4.21.0",
49
49
  "typescript": "^5.7.2",
50
50
  "vitest": "^4.1.11",
51
- "@hyperframes/aws-lambda": "0.8.191"
51
+ "@hyperframes/aws-lambda": "0.8.192"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=22"