Remove rc:v (#223)

* Remove rc:v

* Lint fix
make-only-subtitle-default
HaveAGitGat 4 years ago committed by GitHub
parent 38c37509ba
commit 7b5dc9d625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -224,7 +224,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
}
response.preset += ',-map 0:v -map 0:a -map 0:s? -map -:d? -c copy -c:v:0 hevc_nvenc'
+ ` -rc:v vbr_hq -preset ${inputs.ffmpegPreset} -profile:v main10 -rc-lookahead 32 `
+ ` -preset ${inputs.ffmpegPreset} -profile:v main10 -rc-lookahead 32 `
+ '-spatial_aq:v 1 -aq-strength:v 8 -max_muxing_queue_size 4096 ';
response.infoLog += `Video bitrate is ${Math.round(MediaInfo.videoBR / 1000)}Kbps,`
+ ` overall is ${Math.round(MediaInfo.overallBR / 1000)}Kbps. `;

@ -451,7 +451,7 @@ function buildVideoConfiguration(inputs, file, logger) {
configuration.RemoveOutputSetting("-c:v copy");
configuration.AddOutputSetting(
`-c:v hevc_nvenc -rc:v vbr_hq -qmin 0 -cq:v ${cq} -b:v ${bitratetarget}k -maxrate:v ${bitratemax}k -preset medium -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8`
`-c:v hevc_nvenc -qmin 0 -cq:v ${cq} -b:v ${bitratetarget}k -maxrate:v ${bitratemax}k -preset medium -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8`
);
configuration.AddInputSetting(inputSettings[file.video_codec_name]);

@ -321,7 +321,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
response.preset = '-c:v vp8_cuvid';
}
response.preset += `,-map 0 -c:v hevc_nvenc -rc:v vbr_hq -cq:v 19 ${bitrateSettings} `
response.preset += `,-map 0 -c:v hevc_nvenc -cq:v 19 ${bitrateSettings} `
+ `-spatial_aq:v 1 -rc-lookahead:v 32 -c:a copy -c:s copy -max_muxing_queue_size 9999 ${extraArguments}`;
response.processFile = true;
response.infoLog += 'File is not hevc or vp9. Transcoding. \n';

@ -129,7 +129,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
bitratetarget = 1000;
bitratemax = 1500;
}
response.preset += `,${map} -dn -c:v hevc_nvenc -pix_fmt p010le -rc:v vbr_hq -qmin 0 -cq:v 29 -b:v ${bitratetarget}k -maxrate:v 1500k -preset slow -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -a53cc 0 -c:a copy ${subcli}${maxmux}`;
response.preset += `,${map} -dn -c:v hevc_nvenc -pix_fmt p010le -qmin 0 -cq:v 29 -b:v ${bitratetarget}k -maxrate:v 1500k -preset slow -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -a53cc 0 -c:a copy ${subcli}${maxmux}`;
transcode = 1;
}
@ -144,7 +144,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
bitratetarget = 2000;
bitratemax = 4000;
}
response.preset += `,${map} -dn -c:v hevc_nvenc -pix_fmt p010le -rc:v vbr_hq -qmin 0 -cq:v 30 -b:v ${bitratetarget}k -maxrate:v ${bitratemax}k -preset slow -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -a53cc 0 -c:a copy ${subcli}${maxmux}`;
response.preset += `,${map} -dn -c:v hevc_nvenc -pix_fmt p010le -qmin 0 -cq:v 30 -b:v ${bitratetarget}k -maxrate:v ${bitratemax}k -preset slow -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -a53cc 0 -c:a copy ${subcli}${maxmux}`;
transcode = 1;
}
//file will be encoded if the resolution is 1080p
@ -158,7 +158,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
bitratetarget = 2500;
bitratemax = 5000;
}
response.preset += `,${map} -dn -c:v hevc_nvenc -pix_fmt p010le -rc:v vbr_hq -qmin 0 -cq:V 31 -b:v ${bitratetarget}k -maxrate:v ${bitratemax}k -preset slow -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -a53cc 0 -c:a copy ${subcli}${maxmux}`;
response.preset += `,${map} -dn -c:v hevc_nvenc -pix_fmt p010le -qmin 0 -cq:V 31 -b:v ${bitratetarget}k -maxrate:v ${bitratemax}k -preset slow -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -a53cc 0 -c:a copy ${subcli}${maxmux}`;
transcode = 1;
}
//file will be encoded if the resolution is 4K
@ -172,7 +172,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
bitratetarget = 14000;
bitratemax = 20000;
}
response.preset += `,${map} -dn -c:v hevc_nvenc -pix_fmt p010le -rc:v vbr_hq -qmin 0 -cq:v 31 -b:v ${bitratetarget}k -maxrate:v ${bitratemax}k -preset slow -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -a53cc 0 -c:a copy ${subcli}${maxmux}`;
response.preset += `,${map} -dn -c:v hevc_nvenc -pix_fmt p010le -qmin 0 -cq:v 31 -b:v ${bitratetarget}k -maxrate:v ${bitratemax}k -preset slow -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -a53cc 0 -c:a copy ${subcli}${maxmux}`;
transcode = 1;
}
//check if the file is eligible for transcoding

