Adjust bframes options

make-only-subtitle-default
HaveAGitGat 2 years ago
parent abfa9af5aa
commit d8a86dc6d5

@ -90,7 +90,7 @@ const details = () => ({
false`,
},
{
name: 'enable_bframes',
name: 'bframes_enabled',
type: 'boolean',
defaultValue: false,
inputUI: {
@ -109,6 +109,15 @@ const details = () => ({
\\nExample:\\n
false`,
},
{
name: 'bframes_value',
type: 'number',
defaultValue: 5,
inputUI: {
type: 'text',
},
tooltip: 'Specify number of bframes to use.',
},
{
name: 'force_conform',
type: 'boolean',
@ -133,6 +142,11 @@ const details = () => ({
],
});
const bframeSupport = [
'hevc_nvenc',
'h264_nvenc',
];
const hasEncoder = async ({
ffmpegPath,
encoder,
@ -358,9 +372,9 @@ const plugin = async (file, librarySettings, inputs, otherArguments) => {
}
// Check if b frame variable is true.
if (encoder === 'hevc_nvenc' && inputs.enable_bframes === true) {
if (bframeSupport.includes(encoder) && inputs.bframes_enabled === true) {
// If set to true then add b frames argument
extraArguments += '-bf 5 ';
extraArguments += `-bf ${inputs.bframes_value} `;
}
// Go through each stream in the file.

Loading…
Cancel
Save