Skip to content

Commit

Permalink
use scale_cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
mertalev committed May 14, 2024
1 parent 8cdafc6 commit eb495c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/src/services/media.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ describe(MediaService.name, () => {
'-map 0:1',
'-g 256',
'-v verbose',
'-vf hwupload=derive_device=vulkan,scale_vulkan=w=1280:h=720,libplacebo=color_primaries=bt709:color_trc=bt709:colorspace=bt709:deband=true:deband_iterations=3:deband_radius=8:deband_threshold=6:downscaler=none:format=yuv420p:tonemapping=clip:upscaler=none,hwupload=derive_device=cuda',
'-vf scale_cuda=-2:720,hwupload=derive_device=vulkan,libplacebo=color_primaries=bt709:color_trc=bt709:colorspace=bt709:deband=true:deband_iterations=3:deband_radius=8:deband_threshold=6:downscaler=none:format=yuv420p:tonemapping=clip:upscaler=none,hwupload=derive_device=cuda',
'-preset p1',
'-cq:v 23',
]),
Expand Down
6 changes: 3 additions & 3 deletions server/src/utils/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,11 @@ export class NVENCConfig extends BaseHWConfig {
}

getFilterOptions(videoStream: VideoStreamInfo) {
const options = ['hwupload=derive_device=vulkan'];
const options = [];
if (this.shouldScale(videoStream)) {
const { width, height } = this.getSize(videoStream);
options.push(`scale_vulkan=w=${width}:h=${height}`);
options.push(`scale_cuda=${this.getScaling(videoStream)}`);
}
options.push('hwupload=derive_device=vulkan');

const colors = this.getColors();
const libplaceboOptions = [
Expand Down

0 comments on commit eb495c8

Please sign in to comment.