mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 17:23:21 +03:00
chore: refactor transcode config routing (#9800)
* chore: refactor transcode config * rename parameter * handle no /dev/dri * prefer undefined
This commit is contained in:
@@ -53,7 +53,7 @@ export interface VideoInfo {
|
||||
audioStreams: AudioStreamInfo[];
|
||||
}
|
||||
|
||||
export interface TranscodeOptions {
|
||||
export interface TranscodeCommand {
|
||||
inputOptions: string[];
|
||||
outputOptions: string[];
|
||||
twoPass: boolean;
|
||||
@@ -67,7 +67,7 @@ export interface BitrateDistribution {
|
||||
}
|
||||
|
||||
export interface VideoCodecSWConfig {
|
||||
getOptions(target: TranscodeTarget, videoStream: VideoStreamInfo, audioStream: AudioStreamInfo): TranscodeOptions;
|
||||
getCommand(target: TranscodeTarget, videoStream: VideoStreamInfo, audioStream: AudioStreamInfo): TranscodeCommand;
|
||||
}
|
||||
|
||||
export interface VideoCodecHWConfig extends VideoCodecSWConfig {
|
||||
@@ -83,5 +83,5 @@ export interface IMediaRepository {
|
||||
|
||||
// video
|
||||
probe(input: string): Promise<VideoInfo>;
|
||||
transcode(input: string, output: string | Writable, options: TranscodeOptions): Promise<void>;
|
||||
transcode(input: string, output: string | Writable, command: TranscodeCommand): Promise<void>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user