mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 07:29:04 -07:00
Adjust bframes options
This commit is contained in:
parent
abfa9af5aa
commit
d8a86dc6d5
1 changed files with 17 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue