mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-15 10:15:54 -07:00
Add HDR to SDR
This commit is contained in:
parent
49daf2b351
commit
391cd2f38f
2 changed files with 11 additions and 2 deletions
|
|
@ -7,7 +7,6 @@ var details = function () { return ({
|
||||||
description: 'Convert HDR to SDR',
|
description: 'Convert HDR to SDR',
|
||||||
style: {
|
style: {
|
||||||
borderColor: '#6efefc',
|
borderColor: '#6efefc',
|
||||||
opacity: 0.5,
|
|
||||||
},
|
},
|
||||||
tags: 'video',
|
tags: 'video',
|
||||||
isStartPlugin: false,
|
isStartPlugin: false,
|
||||||
|
|
@ -27,6 +26,11 @@ var plugin = function (args) {
|
||||||
var lib = require('../../../../../methods/lib')();
|
var lib = require('../../../../../methods/lib')();
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign
|
||||||
args.inputs = lib.loadDefaultValues(args.inputs, details);
|
args.inputs = lib.loadDefaultValues(args.inputs, details);
|
||||||
|
args.variables.ffmpegCommand.streams.forEach(function (stream) {
|
||||||
|
if (stream.codec_type === 'video') {
|
||||||
|
stream.outputArgs.push('-vf', 'zscale=t=linear:npl=100,format=yuv420p');
|
||||||
|
}
|
||||||
|
});
|
||||||
return {
|
return {
|
||||||
outputFileObj: args.inputFileObj,
|
outputFileObj: args.inputFileObj,
|
||||||
outputNumber: 1,
|
outputNumber: 1,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ const details = () :IpluginDetails => ({
|
||||||
description: 'Convert HDR to SDR',
|
description: 'Convert HDR to SDR',
|
||||||
style: {
|
style: {
|
||||||
borderColor: '#6efefc',
|
borderColor: '#6efefc',
|
||||||
opacity: 0.5,
|
|
||||||
},
|
},
|
||||||
tags: 'video',
|
tags: 'video',
|
||||||
isStartPlugin: false,
|
isStartPlugin: false,
|
||||||
|
|
@ -31,6 +30,12 @@ const plugin = (args:IpluginInputArgs):IpluginOutputArgs => {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign
|
||||||
args.inputs = lib.loadDefaultValues(args.inputs, details);
|
args.inputs = lib.loadDefaultValues(args.inputs, details);
|
||||||
|
|
||||||
|
args.variables.ffmpegCommand.streams.forEach((stream) => {
|
||||||
|
if (stream.codec_type === 'video') {
|
||||||
|
stream.outputArgs.push('-vf', 'zscale=t=linear:npl=100,format=yuv420p');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
outputFileObj: args.inputFileObj,
|
outputFileObj: args.inputFileObj,
|
||||||
outputNumber: 1,
|
outputNumber: 1,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue