diff --git a/VideoNodes/FfmpegBuilderNodes/FfmpegBuilderStart.cs b/VideoNodes/FfmpegBuilderNodes/FfmpegBuilderStart.cs
index a53a81a0..9bd0e069 100644
--- a/VideoNodes/FfmpegBuilderNodes/FfmpegBuilderStart.cs
+++ b/VideoNodes/FfmpegBuilderNodes/FfmpegBuilderStart.cs
@@ -1,23 +1,45 @@
-using FileFlows.Plugin;
+namespace FileFlows.VideoNodes.FfmpegBuilderNodes;
-namespace FileFlows.VideoNodes.FfmpegBuilderNodes
+///
+/// Node that starts the FFMPEG Builder
+///
+public class FfmpegBuilderStart: FfmpegBuilderNode
{
- public class FfmpegBuilderStart: FfmpegBuilderNode
+
+ ///
+ /// The number of inputs into this node
+ ///
+ public override int Inputs => 1;
+
+ ///
+ /// The number of outputs from this node
+ ///
+ public override int Outputs => 1;
+
+ ///
+ /// The icon for this node
+ ///
+ public override string Icon => "far fa-file-video";
+
+
+ ///
+ /// The type of this node
+ ///
+ public override FlowElementType Type => FlowElementType.BuildStart;
+
+
+ ///
+ /// Executes the node
+ ///
+ /// The node arguments
+ /// the output return
+ public override int Execute(NodeParameters args)
{
- public override int Inputs => 1;
- public override int Outputs => 1;
- public override string Icon => "far fa-file-video";
- public override FlowElementType Type => FlowElementType.BuildStart;
+ VideoInfo videoInfo = GetVideoInfo(args);
+ if (videoInfo == null)
+ return -1;
-
- public override int Execute(NodeParameters args)
- {
- VideoInfo videoInfo = GetVideoInfo(args);
- if (videoInfo == null)
- return -1;
-
- this.Model = Models.FfmpegModel.CreateModel(videoInfo);
- return 1;
- }
+ this.Model = Models.FfmpegModel.CreateModel(videoInfo);
+ return 1;
}
-}
+}
\ No newline at end of file
diff --git a/VideoNodes/FfmpegBuilderNodes/Video/FfmpegBuilderVideoEncode.cs b/VideoNodes/FfmpegBuilderNodes/Video/FfmpegBuilderVideoEncode.cs
index ed977887..3e2db96e 100644
--- a/VideoNodes/FfmpegBuilderNodes/Video/FfmpegBuilderVideoEncode.cs
+++ b/VideoNodes/FfmpegBuilderNodes/Video/FfmpegBuilderVideoEncode.cs
@@ -7,6 +7,9 @@ namespace FileFlows.VideoNodes.FfmpegBuilderNodes;
///
public class FfmpegBuilderVideoEncode:FfmpegBuilderNode
{
+ ///
+ /// The number of outputs for this node
+ ///
public override int Outputs => 1;
internal const string CODEC_H264 = "h264";
@@ -14,8 +17,14 @@ public class FfmpegBuilderVideoEncode:FfmpegBuilderNode
internal const string CODEC_H265 = "h265";
internal const string CODEC_H265_10BIT = "h265 10BIT";
+ ///
+ /// The Help URL for this node
+ ///
public override string HelpUrl => "https://github.com/revenz/FileFlows/wiki/FFMPEG-Builder:-Video-Encode";
+ ///
+ /// Gets or sets the codec used to encode
+ ///
[DefaultValue(CODEC_H264_10BIT)]
[ChangeValue(nameof(Quality), 23, CODEC_H264)]
[ChangeValue(nameof(Quality), 23, CODEC_H265_10BIT)]
@@ -25,6 +34,9 @@ public class FfmpegBuilderVideoEncode:FfmpegBuilderNode
public string Codec { get; set; }
private static List _CodecOptions;
+ ///
+ /// Gets or sets the codec options
+ ///
public static List CodecOptions
{
get
@@ -43,10 +55,16 @@ public class FfmpegBuilderVideoEncode:FfmpegBuilderNode
}
}
+ ///
+ /// Gets or sets if hardware encoding should be used if possible
+ ///
[DefaultValue(true)]
[Boolean(2)]
public bool HardwareEncoding { get; set; }
+ ///
+ /// Gets or sets the quality of the video encode
+ ///
[Slider(3, inverse: true)]
[Range(0, 51)]
[DefaultValue(28)]
@@ -54,7 +72,11 @@ public class FfmpegBuilderVideoEncode:FfmpegBuilderNode
private string bit10Filter = "yuv420p10le";
-
+ ///
+ /// Executes the node
+ ///
+ /// The node arguments
+ /// the output return
public override int Execute(NodeParameters args)
{
var stream = Model.VideoStreams.Where(x => x.Deleted == false).First();
@@ -63,11 +85,13 @@ public class FfmpegBuilderVideoEncode:FfmpegBuilderNode
else if (Codec == CODEC_H265 || Codec == CODEC_H265_10BIT)
H265(stream, Codec == CODEC_H265_10BIT);
else
+ {
+ args.Logger?.ILog("Unknown codec: " + Codec);
return 2;
+ }
stream.ForcedChange = true;
- bool encoding = false;
- return encoding ? 1 : 2;
+ return 1;
}
private void H264(FfmpegVideoStream stream, bool tenBit)
@@ -157,5 +181,4 @@ public class FfmpegBuilderVideoEncode:FfmpegBuilderNode
"-preset", "p6",
});
}
-
}