fix(server): video thumbnail generation failing when using qsv (#9808)

fix multiplier
This commit is contained in:
Mert 2024-05-28 04:47:41 -04:00 committed by GitHub
parent 0fc6d69824
commit fbc3790cb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 2 deletions

View file

@ -226,9 +226,8 @@ export class BaseConfig implements VideoCodecSWConfig {
return videoStream.isHDR && this.config.tonemap !== ToneMapping.DISABLED;
}
getScaling(videoStream: VideoStreamInfo) {
getScaling(videoStream: VideoStreamInfo, mult = 2) {
const targetResolution = this.getTargetResolution(videoStream);
const mult = this.config.accel === TranscodeHWAccel.QSV ? 1 : 2; // QSV doesn't support scaling numbers below -1
return this.isVideoVertical(videoStream) ? `${targetResolution}:-${mult}` : `-${mult}:${targetResolution}`;
}
@ -709,6 +708,10 @@ export class QsvSwDecodeConfig extends BaseHWConfig {
useCQP() {
return this.config.cqMode === CQMode.CQP || this.config.targetVideoCodec === VideoCodec.VP9;
}
getScaling(videoStream: VideoStreamInfo): string {
return super.getScaling(videoStream, 1);
}
}
export class QsvHwDecodeConfig extends QsvSwDecodeConfig {