0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-03-11 02:23:09 -05:00

fix(server): REVERT incorrect out_color_matrix value when generating thumbnails (#13409) (#13424)

Revert "fix(server): incorrect out_color_matrix value when generating thumbnails (#13409)"

This reverts commit 9bdfb41e9c.
This commit is contained in:
Alex 2024-10-14 11:40:46 +07:00 committed by GitHub
parent f59b813ffe
commit 346a0847ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -410,7 +410,7 @@ describe(MediaService.name, () => {
'-frames:v 1', '-frames:v 1',
'-update 1', '-update 1',
'-v verbose', '-v verbose',
String.raw`-vf fps=12:eof_action=pass:round=down,thumbnail=12,select=gt(scene\,0.1)-eq(prev_selected_n\,n)+isnan(prev_selected_n)+gt(n\,20),trim=end_frame=2,reverse,scale=-2:1440:flags=lanczos+accurate_rnd+full_chroma_int:out_color_matrix=bt601:out_range=pc,format=yuv420p`, String.raw`-vf fps=12:eof_action=pass:round=down,thumbnail=12,select=gt(scene\,0.1)-eq(prev_selected_n\,n)+isnan(prev_selected_n)+gt(n\,20),trim=end_frame=2,reverse,scale=-2:1440:flags=lanczos+accurate_rnd+full_chroma_int:out_color_matrix=601:out_range=pc,format=yuv420p`,
], ],
twoPass: false, twoPass: false,
}), }),
@ -445,7 +445,7 @@ describe(MediaService.name, () => {
'-frames:v 1', '-frames:v 1',
'-update 1', '-update 1',
'-v verbose', '-v verbose',
String.raw`-vf fps=12:eof_action=pass:round=down,thumbnail=12,select=gt(scene\,0.1)-eq(prev_selected_n\,n)+isnan(prev_selected_n)+gt(n\,20),trim=end_frame=2,reverse,zscale=t=linear:npl=100,tonemap=hable:desat=0,zscale=p=bt709:t=bt601:m=bt470bg:range=pc,format=yuv420p`, String.raw`-vf fps=12:eof_action=pass:round=down,thumbnail=12,select=gt(scene\,0.1)-eq(prev_selected_n\,n)+isnan(prev_selected_n)+gt(n\,20),trim=end_frame=2,reverse,zscale=t=linear:npl=100,tonemap=hable:desat=0,zscale=p=bt709:t=601:m=bt470bg:range=pc,format=yuv420p`,
], ],
twoPass: false, twoPass: false,
}), }),
@ -482,7 +482,7 @@ describe(MediaService.name, () => {
'-frames:v 1', '-frames:v 1',
'-update 1', '-update 1',
'-v verbose', '-v verbose',
String.raw`-vf fps=12:eof_action=pass:round=down,thumbnail=12,select=gt(scene\,0.1)-eq(prev_selected_n\,n)+isnan(prev_selected_n)+gt(n\,20),trim=end_frame=2,reverse,zscale=t=linear:npl=100,tonemap=hable:desat=0,zscale=p=bt709:t=bt601:m=bt470bg:range=pc,format=yuv420p`, String.raw`-vf fps=12:eof_action=pass:round=down,thumbnail=12,select=gt(scene\,0.1)-eq(prev_selected_n\,n)+isnan(prev_selected_n)+gt(n\,20),trim=end_frame=2,reverse,zscale=t=linear:npl=100,tonemap=hable:desat=0,zscale=p=bt709:t=601:m=bt470bg:range=pc,format=yuv420p`,
], ],
twoPass: false, twoPass: false,
}), }),

View file

@ -424,7 +424,7 @@ export class ThumbnailConfig extends BaseConfig {
getScaling(videoStream: VideoStreamInfo) { getScaling(videoStream: VideoStreamInfo) {
let options = super.getScaling(videoStream) + ':flags=lanczos+accurate_rnd+full_chroma_int'; let options = super.getScaling(videoStream) + ':flags=lanczos+accurate_rnd+full_chroma_int';
if (!this.shouldToneMap(videoStream)) { if (!this.shouldToneMap(videoStream)) {
options += ':out_color_matrix=bt601:out_range=pc'; options += ':out_color_matrix=601:out_range=pc';
} }
return options; return options;
} }
@ -432,7 +432,7 @@ export class ThumbnailConfig extends BaseConfig {
getColors() { getColors() {
return { return {
primaries: 'bt709', primaries: 'bt709',
transfer: 'bt601', transfer: '601',
matrix: 'bt470bg', matrix: 'bt470bg',
}; };
} }