mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-04-25 16:23:46 +00:00
refactor(server): modularize getFfmpegOptions (#3138)
* refactored `getFfmpegOptions` refactor transcoding, make separate service * fixed enum casing * use `Logger` instead of `console.log` * review suggestions * use enum for `getHandler` * fixed formatting * Update server/src/domain/media/media.util.ts Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> * Update server/src/domain/media/media.util.ts Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> * More specific imports, renamed codec classes * simplified code * removed unused import * added tests * added base implementation for bitrate and threads --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
@@ -4929,6 +4929,14 @@
|
||||
"OTHER"
|
||||
]
|
||||
},
|
||||
"AudioCodec": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"mp3",
|
||||
"aac",
|
||||
"opus"
|
||||
]
|
||||
},
|
||||
"AuthDeviceResponseDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -6347,13 +6355,16 @@
|
||||
"threads": {
|
||||
"type": "integer"
|
||||
},
|
||||
"preset": {
|
||||
"type": "string"
|
||||
},
|
||||
"targetVideoCodec": {
|
||||
"type": "string"
|
||||
"$ref": "#/components/schemas/VideoCodec"
|
||||
},
|
||||
"targetAudioCodec": {
|
||||
"$ref": "#/components/schemas/AudioCodec"
|
||||
},
|
||||
"transcode": {
|
||||
"$ref": "#/components/schemas/TranscodePolicy"
|
||||
},
|
||||
"preset": {
|
||||
"type": "string"
|
||||
},
|
||||
"targetResolution": {
|
||||
@@ -6364,27 +6375,18 @@
|
||||
},
|
||||
"twoPass": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"transcode": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"all",
|
||||
"optimal",
|
||||
"required",
|
||||
"disabled"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"crf",
|
||||
"threads",
|
||||
"preset",
|
||||
"targetVideoCodec",
|
||||
"targetAudioCodec",
|
||||
"transcode",
|
||||
"preset",
|
||||
"targetResolution",
|
||||
"maxBitrate",
|
||||
"twoPass",
|
||||
"transcode"
|
||||
"twoPass"
|
||||
]
|
||||
},
|
||||
"SystemConfigJobDto": {
|
||||
@@ -6604,6 +6606,15 @@
|
||||
"month"
|
||||
]
|
||||
},
|
||||
"TranscodePolicy": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"all",
|
||||
"optimal",
|
||||
"required",
|
||||
"disabled"
|
||||
]
|
||||
},
|
||||
"UpdateAlbumDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -6804,6 +6815,14 @@
|
||||
"required": [
|
||||
"authStatus"
|
||||
]
|
||||
},
|
||||
"VideoCodec": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"h264",
|
||||
"hevc",
|
||||
"vp9"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user