From a0c41bba8764e6c80b51c64b64eb263bb3e7f030 Mon Sep 17 00:00:00 2001 From: patcarter883 <33055183+patcarter883@users.noreply.github.com> Date: Sun, 24 Mar 2024 13:18:14 +0000 Subject: [PATCH] AV1 decode --- src/misc/FilterSelect.js | 5 ++++- src/misc/coders/Decoders/video/AV1NVDEC.js | 5 +++-- src/misc/filters/video/Scale.js | 1 + src/views/Publication/Services/Youtube.js | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/misc/FilterSelect.js b/src/misc/FilterSelect.js index 516a40e..d5ce24f 100644 --- a/src/misc/FilterSelect.js +++ b/src/misc/FilterSelect.js @@ -46,7 +46,10 @@ export default function FilterSelect(props) { } } - filter.graph = graphs.join(','); + + // graphs.push('hwdownload') + + filter.graph = `${graphs.join(',')}`; props.onChange(filter, automatic); }; diff --git a/src/misc/coders/Decoders/video/AV1NVDEC.js b/src/misc/coders/Decoders/video/AV1NVDEC.js index f2ff9fe..02823ad 100644 --- a/src/misc/coders/Decoders/video/AV1NVDEC.js +++ b/src/misc/coders/Decoders/video/AV1NVDEC.js @@ -16,7 +16,8 @@ function createMapping(settings, stream, skills) { const mapping = { global: [], - local: ['-hwaccel', 'nvdec', '-c:v', 'av1_cuvid'], + local: ['-hwaccel', 'cuda', '-c:v', 'av1_cuvid'], + // local: ['-hwaccel', 'cuda', '-hwaccel_output_format', 'cuda', '-c:v', 'av1_cuvid'], }; return mapping; @@ -54,7 +55,7 @@ Coder.defaultProps = { // -hwaccel nvdec -const coder = 'cuda'; +const coder = 'av1'; const name = 'AV1 NVDEC (CUDA)'; const codecs = ['av1']; const type = 'video'; diff --git a/src/misc/filters/video/Scale.js b/src/misc/filters/video/Scale.js index a0d7fcd..10a1bfd 100644 --- a/src/misc/filters/video/Scale.js +++ b/src/misc/filters/video/Scale.js @@ -32,6 +32,7 @@ function createGraph(settings) { } else if (settings.mode === 'width') { mapping.push(`scale=${settings.width}:-1`); } else if (settings.mode === 'fix') { + // mapping.push(`scale_cuda=${settings.fix.split('x').join(':')}:format=yuv420p`); mapping.push(`scale=${settings.fix}`); } diff --git a/src/views/Publication/Services/Youtube.js b/src/views/Publication/Services/Youtube.js index e15063a..0977a7a 100644 --- a/src/views/Publication/Services/Youtube.js +++ b/src/views/Publication/Services/Youtube.js @@ -55,6 +55,7 @@ const requires = { codecs: { audio: ['aac', 'mp3'], video: ['h264'], + // video: ['h264', 'h265', 'vp9' , 'av1'], }, };