Skip to content

Commit be05c86

Browse files
perf(engine): encode high quality with the x264 fast preset (#6640)
* perf(engine): encode high quality with the x264 fast preset * test(engine): name the NVENC p5 case by its preset, not the high tier
1 parent 17f5d67 commit be05c86

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎packages/engine/src/services/chunkEncoder.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ describe("ENCODER_PRESETS", () => {
130130
expect(ENCODER_PRESETS.draft.codec).toBe("h264");
131131
});
132132

133-
it("high uses slow preset with low CRF for better quality", () => {
134-
expect(ENCODER_PRESETS.high.preset).toBe("slow");
133+
it("high uses the fast preset with low CRF for better quality", () => {
134+
expect(ENCODER_PRESETS.high.preset).toBe("fast");
135135
expect(ENCODER_PRESETS.high.quality).toBeLessThan(ENCODER_PRESETS.standard.quality);
136136
expect(ENCODER_PRESETS.high.codec).toBe("h264");
137137
});
@@ -1071,7 +1071,7 @@ describe("buildEncoderArgs GPU preset mapping", () => {
10711071
expect(presetArg(args)).toBe("p4");
10721072
});
10731073

1074-
it("translates the high slow preset to NVENC p5", () => {
1074+
it("translates the slow preset to NVENC p5", () => {
10751075
const args = buildEncoderArgs(
10761076
{ ...baseOptions, codec: "h264", preset: "slow", quality: 15, useGpu: true },
10771077
inputArgs,

‎packages/engine/src/services/chunkEncoder.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export type { EncoderOptions, EncodeResult, MuxResult } from "./chunkEncoder.typ
5555
export const ENCODER_PRESETS = {
5656
draft: { preset: "ultrafast", quality: 28, codec: "h264" as const },
5757
standard: { preset: "medium", quality: 18, codec: "h264" as const },
58-
high: { preset: "slow", quality: 15, codec: "h264" as const },
58+
high: { preset: "fast", quality: 15, codec: "h264" as const },
5959
};
6060

6161
export interface EncoderPreset {

‎packages/producer/src/services/distributed/assemble.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ describe("assemble()", () => {
684684

685685
it("cfr re-encode keeps the chunks' rate control", () => {
686686
expect(cfrRateControlArgs({})).toEqual(["-preset", "medium", "-crf", "18"]);
687-
expect(cfrRateControlArgs({ quality: "high" })).toEqual(["-preset", "slow", "-crf", "15"]);
687+
expect(cfrRateControlArgs({ quality: "high" })).toEqual(["-preset", "fast", "-crf", "15"]);
688688
expect(cfrRateControlArgs({ quality: "standard", crf: 12 })).toEqual([
689689
"-preset",
690690
"medium",

0 commit comments

Comments
 (0)