@ -355,7 +355,7 @@ function buildVideoConfiguration(inputs, file, logger) {
if (inputs.nvenc === "true") {
configuration.RemoveOutputSetting("-c:v copy");
configuration.AddOutputSetting(
`-c:v hevc_nvenc -rc:v vbr_hq -cq:v 19 ${bitrateSettings} -spatial_aq:v 1 -rc-lookahead:v 32`
`-c:v hevc_nvenc -cq:v 19 ${bitrateSettings} -spatial_aq:v 1 -rc-lookahead:v 32`
);
if (file.video_codec_name === "h263") {

@ -383,10 +383,10 @@ function encoder_string(file, avg_rate, max_rate, container) {
//tree for resolution : quality
if (file.video_resolution === "1080p" || file.video_resolution === "4KUHD") {
//file will be encoded if the resolution is 1080p, or greater (it will be downscaled)
encoder += ` -pix_fmt p010le -rc:v vbr_hq -qmin 0 -cq:v 26 -b:v ${avg_rate}k -maxrate:v ${max_rate}k`; //-qp 26
encoder += ` -pix_fmt p010le -qmin 0 -cq:v 26 -b:v ${avg_rate}k -maxrate:v ${max_rate}k`; //-qp 26
} else if (file.video_resolution === "720p") {
//file will be encoded if the resolution is 720p
encoder += ` -pix_fmt p010le -rc:v vbr_hq -qmin 0 -cq:v 26 -b:v ${
encoder += ` -pix_fmt p010le -qmin 0 -cq:v 26 -b:v ${
avg_rate / 2
}k -maxrate:v ${max_rate / 2}k`; //-qp 28
} else if (
@ -394,12 +394,12 @@ function encoder_string(file, avg_rate, max_rate, container) {
file.video_resolution === "576p"
) {
//file will be encoded if the resolution is 480p or 576p
encoder += ` -pix_fmt p010le -rc:v vbr_hq -qmin 0 -cq:v 26 -b:v ${
encoder += ` -pix_fmt p010le -qmin 0 -cq:v 26 -b:v ${
avg_rate / 4
}k -maxrate:v ${max_rate / 4}k`; //-qp 30
} else {
//fallback option to 1080p quality
encoder += ` -pix_fmt p010le -rc:v vbr_hq -qmin 0 -cq:v 26 -b:v ${avg_rate}k -maxrate:v ${max_rate}k`; //-qp 26
encoder += ` -pix_fmt p010le -qmin 0 -cq:v 26 -b:v ${avg_rate}k -maxrate:v ${max_rate}k`; //-qp 26
}
encoder += ` -c:v hevc_nvenc -preset slow -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -a53cc 0 -dn`;

Loading…
Cancel
Save