mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-30 21:30:05 -06:00
FF-97 - exposed ffmpeg builder as variable to be used in functions/scripts
This commit is contained in:
@@ -5,7 +5,7 @@ namespace FileFlows.VideoNodes.FfmpegBuilderNodes
|
||||
{
|
||||
public abstract class FfmpegBuilderNode: EncodingNode
|
||||
{
|
||||
private const string MODEL_KEY = "FFMPEG_BUILDER_MODEL";
|
||||
private const string MODEL_KEY = "FfmpegBuilderModel";
|
||||
|
||||
public override int Inputs => 1;
|
||||
public override int Outputs => 1;
|
||||
@@ -13,6 +13,16 @@ namespace FileFlows.VideoNodes.FfmpegBuilderNodes
|
||||
public override FlowElementType Type => FlowElementType.BuildPart;
|
||||
public override string HelpUrl => "https://docs.fileflows.com/plugins/video-nodes/ffmpeg-builder";
|
||||
|
||||
private Dictionary<string, object> _Variables;
|
||||
public override Dictionary<string, object> Variables => _Variables;
|
||||
public FfmpegBuilderNode()
|
||||
{
|
||||
_Variables = new Dictionary<string, object>()
|
||||
{
|
||||
{ MODEL_KEY, new FfmpegModel() }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public override bool PreExecute(NodeParameters args)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ public class AudioExtractorTests : TestBase
|
||||
var vi = new VideoInfoHelper(FfmpegPath, logger);
|
||||
var vii = vi.Read(file);
|
||||
|
||||
VideoAudioExtractor node = new();
|
||||
VideoExtractAudio node = new();
|
||||
node.OutputFile = Path.Combine(TempPath, "Audio");
|
||||
node.OutputCodec = "mp3";
|
||||
|
||||
@@ -47,7 +47,7 @@ public class AudioExtractorTests : TestBase
|
||||
var vi = new VideoInfoHelper(FfmpegPath, logger);
|
||||
var vii = vi.Read(file);
|
||||
|
||||
VideoAudioExtractor node = new();
|
||||
VideoExtractAudio node = new();
|
||||
node.OutputFile = Path.Combine(TempPath, "Audio");
|
||||
node.Language = "en";
|
||||
node.OutputCodec = "mp3";
|
||||
@@ -75,7 +75,7 @@ public class AudioExtractorTests : TestBase
|
||||
var vi = new VideoInfoHelper(FfmpegPath, logger);
|
||||
var vii = vi.Read(file);
|
||||
|
||||
VideoAudioExtractor node = new();
|
||||
VideoExtractAudio node = new();
|
||||
node.OutputFile = Path.Combine(TempPath, "Audio");
|
||||
node.Codec = "eac3";
|
||||
node.OutputCodec = "mp3";
|
||||
@@ -102,7 +102,7 @@ public class AudioExtractorTests : TestBase
|
||||
var vi = new VideoInfoHelper(FfmpegPath, logger);
|
||||
var vii = vi.Read(file);
|
||||
|
||||
VideoAudioExtractor node = new();
|
||||
VideoExtractAudio node = new();
|
||||
node.OutputFile = Path.Combine(TempPath, "Audio_eac3");
|
||||
node.Codec = "eac3";
|
||||
node.OutputCodec = "mp3";
|
||||
@@ -130,7 +130,7 @@ public class AudioExtractorTests : TestBase
|
||||
var vi = new VideoInfoHelper(FfmpegPath, logger);
|
||||
var vii = vi.Read(file);
|
||||
|
||||
VideoAudioExtractor node = new();
|
||||
VideoExtractAudio node = new();
|
||||
node.OutputFile = Path.Combine(TempPath, "Audio_2048.aac");
|
||||
node.OutputCodec = "aac";
|
||||
node.OutputBitrate = 2048;
|
||||
@@ -158,7 +158,7 @@ public class AudioExtractorTests : TestBase
|
||||
var vi = new VideoInfoHelper(FfmpegPath, logger);
|
||||
var vii = vi.Read(file);
|
||||
|
||||
VideoAudioExtractor node = new();
|
||||
VideoExtractAudio node = new();
|
||||
node.OutputFile = Path.Combine(TempPath, "Audio_128.aac");
|
||||
node.OutputCodec = "aac";
|
||||
node.OutputBitrate = 128;
|
||||
|
||||
Reference in New Issue
Block a user