2023-05-22 14:07:43 -04:00
|
|
|
import { IsEnum, IsString, IsInt, IsBoolean, Min, Max } from 'class-validator';
|
2023-03-30 15:38:55 -04:00
|
|
|
import { TranscodePreset } from '@app/infra/entities';
|
2023-05-22 14:07:43 -04:00
|
|
|
import { Type } from 'class-transformer';
|
|
|
|
|
import { ApiProperty } from '@nestjs/swagger';
|
2022-12-09 15:51:42 -05:00
|
|
|
|
|
|
|
|
export class SystemConfigFFmpegDto {
|
2023-05-22 14:07:43 -04:00
|
|
|
@IsInt()
|
|
|
|
|
@Min(0)
|
|
|
|
|
@Max(51)
|
|
|
|
|
@Type(() => Number)
|
|
|
|
|
@ApiProperty({ type: 'integer' })
|
|
|
|
|
crf!: number;
|
|
|
|
|
|
|
|
|
|
@IsInt()
|
|
|
|
|
@Min(0)
|
|
|
|
|
@Type(() => Number)
|
|
|
|
|
@ApiProperty({ type: 'integer' })
|
|
|
|
|
threads!: number;
|
2022-12-09 15:51:42 -05:00
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
preset!: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
targetVideoCodec!: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
targetAudioCodec!: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
2023-04-04 02:42:53 +01:00
|
|
|
targetResolution!: string;
|
2023-01-22 02:09:02 +00:00
|
|
|
|
2023-05-22 14:07:43 -04:00
|
|
|
@IsString()
|
|
|
|
|
maxBitrate!: string;
|
|
|
|
|
|
|
|
|
|
@IsBoolean()
|
|
|
|
|
twoPass!: boolean;
|
|
|
|
|
|
2023-03-28 22:03:43 +03:00
|
|
|
@IsEnum(TranscodePreset)
|
|
|
|
|
transcode!: TranscodePreset;
|
2022-12-09 15:51:42 -05:00
|
|
|
}
|