mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-03-01 11:39:19 +00:00
feat(server): advanced settings for transcoding (#3775)
* set stream with `-map` flag * updated tests * fixed audio stream mapping * added bframe setting to config * updated api * added b-frame option in dashboard * updated tests and formatting * "Advanced" section for FFmpeg with extra options * updated api * updated tests and formatting * styling * made vp9 bitstream filters conditional on b-frames * fixed gop size condition * add cq override * simplified isEdited conditions * simplified conditional flow for cq mode * fixed dto * clarified cq mode in description * formatting * added npl setting * Adjusted b-frame title and description * fixed rebase * changed defaults for pascal compatibility, added temporal aq setting * updated api * added temporal aq to ui * polished dashboard * formatting
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { AudioCodec, ToneMapping, TranscodeHWAccel, TranscodePolicy, VideoCodec } from '@app/infra/entities';
|
||||
import { AudioCodec, CQMode, ToneMapping, TranscodeHWAccel, TranscodePolicy, VideoCodec } from '@app/infra/entities';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsBoolean, IsEnum, IsInt, IsString, Max, Min } from 'class-validator';
|
||||
@@ -34,6 +34,39 @@ export class SystemConfigFFmpegDto {
|
||||
@IsString()
|
||||
maxBitrate!: string;
|
||||
|
||||
@IsInt()
|
||||
@Min(-1)
|
||||
@Max(16)
|
||||
@Type(() => Number)
|
||||
@ApiProperty({ type: 'integer' })
|
||||
bframes!: number;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@Max(6)
|
||||
@Type(() => Number)
|
||||
@ApiProperty({ type: 'integer' })
|
||||
refs!: number;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@Type(() => Number)
|
||||
@ApiProperty({ type: 'integer' })
|
||||
gopSize!: number;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@Type(() => Number)
|
||||
@ApiProperty({ type: 'integer' })
|
||||
npl!: number;
|
||||
|
||||
@IsBoolean()
|
||||
temporalAQ!: boolean;
|
||||
|
||||
@IsEnum(CQMode)
|
||||
@ApiProperty({ enumName: 'CQMode', enum: CQMode })
|
||||
cqMode!: CQMode;
|
||||
|
||||
@IsBoolean()
|
||||
twoPass!: boolean;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
AudioCodec,
|
||||
CQMode,
|
||||
SystemConfig,
|
||||
SystemConfigEntity,
|
||||
SystemConfigKey,
|
||||
@@ -30,6 +31,12 @@ export const defaults = Object.freeze<SystemConfig>({
|
||||
targetAudioCodec: AudioCodec.AAC,
|
||||
targetResolution: '720',
|
||||
maxBitrate: '0',
|
||||
bframes: -1,
|
||||
refs: 0,
|
||||
gopSize: 0,
|
||||
npl: 0,
|
||||
temporalAQ: false,
|
||||
cqMode: CQMode.AUTO,
|
||||
twoPass: false,
|
||||
transcode: TranscodePolicy.REQUIRED,
|
||||
tonemap: ToneMapping.HABLE,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
AudioCodec,
|
||||
CQMode,
|
||||
SystemConfig,
|
||||
SystemConfigEntity,
|
||||
SystemConfigKey,
|
||||
@@ -41,6 +42,12 @@ const updatedConfig = Object.freeze<SystemConfig>({
|
||||
targetResolution: '720',
|
||||
targetVideoCodec: VideoCodec.H264,
|
||||
maxBitrate: '0',
|
||||
bframes: -1,
|
||||
refs: 0,
|
||||
gopSize: 0,
|
||||
npl: 0,
|
||||
temporalAQ: false,
|
||||
cqMode: CQMode.AUTO,
|
||||
twoPass: false,
|
||||
transcode: TranscodePolicy.REQUIRED,
|
||||
accel: TranscodeHWAccel.DISABLED,
|
||||
|
||||
Reference in New Issue
Block a user