mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(server): ffmpeg matrices (#13461)
* Fix ffmpeg matrices * override `getColors` * formatting --------- Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
This commit is contained in:
parent
c266465317
commit
782ba48470
2 changed files with 38 additions and 14 deletions
|
|
@ -270,9 +270,9 @@ export class BaseConfig implements VideoCodecSWConfig {
|
|||
|
||||
getColors() {
|
||||
return {
|
||||
primaries: 'bt709',
|
||||
transfer: 'bt709',
|
||||
matrix: 'bt709',
|
||||
primaries: '709',
|
||||
transfer: '709',
|
||||
matrix: '709',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -424,16 +424,16 @@ export class ThumbnailConfig extends BaseConfig {
|
|||
getScaling(videoStream: VideoStreamInfo) {
|
||||
let options = super.getScaling(videoStream) + ':flags=lanczos+accurate_rnd+full_chroma_int';
|
||||
if (!this.shouldToneMap(videoStream)) {
|
||||
options += ':out_color_matrix=601:out_range=pc';
|
||||
options += ':out_color_matrix=bt601:out_range=pc';
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
getColors() {
|
||||
return {
|
||||
primaries: 'bt709',
|
||||
primaries: '709',
|
||||
transfer: '601',
|
||||
matrix: 'bt470bg',
|
||||
matrix: '470bg',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -650,6 +650,14 @@ export class NvencHwDecodeConfig extends NvencSwDecodeConfig {
|
|||
getOutputThreadOptions() {
|
||||
return [];
|
||||
}
|
||||
|
||||
getColors() {
|
||||
return {
|
||||
primaries: 'bt709',
|
||||
transfer: 'bt709',
|
||||
matrix: 'bt709',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export class QsvSwDecodeConfig extends BaseHWConfig {
|
||||
|
|
@ -793,6 +801,14 @@ export class QsvHwDecodeConfig extends QsvSwDecodeConfig {
|
|||
getInputThreadOptions() {
|
||||
return [`-threads 1`];
|
||||
}
|
||||
|
||||
getColors() {
|
||||
return {
|
||||
primaries: 'bt709',
|
||||
transfer: 'bt709',
|
||||
matrix: 'bt709',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export class VAAPIConfig extends BaseHWConfig {
|
||||
|
|
@ -940,4 +956,12 @@ export class RkmppHwDecodeConfig extends RkmppSwDecodeConfig {
|
|||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
getColors() {
|
||||
return {
|
||||
primaries: 'bt709',
|
||||
transfer: 'bt709',
|
||||
matrix: 'bt709',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue