Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(server): transcode bitrate and thread settings #2488

Merged
merged 19 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion mobile/openapi/doc/SystemConfigFFmpegDto.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 27 additions & 3 deletions mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion mobile/openapi/test/system_config_f_fmpeg_dto_test.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion server/immich-openapi-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5344,7 +5344,10 @@
"type": "object",
"properties": {
"crf": {
"type": "string"
"type": "integer"
},
"threads": {
"type": "integer"
},
"preset": {
"type": "string"
Expand All @@ -5358,6 +5361,12 @@
"targetResolution": {
"type": "string"
},
"maxBitrate": {
"type": "string"
},
"twoPass": {
"type": "boolean"
},
"transcode": {
"type": "string",
"enum": [
Expand All @@ -5370,10 +5379,13 @@
},
"required": [
"crf",
"threads",
"preset",
"targetVideoCodec",
"targetAudioCodec",
"targetResolution",
"maxBitrate",
"twoPass",
"transcode"
]
},
Expand Down
7 changes: 6 additions & 1 deletion server/libs/domain/src/media/media.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ export interface CropOptions {
height: number;
}

export interface TranscodeOptions {
outputOptions: string[];
twoPass: boolean;
}

export interface IMediaRepository {
// image
extractThumbnailFromExif(input: string, output: string): Promise<void>;
Expand All @@ -47,5 +52,5 @@ export interface IMediaRepository {
// video
extractVideoThumbnail(input: string, output: string, size: number): Promise<void>;
probe(input: string): Promise<VideoInfo>;
transcode(input: string, output: string, options: any): Promise<void>;
transcode(input: string, output: string, options: TranscodeOptions): Promise<void>;
}