Skip to content

Commit

Permalink
set decoding threads only
Browse files Browse the repository at this point in the history
  • Loading branch information
mertalev committed May 14, 2024
1 parent cb1714b commit d5ace68
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/src/utils/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export class NVENCConfig extends BaseHWConfig {
}

getBaseInputOptions() {
return ['-hwaccel cuda', '-hwaccel_output_format cuda', ...this.getThreadOptions()];
return ['-hwaccel cuda', '-hwaccel_output_format cuda', ...this.getInputThreadOptions()];
}

getBaseOutputOptions(target: TranscodeTarget, videoStream: VideoStreamInfo, audioStream?: AudioStreamInfo) {
Expand Down Expand Up @@ -517,10 +517,14 @@ export class NVENCConfig extends BaseHWConfig {
}
}

getThreadOptions() {
getInputThreadOptions() {
return [`-threads ${this.config.threads <= 0 ? 1 : this.config.threads}`];
}

getThreadOptions() {
return [];
}

getRefs() {
const bframes = this.getBFrames();
if (bframes > 0 && bframes < 3 && this.config.refs < 3) {
Expand Down

0 comments on commit d5ace68

Please sign in to comment.