From e57bd94f04d9ba68db13e41e9f9d72e39def9be8 Mon Sep 17 00:00:00 2001 From: Kevin Cox Date: Tue, 15 Oct 2024 14:53:18 -0400 Subject: [PATCH] chore(server): explicitly use svt-av1 encoder (#13389) --- server/src/services/media.service.spec.ts | 2 +- server/src/utils/media.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/services/media.service.spec.ts b/server/src/services/media.service.spec.ts index 08e49f088a0bd..0ef065c5f452c 100644 --- a/server/src/services/media.service.spec.ts +++ b/server/src/services/media.service.spec.ts @@ -1322,7 +1322,7 @@ describe(MediaService.name, () => { expect.objectContaining({ inputOptions: expect.any(Array), outputOptions: expect.arrayContaining([ - '-c:v av1', + '-c:v libsvtav1', '-movflags faststart', '-fps_mode passthrough', '-map 0:0', diff --git a/server/src/utils/media.ts b/server/src/utils/media.ts index 6f0ab4ef81d90..9ad0f9440494d 100644 --- a/server/src/utils/media.ts +++ b/server/src/utils/media.ts @@ -492,6 +492,10 @@ export class VP9Config extends BaseConfig { } export class AV1Config extends BaseConfig { + getVideoCodec(): string { + return 'libsvtav1'; + } + getPresetOptions() { const speed = this.getPresetIndex() + 4; // Use 4 as slowest, giving us an effective range of 4-12 which is far more useful than 0-8 if (speed >= 0) {