mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore: refactor transcode config routing (#9800)
* chore: refactor transcode config * rename parameter * handle no /dev/dri * prefer undefined
This commit is contained in:
parent
21bd20fd75
commit
dca420ef70
4 changed files with 115 additions and 123 deletions
|
|
@ -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>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue