mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 17:25:35 +03: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:
@@ -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',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user