mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(server): apply qsv and vaapi quality to video stream only (#9807)
apply quality to video stream only
This commit is contained in:
parent
fbc3790cb6
commit
8812c3afcf
2 changed files with 6 additions and 6 deletions
|
|
@ -678,7 +678,7 @@ export class QsvSwDecodeConfig extends BaseHWConfig {
|
|||
|
||||
getBitrateOptions() {
|
||||
const options = [];
|
||||
options.push(`-${this.useCQP() ? 'q:v' : 'global_quality'} ${this.config.crf}`);
|
||||
options.push(`-${this.useCQP() ? 'q:v' : 'global_quality:v'} ${this.config.crf}`);
|
||||
const bitrates = this.getBitrateDistribution();
|
||||
if (bitrates.max > 0) {
|
||||
options.push(`-maxrate ${bitrates.max}${bitrates.unit}`, `-bufsize ${bitrates.max * 2}${bitrates.unit}`);
|
||||
|
|
@ -821,9 +821,9 @@ export class VAAPIConfig extends BaseHWConfig {
|
|||
'-rc_mode 3',
|
||||
); // variable bitrate
|
||||
} else if (this.useCQP()) {
|
||||
options.push(`-qp ${this.config.crf}`, `-global_quality ${this.config.crf}`, '-rc_mode 1');
|
||||
options.push(`-qp:v ${this.config.crf}`, `-global_quality:v ${this.config.crf}`, '-rc_mode 1');
|
||||
} else {
|
||||
options.push(`-global_quality ${this.config.crf}`, '-rc_mode 4');
|
||||
options.push(`-global_quality:v ${this.config.crf}`, '-rc_mode 4');
|
||||
}
|
||||
|
||||
return options;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue