mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-21 05:49:56 -06:00
FF-330 - fixing issue with subtitle track merge not saving language
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Plugin : FileFlows.Plugin.IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("32d0e2ad-7617-4b52-bc39-338d2cfe468c");
|
||||
public string Name => "Apprise Nodes";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
|
||||
@@ -7,7 +7,7 @@ public class Plugin : FileFlows.Plugin.IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("d951a39e-4296-4801-ab41-4070b0789465");
|
||||
public string Name => "Audio Nodes";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
<Authors>John Andrews</Authors>
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace FileFlows.BasicNodes
|
||||
{
|
||||
public Guid Uid => new Guid("789b5213-4ca5-42da-816e-f2117f00cd16");
|
||||
public string Name => "Basic Nodes";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init() { }
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
<Authors>John Andrews</Authors>
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Plugin : IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("5ce1524c-5e7b-40ee-9fc1-2152181490f1");
|
||||
public string Name => "Checksum Nodes";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
|
||||
@@ -7,7 +7,7 @@ public class Plugin : IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("e62e3b2e-5147-4732-92df-f6fbbdb3bb08");
|
||||
public string Name => "Collection Nodes";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
[Folder(1)]
|
||||
[Required]
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Plugin : FileFlows.Plugin.IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("3664da0a-b531-47b9-bdc8-e8368d9746ce");
|
||||
public string Name => "Comic Nodes";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Plugin : FileFlows.Plugin.IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("ebaea108-8783-46b2-a889-be0d79bc8ad6");
|
||||
public string Name => "Discord";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
<Authors>John Andrews</Authors>
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Plugin : IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("b5077522-4a31-4faa-b9a7-b409ecb9c01e");
|
||||
public string Name => "Email";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Plugin : FileFlows.Plugin.IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("51bdd442-6630-4c8c-b3a4-70a2d1c60309");
|
||||
public string Name => "Emby";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -5,8 +5,8 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Plugin : FileFlows.Plugin.IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("3d8e13f2-819f-437f-b177-be40147c6e2b");
|
||||
public string Name => "Gotify Nodes";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Plugin : FileFlows.Plugin.IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("a6ddeee5-4c5a-46c5-80d5-e48552dd6a9b");
|
||||
public string Name => "Image Nodes";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
|
||||
@@ -6,7 +6,7 @@ public class Plugin : FileFlows.Plugin.IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("ed1e2547-6f92-4bc8-ae49-fcd7c74e7e9c");
|
||||
public string Name => "Meta Nodes";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init() { }
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
|
||||
@@ -7,7 +7,7 @@ public class Plugin : FileFlows.Plugin.IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("d84fbd06-f0e3-4827-8de0-6b0ef20dd883");
|
||||
public string Name => "Music Nodes (Obsolete)";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Plugin : FileFlows.Plugin.IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("5be72267-7574-4ba9-a958-f3dda0d6c2dc");
|
||||
public string Name => "Plex";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ public class Plugin : FileFlows.Plugin.IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("881b486b-4b38-4e66-b39e-fbc0fc9deee0");
|
||||
public string Name => "Video Nodes";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
<Authors>John Andrews</Authors>
|
||||
|
||||
@@ -12,6 +12,7 @@ public class FfmpegBuilderAudioTrackRemover: FfmpegBuilderNode
|
||||
|
||||
|
||||
[Select(nameof(StreamTypeOptions), 1)]
|
||||
[ChangeValue(nameof(RemoveAll), false, "Video")]
|
||||
public string StreamType { get; set; }
|
||||
|
||||
[Boolean(2)]
|
||||
@@ -32,6 +33,7 @@ public class FfmpegBuilderAudioTrackRemover: FfmpegBuilderNode
|
||||
|
||||
[Required]
|
||||
[Select(nameof(MatchTypes), 6)]
|
||||
[DefaultValue(MatchTypeOption.Title)]
|
||||
[ConditionEquals(nameof(RemoveAll), false)]
|
||||
public MatchTypeOption MatchType { get; set; }
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class FfmpegBuilderAddInputFile : FfmpegBuilderNode
|
||||
{
|
||||
if (regex.IsMatch(file.Name) == false)
|
||||
continue;
|
||||
this.Model.InputFiles.Add(file.FullName);
|
||||
this.Model.InputFiles.Add(new InputFile(file.FullName));
|
||||
added = true;
|
||||
}
|
||||
return added ? 1 : 2;
|
||||
|
||||
@@ -101,9 +101,9 @@ namespace FileFlows.VideoNodes.FfmpegBuilderNodes
|
||||
|
||||
List<string> startArgs = new List<string>();
|
||||
if (model.InputFiles?.Any() == false)
|
||||
model.InputFiles.Add(args.WorkingFile);
|
||||
model.InputFiles.Add(new InputFile(args.WorkingFile));
|
||||
else
|
||||
model.InputFiles[0] = args.WorkingFile;
|
||||
model.InputFiles[0].FileName = args.WorkingFile;
|
||||
|
||||
startArgs.AddRange(new[] { "-fflags", "+genpts" }); //Generate missing PTS if DTS is present.
|
||||
|
||||
@@ -116,10 +116,10 @@ namespace FileFlows.VideoNodes.FfmpegBuilderNodes
|
||||
startArgs.AddRange(GetHardwareDecodingArgs());
|
||||
}
|
||||
|
||||
foreach (string file in model.InputFiles)
|
||||
foreach (var file in model.InputFiles)
|
||||
{
|
||||
startArgs.Add("-i");
|
||||
startArgs.Add(file);
|
||||
startArgs.Add(file.FileName);
|
||||
}
|
||||
startArgs.Add("-y");
|
||||
if (extension.ToLower() == "mp4" && ffArgs.IndexOf("-movflags") < 0 && startArgs.IndexOf("-movflgs") < 0)
|
||||
@@ -132,6 +132,25 @@ namespace FileFlows.VideoNodes.FfmpegBuilderNodes
|
||||
if (Encode(args, FFMPEG, ffArgs, extension, dontAddInputFile: true) == false)
|
||||
return -1;
|
||||
|
||||
foreach (var file in model.InputFiles)
|
||||
{
|
||||
if (file.DeleteAfterwards)
|
||||
{
|
||||
if (File.Exists(file.FileName) == false)
|
||||
continue;
|
||||
|
||||
args.Logger.ILog("Deleting file: " + file.FileName);
|
||||
try
|
||||
{
|
||||
File.Delete(file.FileName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
args.Logger.WLog("Failed to delete file: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Text;
|
||||
using FileFlows.VideoNodes.FfmpegBuilderNodes.Models;
|
||||
using System.Text;
|
||||
|
||||
namespace FileFlows.VideoNodes.FfmpegBuilderNodes
|
||||
{
|
||||
@@ -31,7 +32,7 @@ namespace FileFlows.VideoNodes.FfmpegBuilderNodes
|
||||
if (string.IsNullOrEmpty(tempMetaDataFile))
|
||||
return 2;
|
||||
|
||||
Model.InputFiles.Add(tempMetaDataFile);
|
||||
Model.InputFiles.Add(new InputFile(tempMetaDataFile));
|
||||
Model.MetadataParameters.AddRange(new[] { "-map_metadata", (Model.InputFiles.Count - 1).ToString() });
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Text;
|
||||
using FileFlows.VideoNodes.FfmpegBuilderNodes.Models;
|
||||
using System.Text;
|
||||
|
||||
namespace FileFlows.VideoNodes.FfmpegBuilderNodes;
|
||||
|
||||
@@ -23,7 +24,7 @@ public class FfmpegBuilderComskipChapters : FfmpegBuilderNode
|
||||
if (string.IsNullOrEmpty(tempMetaDataFile))
|
||||
return 2;
|
||||
|
||||
Model.InputFiles.Add(tempMetaDataFile);
|
||||
Model.InputFiles.Add(new InputFile(tempMetaDataFile));
|
||||
Model.MetadataParameters.AddRange(new[] { "-map_metadata", (Model.InputFiles.Count - 1).ToString() });
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
|
||||
public string Extension { get; set; }
|
||||
|
||||
private List<string> _InputFiles = new List<string>();
|
||||
public List<string> InputFiles
|
||||
private List<InputFile> _InputFiles = new List<InputFile>();
|
||||
public List<InputFile> InputFiles
|
||||
{
|
||||
get => _InputFiles;
|
||||
set => _InputFiles = value ?? new List<string>();
|
||||
set => _InputFiles = value ?? new List<InputFile>();
|
||||
}
|
||||
|
||||
private List<string> _CustomParameters = new List<string>();
|
||||
@@ -67,7 +67,7 @@
|
||||
internal static FfmpegModel CreateModel(VideoInfo info)
|
||||
{
|
||||
var model = new FfmpegModel(info);
|
||||
model.InputFiles.Add(info.FileName);
|
||||
model.InputFiles.Add(new InputFile(info.FileName));
|
||||
foreach (var item in info.VideoStreams.Select((stream, index) => (stream, index)))
|
||||
{
|
||||
model.VideoStreams.Add(new FfmpegVideoStream
|
||||
@@ -106,4 +106,24 @@
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Input file
|
||||
/// </summary>
|
||||
public class InputFile
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the filename of the file
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets if the file should be deleted after processing
|
||||
/// </summary>
|
||||
public bool DeleteAfterwards { get; set; }
|
||||
|
||||
public InputFile(string fileName)
|
||||
{
|
||||
FileName = fileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,9 @@ public class FfmpegBuilderSubtitleTrackMerge : FfmpegBuilderNode
|
||||
|
||||
[Boolean(3)]
|
||||
public bool MatchFilename { get; set; }
|
||||
|
||||
[Boolean(4)]
|
||||
public bool DeleteAfterwards { get; set; }
|
||||
|
||||
public override int Execute(NodeParameters args)
|
||||
{
|
||||
@@ -85,15 +88,22 @@ public class FfmpegBuilderSubtitleTrackMerge : FfmpegBuilderNode
|
||||
}
|
||||
|
||||
args.Logger.ILog("Adding file: " + file.FullName + " [" + ext + "]" + (string.IsNullOrEmpty(language) == false ? " (Language: " + language + ")" : ""));
|
||||
this.Model.InputFiles.Add(file.FullName);
|
||||
this.Model.InputFiles.Add(new InputFile(file.FullName) { DeleteAfterwards = this.DeleteAfterwards });
|
||||
|
||||
string subTitle = language;
|
||||
if (string.IsNullOrEmpty(subTitle))
|
||||
subTitle = file.Name.Replace(file.Extension, "");
|
||||
|
||||
this.Model.SubtitleStreams.Add(new FfmpegSubtitleStream
|
||||
{
|
||||
Title = subTitle,
|
||||
Language = string.IsNullOrEmpty(language) ? null : Regex.Replace(language, @" \([\w]+\)$", string.Empty).Trim(),
|
||||
Stream = new SubtitleStream()
|
||||
{
|
||||
InputFileIndex = this.Model.InputFiles.Count - 1,
|
||||
TypeIndex = 0,
|
||||
Language = language,
|
||||
Title = file.Name.Replace(file.Extension, ""),
|
||||
Title = subTitle,
|
||||
Codec = file.Extension[1..],
|
||||
IndexString = (this.Model.InputFiles.Count - 1) + ":s:0"
|
||||
},
|
||||
|
||||
@@ -7,7 +7,7 @@ public class Plugin : FileFlows.Plugin.IPlugin
|
||||
{
|
||||
public Guid Uid => new Guid("881b486b-4b38-4e66-b39e-fbc0fc9deee1");
|
||||
public string Name => "Video Nodes";
|
||||
public string MinimumVersion => "1.0.0.1864";
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
@@ -93,6 +93,49 @@ public class FfmpegBuilder_BasicTests : TestBase
|
||||
Assert.AreEqual(1, result);
|
||||
}
|
||||
|
||||
|
||||
[TestMethod]
|
||||
public void FfmpegBuilder_AudioT064kbps()
|
||||
{
|
||||
const string file = @"D:\videos\testfiles\basic.mkv";
|
||||
var logger = new TestLogger();
|
||||
const string ffmpeg = @"C:\utils\ffmpeg\ffmpeg.exe";
|
||||
var vi = new VideoInfoHelper(ffmpeg, logger);
|
||||
var vii = vi.Read(file);
|
||||
var args = new NodeParameters(file, logger, false, string.Empty);
|
||||
args.GetToolPathActual = (string tool) => ffmpeg;
|
||||
args.TempPath = @"D:\videos\temp";
|
||||
args.Parameters.Add("VideoInfo", vii);
|
||||
|
||||
|
||||
FfmpegBuilderStart ffStart = new();
|
||||
ffStart.PreExecute(args);
|
||||
Assert.AreEqual(1, ffStart.Execute(args));
|
||||
|
||||
FfmpegBuilderAudioTrackRemover ffRemover = new();
|
||||
ffRemover.RemoveAll = true;
|
||||
ffRemover.StreamType = "Audio";
|
||||
ffRemover.PreExecute(args);
|
||||
ffRemover.Execute(args);
|
||||
|
||||
|
||||
FfmpegBuilderAudioAddTrack ffAddAudio = new();
|
||||
ffAddAudio.Codec = "aac";
|
||||
ffAddAudio.Bitrate = 640;
|
||||
ffAddAudio.Channels = 0;
|
||||
ffAddAudio.Index = 0;
|
||||
ffAddAudio.PreExecute(args);
|
||||
ffAddAudio.Execute(args);
|
||||
|
||||
FfmpegBuilderExecutor ffExecutor = new();
|
||||
ffExecutor.HardwareDecoding = true;
|
||||
ffExecutor.PreExecute(args);
|
||||
int result = ffExecutor.Execute(args);
|
||||
|
||||
string log = logger.ToString();
|
||||
Assert.AreEqual(1, result);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void FfmpegBuilder_AddAudioTracks()
|
||||
{
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<FileVersion>1.0.2.180</FileVersion>
|
||||
<ProductVersion>1.0.2.180</ProductVersion>
|
||||
<FileVersion>1.0.4.189</FileVersion>
|
||||
<ProductVersion>1.0.4.189</ProductVersion>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<Company>FileFlows</Company>
|
||||
<Authors>John Andrews</Authors>
|
||||
|
||||
@@ -328,7 +328,9 @@
|
||||
"UseSourceDirectory": "Use Source Directory",
|
||||
"UseSourceDirectory-Help": "If checked the original source directory will be searched, otherwise the working directory will be used.",
|
||||
"MatchFilename": "Match Filename",
|
||||
"MatchFilename-Help": "When checked only subtitles with the same filename as the input file or the working file will be merged"
|
||||
"MatchFilename-Help": "When checked only subtitles with the same filename as the input file or the working file will be merged",
|
||||
"DeleteAfterwards": "Delete After Merging",
|
||||
"DeleteAfterwards-Help": "If the subtitle file should be deleted after being merged"
|
||||
}
|
||||
},
|
||||
"FfmpegBuilderCropBlackBars": {
|
||||
|
||||
Reference in New Issue
Block a user