feat(server): better transcoding logs (#13000)

* better transcoding logs

* pr feedback
This commit is contained in:
Mert
2024-09-27 18:10:39 -04:00
committed by GitHub
parent 7579bc4359
commit 4248594ac5
7 changed files with 308 additions and 210 deletions

View File

@@ -6,6 +6,7 @@ export interface ILoggerRepository {
setAppName(name: string): void;
setContext(message: string): void;
setLogLevel(level: LogLevel): void;
isLevelEnabled(level: LogLevel): boolean;
verbose(message: any, ...args: any): void;
debug(message: any, ...args: any): void;

View File

@@ -62,6 +62,10 @@ export interface TranscodeCommand {
inputOptions: string[];
outputOptions: string[];
twoPass: boolean;
progress: {
frameCount: number;
percentInterval: number;
};
}
export interface BitrateDistribution {
@@ -79,6 +83,10 @@ export interface VideoCodecHWConfig extends VideoCodecSWConfig {
getSupportedCodecs(): Array<VideoCodec>;
}
export interface ProbeOptions {
countFrames: boolean;
}
export interface IMediaRepository {
// image
extract(input: string, output: string): Promise<boolean>;
@@ -87,6 +95,6 @@ export interface IMediaRepository {
getImageDimensions(input: string): Promise<ImageDimensions>;
// video
probe(input: string): Promise<VideoInfo>;
probe(input: string, options?: ProbeOptions): Promise<VideoInfo>;
transcode(input: string, output: string | Writable, command: TranscodeCommand): Promise<void>;
}