mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-30 23:29:29 -06:00
added Video 10bit node
This commit is contained in:
@@ -13,6 +13,20 @@
|
||||
_Filter = value ?? new List<string>();
|
||||
}
|
||||
}
|
||||
private List<string> _OptionalFilter = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets filters that will process but only if processing is needed, these won't trigger a has changed
|
||||
/// value of the video file by themselves
|
||||
/// </summary>
|
||||
public List<string> OptionalFilter
|
||||
{
|
||||
get => _OptionalFilter;
|
||||
set
|
||||
{
|
||||
_OptionalFilter = value ?? new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
private List<string> _EncodingParameters = new List<string>();
|
||||
public List<string> EncodingParameters
|
||||
@@ -50,10 +64,10 @@
|
||||
//results.Add("copy");
|
||||
}
|
||||
|
||||
if (Filter.Any())
|
||||
if (Filter.Any() || OptionalFilter.Any())
|
||||
{
|
||||
results.Add("-filter:v:" + outputIndex);
|
||||
results.Add(String.Join(", ", Filter));
|
||||
results.Add(String.Join(", ", Filter.Concat(OptionalFilter)).Replace("{index}", outputIndex.ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
namespace FileFlows.VideoNodes.FfmpegBuilderNodes
|
||||
{
|
||||
public class FfmpegBuilderVideo10Bit : FfmpegBuilderNode
|
||||
{
|
||||
public override int Outputs => 1;
|
||||
public override int Execute(NodeParameters args)
|
||||
{
|
||||
base.Init(args);
|
||||
|
||||
var videoInfo = GetVideoInfo(args);
|
||||
if (videoInfo == null || videoInfo.VideoStreams?.Any() != true)
|
||||
return -1;
|
||||
|
||||
var stream = Model?.VideoStreams?.Where(x => x.Deleted == false)?.FirstOrDefault();
|
||||
if (stream != null)
|
||||
stream.OptionalFilter.AddRange(new[] { "-pix_fmt:{index}", "yuv420p10le" });
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -362,6 +362,13 @@
|
||||
"Resolution": "Resolution"
|
||||
}
|
||||
},
|
||||
"FfmpegBuilderVideo10Bit": {
|
||||
"Label": "FFMPEG Builder: Video 10 Bit",
|
||||
"Description": "Sets FFMPEG Builder to encode the video streams in 10 Bit",
|
||||
"Outputs": {
|
||||
"1": "FFMPEG Builder video streams set to encode in 10 Bit"
|
||||
}
|
||||
},
|
||||
"FfmpegBuilderVideoCodec": {
|
||||
"Label": "FFMPEG Builder: Video Codec",
|
||||
"Description": "Sets FFMPEG Builder to encode the video streams in the specified codec",
|
||||
|
||||
Reference in New Issue
Block a user