Added HDR support, Cleaned up info log & initial test fix

- Added HDR support. Tested as working but can have issues. Warning applied
- Made duration check a bit better with try statement
- Cleaned up how the info log was used so it's more consistent & fixed up trailing spaces & line breaks
- Initial test fix up but more will be needed
This commit is contained in:
Boosh1 2024-03-02 19:33:42 +00:00
parent 890c2642e1
commit 03d8a75033
2 changed files with 405 additions and 333 deletions

View file

@ -14,34 +14,32 @@ 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 -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset slow -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -vf hwupload=extra_hw_frames=64,format=qsv ',
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw_any,child_device_type=vaapi -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset slow -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -vf hwupload=extra_hw_frames=64,format=qsv ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 1206kbps. \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 603k \n'
+ 'Minimum = 452k \n'
+ 'Maximum = 754k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 1206kbps.\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 603k\n'
+ 'Minimum = 452k\n'
+ 'Maximum = 754k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
win32: {
processFile: true,
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv \n'
+ ' -init_hw_device qsv:hw,child_device_type=d3d11va -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset slow -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -vf hwupload=extra_hw_frames=64,format=qsv ',
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw,child_device_type=d3d11va -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset slow -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -vf hwupload=extra_hw_frames=64,format=qsv ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 1206kbps. \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 603k \n'
+ 'Minimum = 452k \n'
+ 'Maximum = 754k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 1206kbps.\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 603k\n'
+ 'Minimum = 452k\n'
+ 'Maximum = 754k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
darwin: {
@ -50,15 +48,15 @@ const tests = [
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 1206kbps. \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 603k \n'
+ 'Minimum = 452k \n'
+ 'Maximum = 754k \n'
infoLog: '☑ It looks like the current video bitrate is 1206kbps.\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 603k\n'
+ 'Minimum = 452k\n'
+ 'Maximum = 754k\n'
+ '==ALERT== OS detected as MAC - This will use VIDEOTOOLBOX to encode which is NOT QSV\n'
+ 'cmds set in extra_qsv_options will be IGNORED!\n'
+ 'File Transcoding... \n',
+ 'File Transcoding...\n',
container: '.mkv',
},
},
@ -78,36 +76,34 @@ 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 -c:v h264_qsv<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 -f mp4 -profile:v main10 -vf scale_qsv=format=p010le,hwupload=extra_hw_frames=64,format=qsv ',
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw_any,child_device_type=vaapi -c:v h264_qsv<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 -f mp4 -profile:v main10 -vf scale_qsv=format=p010le,hwupload=extra_hw_frames=64,format=qsv ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 1206kbps. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mp4. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 603k \n'
+ 'Minimum = 452k \n'
+ 'Maximum = 754k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 1206kbps.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mp4.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 603k\n'
+ 'Minimum = 452k\n'
+ 'Maximum = 754k\n'
+ 'File Transcoding...\n',
container: '.mp4',
},
win32: {
processFile: true,
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv \n'
+ ' -init_hw_device qsv:hw,child_device_type=d3d11va -c:v h264_qsv<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 -f mp4 -profile:v main10 -vf scale_qsv=format=p010le,hwupload=extra_hw_frames=64,format=qsv ',
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw,child_device_type=d3d11va -c:v h264_qsv<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 -f mp4 -profile:v main10 -vf scale_qsv=format=p010le,hwupload=extra_hw_frames=64,format=qsv ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 1206kbps. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mp4. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 603k \n'
+ 'Minimum = 452k \n'
+ 'Maximum = 754k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 1206kbps.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mp4.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 603k\n'
+ 'Minimum = 452k\n'
+ 'Maximum = 754k\n'
+ 'File Transcoding...\n',
container: '.mp4',
},
darwin: {
@ -117,16 +113,16 @@ const tests = [
FFmpegMode: true,
reQueueAfter: true,
infoLog: 'Input file is not MKV so cannot use mkvpropedit to get new file stats. Continuing but file stats will likely be inaccurate...\n'
+ '☑ It looks like the current video bitrate is 1206kbps. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mp4. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 603k \n'
+ 'Minimum = 452k \n'
+ 'Maximum = 754k \n'
+ '☑ It looks like the current video bitrate is 1206kbps.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mp4.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 603k\n'
+ 'Minimum = 452k\n'
+ 'Maximum = 754k\n'
+ '==ALERT== OS detected as MAC - This will use VIDEOTOOLBOX to encode which is NOT QSV\n'
+ 'cmds set in extra_qsv_options will be IGNORED!\n'
+ 'File Transcoding... \n',
+ 'File Transcoding...\n',
container: '.mp4',
},
},
@ -149,38 +145,36 @@ const tests = [
output: {
linux: {
processFile: true,
preset: '-fflags +genpts -hwaccel_output_format qsv \n'
+ ' -init_hw_device qsv:hw,child_device_type=vaapi -c:v h264<io> -map 0 -c:v hevc_qsv -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -profile:v main10 -pix_fmt p010le ',
preset: '-fflags +genpts -hwaccel_output_format qsv -init_hw_device qsv:hw,child_device_type=vaapi -c:v h264<io> -map 0 -c:v hevc_qsv -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -profile:v main10 -pix_fmt p010le ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 6454kbps. \n'
+ 'Input file is h264 High10. Hardware Decode not supported. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 3227k \n'
+ 'Minimum = 2420k \n'
+ 'Maximum = 4034k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 6454kbps.\n'
+ 'Input file is h264 High10. Hardware Decode not supported.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 3227k\n'
+ 'Minimum = 2420k\n'
+ 'Maximum = 4034k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
win32: {
processFile: true,
preset: '-fflags +genpts -hwaccel_output_format qsv \n'
+ ' -init_hw_device qsv:hw,child_device_type=d3d11va -c:v h264<io> -map 0 -c:v hevc_qsv -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -profile:v main10 -pix_fmt p010le ',
preset: '-fflags +genpts -hwaccel_output_format qsv -init_hw_device qsv:hw,child_device_type=d3d11va -c:v h264<io> -map 0 -c:v hevc_qsv -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -profile:v main10 -pix_fmt p010le ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 6454kbps. \n'
+ 'Input file is h264 High10. Hardware Decode not supported. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 3227k \n'
+ 'Minimum = 2420k \n'
+ 'Maximum = 4034k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 6454kbps.\n'
+ 'Input file is h264 High10. Hardware Decode not supported.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 3227k\n'
+ 'Minimum = 2420k\n'
+ 'Maximum = 4034k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
darwin: {
@ -189,17 +183,17 @@ const tests = [
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 6454kbps. \n'
+ 'Input file is 10bit using High10. Disabling hardware decoding to avoid problems. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 3227k \n'
+ 'Minimum = 2420k \n'
+ 'Maximum = 4034k \n'
infoLog: '☑ It looks like the current video bitrate is 6454kbps.\n'
+ 'Input file is 10bit using High10. Disabling hardware decoding to avoid problems.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 3227k\n'
+ 'Minimum = 2420k\n'
+ 'Maximum = 4034k\n'
+ '==ALERT== OS detected as MAC - This will use VIDEOTOOLBOX to encode which is NOT QSV\n'
+ 'cmds set in extra_qsv_options will be IGNORED!\n'
+ 'File Transcoding... \n',
+ 'File Transcoding...\n',
container: '.mkv',
},
},
@ -226,39 +220,37 @@ 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 -c:v hevc_qsv<io> -map 0 -c:v hevc_qsv -b:v 6000k -minrate 4500k -maxrate 7500k -bufsize 12000k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -profile:v main10 -vf scale_qsv=format=p010le,hwupload=extra_hw_frames=64,format=qsv ',
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw_any,child_device_type=vaapi -c:v hevc_qsv<io> -map 0 -c:v hevc_qsv -b:v 6000k -minrate 4500k -maxrate 7500k -bufsize 12000k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -profile:v main10 -vf scale_qsv=format=p010le,hwupload=extra_hw_frames=64,format=qsv ',
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 12000kbps. \n'
+ 'Reconvert_hevc is true & the file is already HEVC, VP9 or AV1. Using HEVC specific cutoff of 6000kbps. \n'
+ '☒ The file is still above this new cutoff! Reconverting. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 6000k \n'
+ 'Minimum = 4500k \n'
+ 'Maximum = 7500k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 12000kbps.\n'
+ 'Reconvert_hevc is true & the file is already HEVC, VP9 or AV1. Using HEVC specific cutoff of 6000kbps.\n'
+ '☒ The file is still above this new cutoff! Reconverting.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 6000k\n'
+ 'Minimum = 4500k\n'
+ 'Maximum = 7500k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
win32: {
processFile: true,
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv \n'
+ ' -init_hw_device qsv:hw,child_device_type=d3d11va -c:v hevc_qsv<io> -map 0 -c:v hevc_qsv -b:v 6000k -minrate 4500k -maxrate 7500k -bufsize 12000k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -profile:v main10 -vf scale_qsv=format=p010le,hwupload=extra_hw_frames=64,format=qsv ',
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw,child_device_type=d3d11va -c:v hevc_qsv<io> -map 0 -c:v hevc_qsv -b:v 6000k -minrate 4500k -maxrate 7500k -bufsize 12000k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -profile:v main10 -vf scale_qsv=format=p010le,hwupload=extra_hw_frames=64,format=qsv ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 12000kbps. \n'
+ 'Reconvert_hevc is true & the file is already HEVC, VP9 or AV1. Using HEVC specific cutoff of 6000kbps. \n'
+ '☒ The file is still above this new cutoff! Reconverting. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 6000k \n'
+ 'Minimum = 4500k \n'
+ 'Maximum = 7500k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 12000kbps.\n'
+ 'Reconvert_hevc is true & the file is already HEVC, VP9 or AV1. Using HEVC specific cutoff of 6000kbps.\n'
+ '☒ The file is still above this new cutoff! Reconverting.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 6000k\n'
+ 'Minimum = 4500k\n'
+ 'Maximum = 7500k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
darwin: {
@ -267,18 +259,18 @@ const tests = [
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 12000kbps. \n'
+ 'Reconvert_hevc is true & the file is already HEVC, VP9 or AV1. Using HEVC specific cutoff of 6000kbps. \n'
+ '☒ The file is still above this new cutoff! Reconverting. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 6000k \n'
+ 'Minimum = 4500k \n'
+ 'Maximum = 7500k \n'
infoLog: '☑ It looks like the current video bitrate is 12000kbps.\n'
+ 'Reconvert_hevc is true & the file is already HEVC, VP9 or AV1. Using HEVC specific cutoff of 6000kbps.\n'
+ '☒ The file is still above this new cutoff! Reconverting.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 6000k\n'
+ 'Minimum = 4500k\n'
+ 'Maximum = 7500k\n'
+ '==ALERT== OS detected as MAC - This will use VIDEOTOOLBOX to encode which is NOT QSV\n'
+ 'cmds set in extra_qsv_options will be IGNORED!\n'
+ 'File Transcoding... \n',
+ 'File Transcoding...\n',
container: '.mkv',
},
},
@ -309,9 +301,9 @@ const tests = [
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 5000kbps. \n'
+ 'Reconvert_hevc is true & the file is already HEVC, VP9 or AV1. Using HEVC specific cutoff of 6000kbps. \n'
+ '☑ The file is NOT above this new cutoff. Exiting plugin. \n',
infoLog: '☑ It looks like the current video bitrate is 5000kbps.\n'
+ 'Reconvert_hevc is true & the file is already HEVC, VP9 or AV1. Using HEVC specific cutoff of 6000kbps.\n'
+ '☑ The file is NOT above this new cutoff. Exiting plugin.\n',
container: '.mkv',
},
},
@ -337,34 +329,32 @@ 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 -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -map -0:3 -map -0:4 -map -0:5 -map -0:6 -f mp4 -vf hwupload=extra_hw_frames=64,format=qsv ',
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw_any,child_device_type=vaapi -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -map -0:3 -map -0:4 -map -0:5 -map -0:6 -f mp4 -vf hwupload=extra_hw_frames=64,format=qsv ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 6454kbps. \n'
+ 'Container for output selected as mp4. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 3227k \n'
+ 'Minimum = 2420k \n'
+ 'Maximum = 4034k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 6454kbps.\n'
+ 'Container for output selected as mp4.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 3227k\n'
+ 'Minimum = 2420k\n'
+ 'Maximum = 4034k\n'
+ 'File Transcoding...\n',
container: '.mp4',
},
win32: {
processFile: true,
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv \n'
+ ' -init_hw_device qsv:hw,child_device_type=d3d11va -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -map -0:3 -map -0:4 -map -0:5 -map -0:6 -f mp4 -vf hwupload=extra_hw_frames=64,format=qsv ',
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw,child_device_type=d3d11va -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -map -0:3 -map -0:4 -map -0:5 -map -0:6 -f mp4 -vf hwupload=extra_hw_frames=64,format=qsv ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 6454kbps. \n'
+ 'Container for output selected as mp4. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 3227k \n'
+ 'Minimum = 2420k \n'
+ 'Maximum = 4034k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 6454kbps.\n'
+ 'Container for output selected as mp4.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 3227k\n'
+ 'Minimum = 2420k\n'
+ 'Maximum = 4034k\n'
+ 'File Transcoding...\n',
container: '.mp4',
},
darwin: {
@ -373,13 +363,13 @@ const tests = [
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 6454kbps. \n'
+ 'Container for output selected as mp4. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 3227k \n'
+ 'Minimum = 2420k \n'
+ 'Maximum = 4034k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 6454kbps.\n'
+ 'Container for output selected as mp4.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 3227k\n'
+ 'Minimum = 2420k\n'
+ 'Maximum = 4034k\n'
+ 'File Transcoding...\n',
container: '.mp4',
},
},
@ -405,34 +395,32 @@ 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 -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -map -0:d -map -0:3 -map -0:4 -map -0:5 -f matroska -vf hwupload=extra_hw_frames=64,format=qsv ',
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw_any,child_device_type=vaapi -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -map -0:d -map -0:3 -map -0:4 -map -0:5 -f matroska -vf hwupload=extra_hw_frames=64,format=qsv ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 6454kbps. \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 3227k \n'
+ 'Minimum = 2420k \n'
+ 'Maximum = 4034k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 6454kbps.\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 3227k\n'
+ 'Minimum = 2420k\n'
+ 'Maximum = 4034k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
win32: {
processFile: true,
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv \n'
+ ' -init_hw_device qsv:hw,child_device_type=d3d11va -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -map -0:d -map -0:3 -map -0:4 -map -0:5 -f matroska -vf hwupload=extra_hw_frames=64,format=qsv ',
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw,child_device_type=d3d11va -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -map -0:d -map -0:3 -map -0:4 -map -0:5 -f matroska -vf hwupload=extra_hw_frames=64,format=qsv ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 6454kbps. \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 3227k \n'
+ 'Minimum = 2420k \n'
+ 'Maximum = 4034k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 6454kbps.\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 3227k\n'
+ 'Minimum = 2420k\n'
+ 'Maximum = 4034k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
darwin: {
@ -441,13 +429,13 @@ const tests = [
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 6454kbps. \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 3227k \n'
+ 'Minimum = 2420k \n'
+ 'Maximum = 4034k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 6454kbps.\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 3227k\n'
+ 'Minimum = 2420k\n'
+ 'Maximum = 4034k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
},
@ -468,36 +456,34 @@ 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 -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset fast -look_ahead 1 -look_ahead_depth 100 -extbrc 1 -rdo 1 -mbbrc 1 -b_strategy 1 -adaptive_i 1 -adaptive_b 1 -vf scale_qsv=1280:-1,format=p010le,hwupload=extra_hw_frames=64,format=qsv -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -profile:v main10',
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw_any,child_device_type=vaapi -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset fast -look_ahead 1 -look_ahead_depth 100 -extbrc 1 -rdo 1 -mbbrc 1 -b_strategy 1 -adaptive_i 1 -adaptive_b 1 -vf scale_qsv=1280:-1,format=p010le,hwupload=extra_hw_frames=64,format=qsv -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -profile:v main10',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 1206kbps. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 603k \n'
+ 'Minimum = 452k \n'
+ 'Maximum = 754k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 1206kbps.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 603k\n'
+ 'Minimum = 452k\n'
+ 'Maximum = 754k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
win32: {
processFile: true,
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv \n'
+ ' -init_hw_device qsv:hw,child_device_type=d3d11va -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset fast -look_ahead 1 -look_ahead_depth 100 -extbrc 1 -rdo 1 -mbbrc 1 -b_strategy 1 -adaptive_i 1 -adaptive_b 1 -vf scale_qsv=1280:-1,format=p010le,hwupload=extra_hw_frames=64,format=qsv -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -profile:v main10',
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw,child_device_type=d3d11va -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset fast -look_ahead 1 -look_ahead_depth 100 -extbrc 1 -rdo 1 -mbbrc 1 -b_strategy 1 -adaptive_i 1 -adaptive_b 1 -vf scale_qsv=1280:-1,format=p010le,hwupload=extra_hw_frames=64,format=qsv -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska -profile:v main10',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 1206kbps. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 603k \n'
+ 'Minimum = 452k \n'
+ 'Maximum = 754k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 1206kbps.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 603k\n'
+ 'Minimum = 452k\n'
+ 'Maximum = 754k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
darwin: {
@ -506,16 +492,16 @@ const tests = [
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 1206kbps. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 603k \n'
+ 'Minimum = 452k \n'
+ 'Maximum = 754k \n'
infoLog: '☑ It looks like the current video bitrate is 1206kbps.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 603k\n'
+ 'Minimum = 452k\n'
+ 'Maximum = 754k\n'
+ '==ALERT== OS detected as MAC - This will use VIDEOTOOLBOX to encode which is NOT QSV\n'
+ 'cmds set in extra_qsv_options will be IGNORED!\n'
+ 'File Transcoding... \n',
+ 'File Transcoding...\n',
container: '.mkv',
},
},
@ -539,37 +525,35 @@ const tests = [
output: {
linux: {
processFile: true,
preset: '-fflags +genpts -hwaccel_output_format qsv \n'
+ ' -init_hw_device qsv:hw_any,child_device_type=vaapi -c:v vc1<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 -f matroska -profile:v main10 -pix_fmt p010le ',
preset: '-fflags +genpts -hwaccel_output_format qsv -init_hw_device qsv:hw_any,child_device_type=vaapi -c:v vc1<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 -f matroska -profile:v main10 -pix_fmt p010le ',
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 1206kbps. \n'
+ 'Input file is vc1. Hardware Decode not supported. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 603k \n'
+ 'Minimum = 452k \n'
+ 'Maximum = 754k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 1206kbps.\n'
+ 'Input file is vc1. Hardware Decode not supported.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 603k\n'
+ 'Minimum = 452k\n'
+ 'Maximum = 754k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
win32: {
processFile: true,
preset: '-fflags +genpts -hwaccel_output_format qsv \n'
+ ' -init_hw_device qsv:hw,child_device_type=d3d11va -c:v vc1<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 -f matroska -profile:v main10 -pix_fmt p010le ',
preset: '-fflags +genpts -hwaccel_output_format qsv -init_hw_device qsv:hw,child_device_type=d3d11va -c:v vc1<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 -f matroska -profile:v main10 -pix_fmt p010le ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 1206kbps. \n'
+ 'Input file is vc1. Hardware Decode not supported. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 603k \n'
+ 'Minimum = 452k \n'
+ 'Maximum = 754k \n'
+ 'File Transcoding... \n',
infoLog: '☑ It looks like the current video bitrate is 1206kbps.\n'
+ 'Input file is vc1. Hardware Decode not supported.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 603k\n'
+ 'Minimum = 452k\n'
+ 'Maximum = 754k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
darwin: {
@ -578,16 +562,93 @@ const tests = [
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 1206kbps. \n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format \n'
+ 'Container for output selected as mkv. \n'
+ 'Encode variable bitrate settings: \n'
+ 'Target = 603k \n'
+ 'Minimum = 452k \n'
+ 'Maximum = 754k \n'
infoLog: '☑ It looks like the current video bitrate is 1206kbps.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 603k\n'
+ 'Minimum = 452k\n'
+ 'Maximum = 754k\n'
+ '==ALERT== OS detected as MAC - This will use VIDEOTOOLBOX to encode which is NOT QSV\n'
+ 'cmds set in extra_qsv_options will be IGNORED!\n'
+ 'File Transcoding... \n',
+ 'File Transcoding...\n',
container: '.mkv',
},
},
},
// Test 9
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
file.ffProbeData.streams[0].color_space = 'bt2020nc';
file.ffProbeData.streams[0].color_transfer = 'smpte2084';
file.ffProbeData.streams[0].color_primaries = 'bt2020';
file.mediaInfo.track[1].BitRate = 12000000;
file.ffProbeData.streams[0].profile = 'Main 10';
return file;
})(),
librarySettings: {},
inputs: {
container: 'mkv',
encoder_speedpreset: 'fast',
reconvert_hevc: 'true',
hevc_max_bitrate: '6000',
bitrate_cutoff: '4000',
},
otherArguments: {},
},
output: {
linux: {
processFile: true,
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw_any,child_device_type=vaapi -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 6000k -minrate 4500k -maxrate 7500k -bufsize 12000k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -color_primaries bt2020 -color_trc smpte2084 -colorspace bt2020nc -f matroska -profile:v main10 -vf scale_qsv=format=p010le,hwupload=extra_hw_frames=64,format=qsv ',
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 12000kbps.\n'
+ '==WARNING== This looks to be a HDR file. HDR is supported but correct encoding is not guaranteed.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 6000k\n'
+ 'Minimum = 4500k\n'
+ 'Maximum = 7500k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
win32: {
processFile: true,
preset: '-fflags +genpts -hwaccel qsv -hwaccel_output_format qsv -init_hw_device qsv:hw,child_device_type=d3d11va -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -b:v 6000k -minrate 4500k -maxrate 7500k -bufsize 12000k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -color_primaries bt2020 -color_trc smpte2084 -colorspace bt2020nc -f matroska -profile:v main10 -vf scale_qsv=format=p010le,hwupload=extra_hw_frames=64,format=qsv ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 12000kbps.\n'
+ '==WARNING== This looks to be a HDR file. HDR is supported but correct encoding is not guaranteed.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 6000k\n'
+ 'Minimum = 4500k\n'
+ 'Maximum = 7500k\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
darwin: {
processFile: true,
preset: '-fflags +genpts <io> -map 0 -c:v hevc_videotoolbox -b:v 6000k -minrate 4500k -maxrate 7500k -bufsize 12000k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -color_primaries bt2020 -color_trc smpte2084 -colorspace bt2020nc -f matroska -profile:v main10 -vf scale_qsv=format=p010le',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑ It looks like the current video bitrate is 12000kbps.\n'
+ '==WARNING== This looks to be a HDR file. HDR is supported but correct encoding is not guaranteed.\n'
+ '10 bit encode enabled. Setting Main10 Profile & 10 bit pixel format\n'
+ 'Container for output selected as mkv.\n'
+ 'Encode variable bitrate settings:\n'
+ 'Target = 6000k\n'
+ 'Minimum = 4500k\n'
+ 'Maximum = 7500k\n'
+ '==ALERT== OS detected as MAC - This will use VIDEOTOOLBOX to encode which is NOT QSV\n'
+ 'cmds set in extra_qsv_options will be IGNORED!\n'
+ 'File Transcoding...\n',
container: '.mkv',
},
},