Updated new description & tests

Description updated since mkvpropedit is gone
Tests updated for recent changes
make-only-subtitle-default
Boosh1 2 years ago
parent c7c47a16b0
commit eb92f001be

@ -26,9 +26,8 @@ const details = () => ({
Settings are dependant on file bitrate working by the logic that H265 can support the same amount of data at half
the bitrate of H264. This plugin will skip files already in HEVC, AV1 & VP9 unless "reconvert_hevc" is marked as
true. If it is then these will be reconverted again if they exceed the bitrate specified in "hevc_max_bitrate".
This plugin will also attempt to use mkvpropedit to generate accurate bitrate metadata in MKV files.
It's not required to enable mkvpropedit but highly recommended to ensure accurate bitrates are used when
encoding your media.`,
This plugin relies on understanding the accurate video bitrate of your files. It's highly recommended to remux
into MKV & enable "Run mkvpropedit on files before running plugins" under Tdarr>Options.`,
Version: '1.21',
Tags: 'pre-processing,ffmpeg,video only,qsv,h265,hevc,mkvpropedit,configurable',
Inputs: [
@ -737,18 +736,18 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
// Account for different OS setup for QSV HEVC encode.
switch (os.platform()) {
case 'darwin':
response.preset += 'hevc_videotoolbox ';
response.preset += 'hevc_videotoolbox';
// Mac OS & uses hevc_videotoolbox not QSV - Only shows up on Mac installs
break;
case 'linux':
response.preset += 'hevc_qsv ';
response.preset += 'hevc_qsv';
break;
case 'win32':
response.preset += 'hevc_qsv -load_plugin hevc_hw ';
response.preset += 'hevc_qsv -load_plugin hevc_hw';
// Windows needs the additional -load_plugin. Tested working on a Win 10 - i5-10505
break;
default:
response.preset += 'hevc_qsv '; // Default to QSV
response.preset += 'hevc_qsv'; // Default to QSV
}
// If HW decode is happening add hwupload to encode

@ -21,12 +21,11 @@ const tests = [
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 ',
+ ' -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: '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'
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'
@ -38,12 +37,11 @@ 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 -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset slow -c:a copy -c:s copy -max_muxing_queue_size 9999 ',
+ ' -init_hw_device qsv=qsv:MFX_IMPL_hw -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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: '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'
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'
@ -54,12 +52,11 @@ 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 slow -c:a copy -c:s copy -max_muxing_queue_size 9999 ',
preset: '-fflags +genpts -hwaccel videotoolbox<io> -map 0 -c:v hevc_videotoolbox -b:v 603k -minrate 452k -maxrate 754k -bufsize 1206k -preset slow -c:a copy -c:s copy -max_muxing_queue_size 9999 -f matroska ',
handBrakeMode: false,
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'
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'
@ -88,12 +85,11 @@ const tests = [
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 -profile:v main10 -vf scale_qsv=format=p010le ',
+ ' -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 -vf "hwupload=extra_hw_frames=64,format=qsv" ',
handBrakeMode: false,
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'
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'
@ -106,12 +102,11 @@ 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 -c:v h264_qsv<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 ',
+ ' -init_hw_device qsv=qsv:MFX_IMPL_hw -c:v h264_qsv<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 -f mp4 -profile:v main10 -vf scale_qsv=format=p010le -vf "hwupload=extra_hw_frames=64,format=qsv" ',
handBrakeMode: false,
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'
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'
@ -123,7 +118,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 -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 -f mp4 -profile:v main10 -vf scale_qsv=format=p010le ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
@ -148,7 +143,6 @@ const tests = [
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.ffProbeData.streams[0].profile = 'High 10';
file.mediaInfo.track[0].extra.JBDONEDATE = new Date().toISOString();
return file;
})(),
librarySettings: {},
@ -161,17 +155,11 @@ const tests = [
output: {
linux: {
processFile: true,
preset: '-fflags +genpts <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 -profile:v main10 -pix_fmt p010le -map_metadata:g -1 -metadata JBDONEDATE=2674800000',
preset: '-fflags +genpts <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: "Checking file stats - If stats are older than 7 days we'll grab new stats.\n"
+ '\n'
+ ` Stats threshold: ${statsThresString}\n`
+ '\n'
+ ` Current stats date: ${datStatsString}\n`
+ '☑ File stats are upto date! - Continuing...\n'
+ '☑ It looks like the current video bitrate is 6454kbps. \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'
@ -184,17 +172,11 @@ const tests = [
},
win32: {
processFile: true,
preset: '-fflags +genpts <io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -profile:v main10 -pix_fmt p010le -map_metadata:g -1 -metadata JBDONEDATE=2674800000',
preset: '-fflags +genpts <io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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: "Checking file stats - If stats are older than 7 days we'll grab new stats.\n"
+ '\n'
+ ` Stats threshold: ${statsThresString}\n`
+ '\n'
+ ` Current stats date: ${datStatsString}\n`
+ '☑ File stats are upto date! - Continuing...\n'
+ '☑ It looks like the current video bitrate is 6454kbps. \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'
@ -207,17 +189,11 @@ const tests = [
},
darwin: {
processFile: true,
preset: '-fflags +genpts <io> -map 0 -c:v hevc_videotoolbox -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -profile:v main10 -pix_fmt p010le -map_metadata:g -1 -metadata JBDONEDATE=2674800000',
preset: '-fflags +genpts <io> -map 0 -c:v hevc_videotoolbox -b:v 3227k -minrate 2420k -maxrate 4034k -bufsize 6454k -preset fast -c:a copy -c:s copy -f matroska -profile:v main10 -pix_fmt p010le ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: "Checking file stats - If stats are older than 7 days we'll grab new stats.\n"
+ '\n'
+ ` Stats threshold: ${statsThresString}\n`
+ '\n'
+ ` Current stats date: ${datStatsString}\n`
+ '☑ File stats are upto date! - Continuing...\n'
+ '☑ It looks like the current video bitrate is 6454kbps. \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'
@ -237,9 +213,8 @@ const tests = [
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH265_1.json'));
file.mediaInfo.track[1].BitRate = 12059590;
file.mediaInfo.track[1].BitRate = 12000000;
file.ffProbeData.streams[0].profile = 'Main 10';
file.mediaInfo.track[0].extra.JBDONEDATE = new Date().toISOString();
return file;
})(),
librarySettings: {},
@ -256,73 +231,55 @@ const tests = [
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 -load_plugin hevc_hw -b:v 6030k -minrate 4523k -maxrate 7538k -bufsize 12060k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -profile:v main10 -vf scale_qsv=format=p010le -map_metadata:g -1 -metadata JBDONEDATE=2674800000',
+ ' -init_hw_device qsv:hw_any,child_device_type=vaapi -c:v hevc_qsv<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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 -vf "hwupload=extra_hw_frames=64,format=qsv" ',
FFmpegMode: true,
reQueueAfter: true,
infoLog: "Checking file stats - If stats are older than 7 days we'll grab new stats.\n"
+ '\n'
+ ` Stats threshold: ${statsThresString}\n`
+ '\n'
+ ` Current stats date: ${datStatsString}\n`
+ '☑ File stats are upto date! - Continuing...\n'
+ '☑ It looks like the current video bitrate is 12060kbps. \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 = 6030k \n'
+ 'Minimum = 4523k \n'
+ 'Maximum = 7538k \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_any,child_device_type=d3d11va -c:v hevc_qsv<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -b:v 6030k -minrate 4523k -maxrate 7538k -bufsize 12060k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -profile:v main10 -vf scale_qsv=format=p010le -map_metadata:g -1 -metadata JBDONEDATE=2674800000',
+ ' -init_hw_device qsv=qsv:MFX_IMPL_hw -c:v hevc_qsv<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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 -vf "hwupload=extra_hw_frames=64,format=qsv" ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: "Checking file stats - If stats are older than 7 days we'll grab new stats.\n"
+ '\n'
+ ` Stats threshold: ${statsThresString}\n`
+ '\n'
+ ` Current stats date: ${datStatsString}\n`
+ '☑ File stats are upto date! - Continuing...\n'
+ '☑ It looks like the current video bitrate is 12060kbps. \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 = 6030k \n'
+ 'Minimum = 4523k \n'
+ 'Maximum = 7538k \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 6030k -minrate 4523k -maxrate 7538k -bufsize 12060k -preset fast -c:a copy -c:s copy -max_muxing_queue_size 9999 -profile:v main10 -vf scale_qsv=format=p010le -map_metadata:g -1 -metadata JBDONEDATE=2674800000',
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 -profile:v main10 -f matroska -profile:v main10 -vf scale_qsv=format=p010le',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: "Checking file stats - If stats are older than 7 days we'll grab new stats.\n"
+ '\n'
+ ` Stats threshold: ${statsThresString}\n`
+ '\n'
+ ` Current stats date: ${datStatsString}\n`
+ '☑ File stats are upto date! - Continuing...\n'
+ '☑ It looks like the current video bitrate is 12060kbps. \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 = 6030k \n'
+ 'Minimum = 4523k \n'
+ 'Maximum = 7538k \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',
@ -356,53 +313,17 @@ const tests = [
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: "Checking file stats - If stats are older than 7 days we'll grab new stats.\n"
+ '\n'
+ ` Stats threshold: ${statsThresString}\n`
+ '\n'
+ ` Current stats date: ${datStatsString}\n`
+ '☑ File stats are upto date! - Continuing...\n'
+ '☑ It looks like the current video bitrate is 5000kbps. \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',
},
},
// Test 5
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH265_1.json'));
file.container = 'mp4';
return file;
})(),
librarySettings: {},
inputs: {
container: 'mp4',
encoder_speedpreset: 'fast',
bitrate_cutoff: '3500',
},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
handBrakeMode: false,
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'
+ '==WARNING== Failed to get an accurate video bitrate, falling back to old method to get OVERALL file bitrate of 3059kbps. Bitrate calculations for video encode will likely be inaccurate... \n'
+ '☑ Current bitrate is below set cutoff of 3500kbps. \n'
+ 'Cancelling plugin. \n',
container: '.mp4',
},
},
// Test 6
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.mediaInfo.track[0].extra.JBDONEDATE = new Date().toISOString();
file.ffProbeData.streams[3].codec_name = 'hdmv_pgs_subtitle';
file.ffProbeData.streams[4].codec_name = 'eia_608';
file.ffProbeData.streams[5].codec_name = 'subrip';
@ -421,17 +342,11 @@ const tests = [
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 -load_plugin hevc_hw -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 -map_metadata:g -1 -metadata JBDONEDATE=2674800000',
+ ' -init_hw_device qsv:hw_any,child_device_type=vaapi -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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: "Checking file stats - If stats are older than 7 days we'll grab new stats.\n"
+ '\n'
+ ` Stats threshold: ${statsThresString}\n`
+ '\n'
+ ` Current stats date: ${datStatsString}\n`
+ '☑ File stats are upto date! - Continuing...\n'
+ '☑ It looks like the current video bitrate is 6454kbps. \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'
@ -443,17 +358,11 @@ 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 -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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 -map_metadata:g -1 -metadata JBDONEDATE=2674800000',
+ ' -init_hw_device qsv=qsv:MFX_IMPL_hw -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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: "Checking file stats - If stats are older than 7 days we'll grab new stats.\n"
+ '\n'
+ ` Stats threshold: ${statsThresString}\n`
+ '\n'
+ ` Current stats date: ${datStatsString}\n`
+ '☑ File stats are upto date! - Continuing...\n'
+ '☑ It looks like the current video bitrate is 6454kbps. \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'
@ -464,17 +373,11 @@ const tests = [
},
darwin: {
processFile: true,
preset: '-fflags +genpts -hwaccel videotoolbox<io> -map 0 -c:v hevc_videotoolbox<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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 -map_metadata:g -1 -metadata JBDONEDATE=2674800000',
preset: '-fflags +genpts -hwaccel videotoolbox<io> -map 0 -c:v hevc_videotoolbox<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: "Checking file stats - If stats are older than 7 days we'll grab new stats.\n"
+ '\n'
+ ` Stats threshold: ${statsThresString}\n`
+ '\n'
+ ` Current stats date: ${datStatsString}\n`
+ '☑ File stats are upto date! - Continuing...\n'
+ '☑ It looks like the current video bitrate is 6454kbps. \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'
@ -485,12 +388,11 @@ const tests = [
},
},
},
// Test 7
// Test 6
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.mediaInfo.track[0].extra.JBDONEDATE = new Date().toISOString();
file.ffProbeData.streams[3].codec_name = 'mov_text';
file.ffProbeData.streams[4].codec_name = 'eia_608';
file.ffProbeData.streams[5].codec_name = 'timed_id3';
@ -508,17 +410,11 @@ const tests = [
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 -load_plugin hevc_hw -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 -map_metadata:g -1 -metadata JBDONEDATE=2674800000',
+ ' -init_hw_device qsv:hw_any,child_device_type=vaapi -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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: "Checking file stats - If stats are older than 7 days we'll grab new stats.\n"
+ '\n'
+ ` Stats threshold: ${statsThresString}\n`
+ '\n'
+ ` Current stats date: ${datStatsString}\n`
+ '☑ File stats are upto date! - Continuing...\n'
+ '☑ It looks like the current video bitrate is 6454kbps. \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'
@ -530,17 +426,11 @@ 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 -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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 -map_metadata:g -1 -metadata JBDONEDATE=2674800000',
+ ' -init_hw_device qsv=qsv:MFX_IMPL_hw -c:v h264_qsv<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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: "Checking file stats - If stats are older than 7 days we'll grab new stats.\n"
+ '\n'
+ ` Stats threshold: ${statsThresString}\n`
+ '\n'
+ ` Current stats date: ${datStatsString}\n`
+ '☑ File stats are upto date! - Continuing...\n'
+ '☑ It looks like the current video bitrate is 6454kbps. \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'
@ -551,17 +441,11 @@ const tests = [
},
darwin: {
processFile: true,
preset: '-fflags +genpts -hwaccel videotoolbox<io> -map 0 -c:v hevc_videotoolbox<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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 -map_metadata:g -1 -metadata JBDONEDATE=2674800000',
preset: '-fflags +genpts -hwaccel videotoolbox<io> -map 0 -c:v hevc_videotoolbox<io> -map 0 -c:v hevc_qsv -load_plugin hevc_hw -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 ',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: "Checking file stats - If stats are older than 7 days we'll grab new stats.\n"
+ '\n'
+ ` Stats threshold: ${statsThresString}\n`
+ '\n'
+ ` Current stats date: ${datStatsString}\n`
+ '☑ File stats are upto date! - Continuing...\n'
+ '☑ It looks like the current video bitrate is 6454kbps. \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'

Loading…
Cancel
Save