mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
fix(server): use libopus for transcoding (#4102)
* updated audio codec enum * added migration * updated api * fixed enum * formatting * simplified migration
This commit is contained in:
@@ -99,7 +99,7 @@ export enum VideoCodec {
|
||||
export enum AudioCodec {
|
||||
MP3 = 'mp3',
|
||||
AAC = 'aac',
|
||||
OPUS = 'opus',
|
||||
LIBOPUS = 'libopus',
|
||||
}
|
||||
|
||||
export enum TranscodeHWAccel {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateOpusCodecToLibopus1694758412194 implements MigrationInterface {
|
||||
name = 'UpdateOpusCodecToLibopus1694758412194'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
UPDATE system_config
|
||||
SET value = '"libopus"'
|
||||
WHERE key = 'ffmpeg.targetAudioCodec' AND value = '"opus"'
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
UPDATE system_config
|
||||
SET value = '"opus"'
|
||||
WHERE key = 'ffmpeg.targetAudioCodec' AND value = '"libopus"'
|
||||
`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user