Update Tdarr_Plugin_bsh1_Boosh_FFMPEG_QSV_HEVC.js

Fixed up an issue with HW decoding. If the -hwaccel qsv is set then ffmpeg seems to automatically enable hw decoding even when we don't want it. There's been several reports of issues with certain files & I think this is the cause. I've tested and that appears to resolve the transcode error
make-only-subtitle-default
Boosh1 2 years ago
parent 74a241c280
commit 95ec657cfd

@ -731,20 +731,23 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
// HW ACCEL FLAGS // HW ACCEL FLAGS
// Account for different OS // Account for different OS
switch (os.platform()) { if (main10 === false) {
case 'darwin': // Mac OS - Enable videotoolbox instead of QSV // On testing it seems the below will automatically enable hardware decoding which causes issues...
response.preset += '-hwaccel videotoolbox'; switch (os.platform()) {
break; case 'darwin': // Mac OS - Enable videotoolbox instead of QSV
case 'linux': // Linux - Full device, should fix child_device_type warnings response.preset += '-hwaccel videotoolbox';
response.preset += `-hwaccel qsv -hwaccel_output_format qsv break;
case 'linux': // Linux - Full device, should fix child_device_type warnings
response.preset += `-hwaccel qsv -hwaccel_output_format qsv
-init_hw_device qsv:hw_any,child_device_type=vaapi `; -init_hw_device qsv:hw_any,child_device_type=vaapi `;
break; break;
case 'win32': // Windows - Full device, should fix child_device_type warnings case 'win32': // Windows - Full device, should fix child_device_type warnings
response.preset += `-hwaccel qsv -hwaccel_output_format qsv response.preset += `-hwaccel qsv -hwaccel_output_format qsv
-init_hw_device qsv:hw_any,child_device_type=d3d11va `; -init_hw_device qsv:hw_any,child_device_type=d3d11va `;
break; break;
default: default:
response.preset += '-hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw_any '; response.preset += '-hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw_any ';
}
} }
// DECODE FLAGS // DECODE FLAGS

Loading…
Cancel
Save