Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Tdarr_Plugin_bsh1_Boosh_FFMPEG_QSV_HEVC.js #497

Merged
merged 3 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions Community/Tdarr_Plugin_bsh1_Boosh_FFMPEG_QSV_HEVC.js
Original file line number Diff line number Diff line change
Expand Up @@ -731,20 +731,23 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {

// HW ACCEL FLAGS
// Account for different OS
switch (os.platform()) {
case 'darwin': // Mac OS - Enable videotoolbox instead of QSV
response.preset += '-hwaccel videotoolbox';
break;
case 'linux': // Linux - Full device, should fix child_device_type warnings
response.preset += `-hwaccel qsv -hwaccel_output_format qsv
if (main10 === false) {
// On testing it seems the below will automatically enable hardware decoding which causes issues...
switch (os.platform()) {
case 'darwin': // Mac OS - Enable videotoolbox instead of QSV
response.preset += '-hwaccel videotoolbox';
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 `;
break;
case 'win32': // Windows - Full device, should fix child_device_type warnings
response.preset += `-hwaccel qsv -hwaccel_output_format qsv
break;
case 'win32': // Windows - 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=d3d11va `;
break;
default:
response.preset += '-hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw_any ';
break;
default:
response.preset += '-hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw_any ';
}
}

// DECODE FLAGS
Expand Down
8 changes: 3 additions & 5 deletions tests/Community/Tdarr_Plugin_bsh1_Boosh_FFMPEG_QSV_HEVC.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ const tests = [
output: {
linux: {
processFile: true,
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv \n'
+ ' -init_hw_device qsv:hw_any,child_device_type=vaapi <io> -map 0 -c:v hevc_qsv -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -profile:v main10 -vf scale_qsv=format=p010le ',
preset: '-fflags +genpts <io> -map 0 -c:v hevc_qsv -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -profile:v main10 -vf scale_qsv=format=p010le ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
Expand All @@ -97,8 +96,7 @@ const tests = [
},
win32: {
processFile: true,
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv \n'
+ ' -init_hw_device qsv:hw_any,child_device_type=d3d11va <io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -profile:v main10 -vf scale_qsv=format=p010le ',
preset: '-fflags +genpts <io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -profile:v main10 -vf scale_qsv=format=p010le ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
Expand All @@ -115,7 +113,7 @@ const tests = [
},
darwin: {
processFile: true,
preset: '-fflags +genpts -hwaccel videotoolbox<io> -map 0 -c:v hevc_videotoolbox -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -profile:v main10 -vf scale_qsv=format=p010le ',
preset: '-fflags +genpts <io> -map 0 -c:v hevc_videotoolbox -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -profile:v main10 -vf scale_qsv=format=p010le ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
Expand Down
Loading