diff --git a/cli/src/api/open-api/api.ts b/cli/src/api/open-api/api.ts index 0d8d4ca543..f4c0315426 100644 --- a/cli/src/api/open-api/api.ts +++ b/cli/src/api/open-api/api.ts @@ -752,7 +752,7 @@ export type AssetTypeEnum = typeof AssetTypeEnum[keyof typeof AssetTypeEnum]; export const AudioCodec = { Mp3: 'mp3', Aac: 'aac', - Opus: 'opus' + Libopus: 'libopus' } as const; export type AudioCodec = typeof AudioCodec[keyof typeof AudioCodec]; diff --git a/mobile/openapi/lib/model/audio_codec.dart b/mobile/openapi/lib/model/audio_codec.dart index f5b50006a6..25c8332b0c 100644 Binary files a/mobile/openapi/lib/model/audio_codec.dart and b/mobile/openapi/lib/model/audio_codec.dart differ diff --git a/server/immich-openapi-specs.json b/server/immich-openapi-specs.json index b7dadbceca..ba935c82f6 100644 --- a/server/immich-openapi-specs.json +++ b/server/immich-openapi-specs.json @@ -5318,7 +5318,7 @@ "enum": [ "mp3", "aac", - "opus" + "libopus" ], "type": "string" }, diff --git a/server/src/infra/entities/system-config.entity.ts b/server/src/infra/entities/system-config.entity.ts index ebcdcac07d..bd94e4d0c6 100644 --- a/server/src/infra/entities/system-config.entity.ts +++ b/server/src/infra/entities/system-config.entity.ts @@ -99,7 +99,7 @@ export enum VideoCodec { export enum AudioCodec { MP3 = 'mp3', AAC = 'aac', - OPUS = 'opus', + LIBOPUS = 'libopus', } export enum TranscodeHWAccel { diff --git a/server/src/infra/migrations/1694758412194-UpdateOpusCodecToLibopus.ts b/server/src/infra/migrations/1694758412194-UpdateOpusCodecToLibopus.ts new file mode 100644 index 0000000000..715b46550a --- /dev/null +++ b/server/src/infra/migrations/1694758412194-UpdateOpusCodecToLibopus.ts @@ -0,0 +1,21 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateOpusCodecToLibopus1694758412194 implements MigrationInterface { + name = 'UpdateOpusCodecToLibopus1694758412194' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(` + UPDATE system_config + SET value = '"libopus"' + WHERE key = 'ffmpeg.targetAudioCodec' AND value = '"opus"' + `); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(` + UPDATE system_config + SET value = '"opus"' + WHERE key = 'ffmpeg.targetAudioCodec' AND value = '"libopus"' + `); + } +} diff --git a/web/src/api/open-api/api.ts b/web/src/api/open-api/api.ts index 0d8d4ca543..f4c0315426 100644 --- a/web/src/api/open-api/api.ts +++ b/web/src/api/open-api/api.ts @@ -752,7 +752,7 @@ export type AssetTypeEnum = typeof AssetTypeEnum[keyof typeof AssetTypeEnum]; export const AudioCodec = { Mp3: 'mp3', Aac: 'aac', - Opus: 'opus' + Libopus: 'libopus' } as const; export type AudioCodec = typeof AudioCodec[keyof typeof AudioCodec]; diff --git a/web/src/lib/components/admin-page/settings/ffmpeg/ffmpeg-settings.svelte b/web/src/lib/components/admin-page/settings/ffmpeg/ffmpeg-settings.svelte index a75b1ab0bf..fa46181db5 100644 --- a/web/src/lib/components/admin-page/settings/ffmpeg/ffmpeg-settings.svelte +++ b/web/src/lib/components/admin-page/settings/ffmpeg/ffmpeg-settings.svelte @@ -145,7 +145,7 @@ options={[ { value: AudioCodec.Aac, text: 'aac' }, { value: AudioCodec.Mp3, text: 'mp3' }, - { value: AudioCodec.Opus, text: 'opus' }, + { value: AudioCodec.Libopus, text: 'opus' }, ]} name="acodec" isEdited={ffmpegConfig.targetAudioCodec !== savedConfig.targetAudioCodec}