@hyperframes/producer 0.8.188 → 0.8.189
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/distributed.js +12 -6
- package/dist/index.js +12 -6
- package/dist/services/distributed/assemble.d.ts +1 -0
- package/package.json +7 -7
package/dist/distributed.js
CHANGED
|
@@ -9899,7 +9899,8 @@ import {
|
|
|
9899
9899
|
MIXED_AUDIO_FILENAME as MIXED_AUDIO_FILENAME4,
|
|
9900
9900
|
muxVideoWithAudio as muxVideoWithAudio2,
|
|
9901
9901
|
resolveConfig as resolveConfig4,
|
|
9902
|
-
runFfmpeg as runFfmpeg7
|
|
9902
|
+
runFfmpeg as runFfmpeg7,
|
|
9903
|
+
appendSoftwareEncoderThreadsArg
|
|
9903
9904
|
} from "@hyperframes/engine";
|
|
9904
9905
|
import { fpsToFfmpegArg as fpsToFfmpegArg3 } from "@hyperframes/core";
|
|
9905
9906
|
function cfrRateControlArgs(locked) {
|
|
@@ -10013,10 +10014,9 @@ function readAssemblePlan(planDir, chunkPaths) {
|
|
|
10013
10014
|
function videoInputArgs(ctx, videoSources) {
|
|
10014
10015
|
return videoSources.length === 1 ? ["-i", videoSources[0]] : concatDemuxerInput(videoSources, ctx.workDir, ctx.fpsArg);
|
|
10015
10016
|
}
|
|
10016
|
-
|
|
10017
|
-
const
|
|
10018
|
-
|
|
10019
|
-
...videoInputArgs(ctx, chunkPaths),
|
|
10017
|
+
function cfrEncodeArgs(inputArgs, encoder, fpsArg) {
|
|
10018
|
+
const args = [
|
|
10019
|
+
...inputArgs,
|
|
10020
10020
|
"-c:v",
|
|
10021
10021
|
"libx264",
|
|
10022
10022
|
...cfrRateControlArgs(encoder),
|
|
@@ -10025,8 +10025,14 @@ async function reencodeCfr(ctx, chunkPaths, encoder) {
|
|
|
10025
10025
|
"-fps_mode",
|
|
10026
10026
|
"cfr",
|
|
10027
10027
|
"-r",
|
|
10028
|
-
|
|
10028
|
+
fpsArg
|
|
10029
10029
|
];
|
|
10030
|
+
appendSoftwareEncoderThreadsArg(args);
|
|
10031
|
+
return args;
|
|
10032
|
+
}
|
|
10033
|
+
async function reencodeCfr(ctx, chunkPaths, encoder) {
|
|
10034
|
+
const cfrOutputPath = join25(ctx.workDir, `cfr.${ctx.format}`);
|
|
10035
|
+
const cfrArgs = cfrEncodeArgs(videoInputArgs(ctx, chunkPaths), encoder, ctx.fpsArg);
|
|
10030
10036
|
appendRenderProvenanceArgs2(cfrArgs, cfrOutputPath);
|
|
10031
10037
|
cfrArgs.push("-y", cfrOutputPath);
|
|
10032
10038
|
await ctx.timed(
|
package/dist/index.js
CHANGED
|
@@ -18591,7 +18591,8 @@ import {
|
|
|
18591
18591
|
MIXED_AUDIO_FILENAME as MIXED_AUDIO_FILENAME4,
|
|
18592
18592
|
muxVideoWithAudio as muxVideoWithAudio2,
|
|
18593
18593
|
resolveConfig as resolveConfig6,
|
|
18594
|
-
runFfmpeg as runFfmpeg7
|
|
18594
|
+
runFfmpeg as runFfmpeg7,
|
|
18595
|
+
appendSoftwareEncoderThreadsArg
|
|
18595
18596
|
} from "@hyperframes/engine";
|
|
18596
18597
|
import { fpsToFfmpegArg as fpsToFfmpegArg3 } from "@hyperframes/core";
|
|
18597
18598
|
function cfrRateControlArgs(locked) {
|
|
@@ -18705,10 +18706,9 @@ function readAssemblePlan(planDir, chunkPaths) {
|
|
|
18705
18706
|
function videoInputArgs(ctx, videoSources) {
|
|
18706
18707
|
return videoSources.length === 1 ? ["-i", videoSources[0]] : concatDemuxerInput(videoSources, ctx.workDir, ctx.fpsArg);
|
|
18707
18708
|
}
|
|
18708
|
-
|
|
18709
|
-
const
|
|
18710
|
-
|
|
18711
|
-
...videoInputArgs(ctx, chunkPaths),
|
|
18709
|
+
function cfrEncodeArgs(inputArgs, encoder, fpsArg) {
|
|
18710
|
+
const args = [
|
|
18711
|
+
...inputArgs,
|
|
18712
18712
|
"-c:v",
|
|
18713
18713
|
"libx264",
|
|
18714
18714
|
...cfrRateControlArgs(encoder),
|
|
@@ -18717,8 +18717,14 @@ async function reencodeCfr(ctx, chunkPaths, encoder) {
|
|
|
18717
18717
|
"-fps_mode",
|
|
18718
18718
|
"cfr",
|
|
18719
18719
|
"-r",
|
|
18720
|
-
|
|
18720
|
+
fpsArg
|
|
18721
18721
|
];
|
|
18722
|
+
appendSoftwareEncoderThreadsArg(args);
|
|
18723
|
+
return args;
|
|
18724
|
+
}
|
|
18725
|
+
async function reencodeCfr(ctx, chunkPaths, encoder) {
|
|
18726
|
+
const cfrOutputPath = join40(ctx.workDir, `cfr.${ctx.format}`);
|
|
18727
|
+
const cfrArgs = cfrEncodeArgs(videoInputArgs(ctx, chunkPaths), encoder, ctx.fpsArg);
|
|
18722
18728
|
appendRenderProvenanceArgs2(cfrArgs, cfrOutputPath);
|
|
18723
18729
|
cfrArgs.push("-y", cfrOutputPath);
|
|
18724
18730
|
await ctx.timed(
|
|
@@ -68,6 +68,7 @@ export declare function assemble(planDir: string, chunkOutputs: AssembleChunkPat
|
|
|
68
68
|
*/
|
|
69
69
|
cfr?: boolean;
|
|
70
70
|
}): Promise<AssembleResult>;
|
|
71
|
+
export declare function cfrEncodeArgs(inputArgs: string[], encoder: CfrRateControlSource, fpsArg: string): string[];
|
|
71
72
|
/** Mp4 chunks carrying audio, or with it as a separate file, stitch under one index like S3's. */
|
|
72
73
|
export declare function chunksAreStitchedMp4(planDir: string, cfr: boolean): boolean;
|
|
73
74
|
export declare function stitchesSeparateAudio(planDir: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/producer",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.189",
|
|
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/engine": "0.8.
|
|
39
|
-
"@hyperframes/parsers": "0.8.
|
|
40
|
-
"@hyperframes/lint": "0.8.
|
|
41
|
-
"@hyperframes/
|
|
42
|
-
"@hyperframes/
|
|
38
|
+
"@hyperframes/engine": "0.8.189",
|
|
39
|
+
"@hyperframes/parsers": "0.8.189",
|
|
40
|
+
"@hyperframes/lint": "0.8.189",
|
|
41
|
+
"@hyperframes/studio-server": "0.8.189",
|
|
42
|
+
"@hyperframes/core": "0.8.189"
|
|
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.
|
|
51
|
+
"@hyperframes/aws-lambda": "0.8.189"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22"
|