mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-01-14 13:16:07 +00:00
feat(all): ffmpeg quality options improvements (#2161)
* feat: change target scaling to resolution in ffmpeg config * feat(microservices): scale vertical video correctly, only scale if video is larger than target
This commit is contained in:
@@ -15,7 +15,7 @@ export class SystemConfigFFmpegDto {
|
||||
targetAudioCodec!: string;
|
||||
|
||||
@IsString()
|
||||
targetScaling!: string;
|
||||
targetResolution!: string;
|
||||
|
||||
@IsEnum(TranscodePreset)
|
||||
transcode!: TranscodePreset;
|
||||
|
||||
@@ -13,7 +13,7 @@ const defaults: SystemConfig = Object.freeze({
|
||||
preset: 'ultrafast',
|
||||
targetVideoCodec: 'h264',
|
||||
targetAudioCodec: 'aac',
|
||||
targetScaling: '1280:-2',
|
||||
targetResolution: '720',
|
||||
transcode: TranscodePreset.REQUIRED,
|
||||
},
|
||||
oauth: {
|
||||
|
||||
@@ -16,7 +16,7 @@ const updatedConfig = Object.freeze({
|
||||
crf: 'a new value',
|
||||
preset: 'ultrafast',
|
||||
targetAudioCodec: 'aac',
|
||||
targetScaling: '1280:-2',
|
||||
targetResolution: '720',
|
||||
targetVideoCodec: 'h264',
|
||||
transcode: TranscodePreset.REQUIRED,
|
||||
},
|
||||
|
||||
@@ -401,7 +401,7 @@ export const systemConfigStub = {
|
||||
crf: '23',
|
||||
preset: 'ultrafast',
|
||||
targetAudioCodec: 'aac',
|
||||
targetScaling: '1280:-2',
|
||||
targetResolution: '720',
|
||||
targetVideoCodec: 'h264',
|
||||
transcode: TranscodePreset.REQUIRED,
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@ export enum SystemConfigKey {
|
||||
FFMPEG_PRESET = 'ffmpeg.preset',
|
||||
FFMPEG_TARGET_VIDEO_CODEC = 'ffmpeg.targetVideoCodec',
|
||||
FFMPEG_TARGET_AUDIO_CODEC = 'ffmpeg.targetAudioCodec',
|
||||
FFMPEG_TARGET_SCALING = 'ffmpeg.targetScaling',
|
||||
FFMPEG_TARGET_RESOLUTION = 'ffmpeg.targetResolution',
|
||||
FFMPEG_TRANSCODE = 'ffmpeg.transcode',
|
||||
OAUTH_ENABLED = 'oauth.enabled',
|
||||
OAUTH_ISSUER_URL = 'oauth.issuerUrl',
|
||||
@@ -45,7 +45,7 @@ export interface SystemConfig {
|
||||
preset: string;
|
||||
targetVideoCodec: string;
|
||||
targetAudioCodec: string;
|
||||
targetScaling: string;
|
||||
targetResolution: string;
|
||||
transcode: TranscodePreset;
|
||||
};
|
||||
oauth: {
|
||||
|
||||
Reference in New Issue
Block a user