FF-286 - added pgs to subtitle format remover

This commit is contained in:
John Andrews
2022-08-17 15:41:17 +12:00
parent 8cd3a6fc41
commit b2e686e74a
20 changed files with 68 additions and 32 deletions
+2 -2
View File
@@ -5,8 +5,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
+2 -2
View File
@@ -6,8 +6,8 @@
<Nullable>enable</Nullable>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<PublishSingleFile>true</PublishSingleFile>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
+2 -2
View File
@@ -4,8 +4,8 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
<Authors>John Andrews</Authors>
+2 -2
View File
@@ -5,8 +5,8 @@
<Nullable>enable</Nullable>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<PublishSingleFile>true</PublishSingleFile>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
<Authors>John Andrews</Authors>
+2 -2
View File
@@ -4,8 +4,8 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
+2 -2
View File
@@ -5,8 +5,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
+2 -2
View File
@@ -5,8 +5,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
+2 -2
View File
@@ -9,8 +9,8 @@
<PublishTrimmed>true</PublishTrimmed>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<PublishSingleFile>true</PublishSingleFile>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
<Authors>John Andrews</Authors>
+2 -2
View File
@@ -5,8 +5,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -5,8 +5,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
+2 -2
View File
@@ -5,8 +5,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
+2 -2
View File
@@ -6,8 +6,8 @@
<Nullable>enable</Nullable>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<PublishSingleFile>true</PublishSingleFile>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
+2 -2
View File
@@ -6,8 +6,8 @@
<Nullable>enable</Nullable>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<PublishSingleFile>true</PublishSingleFile>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
+2 -2
View File
@@ -5,8 +5,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>FileFlows.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
+2 -2
View File
@@ -6,8 +6,8 @@
<Nullable>enable</Nullable>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<PublishSingleFile>true</PublishSingleFile>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
<Authors>John Andrews</Authors>
@@ -29,6 +29,7 @@ public class FfmpegBuilderSubtitleFormatRemover : FfmpegBuilderNode
new ListOption { Value = "dvbsub", Label = "DVB subtitles (codec dvb_subtitle)"},
new ListOption { Value = "dvdsub", Label = "DVD subtitles (codec dvd_subtitle)"},
new ListOption { Value = "dvb_teletext", Label = "DVB/Teletext Format"},
new ListOption { Value = "hdmv_pgs_subtitle", Label = "Presentation Grapic Stream (PGS)"},
new ListOption { Value = "text", Label = "Raw text subtitle"},
new ListOption { Value = "subrip", Label = "SubRip subtitle"},
new ListOption { Value = "srt", Label = "SubRip subtitle (codec subrip)"},
@@ -1380,6 +1380,41 @@ public class FfmpegBuilder_BasicTests : TestBase
Assert.AreEqual(1, result);
}
[TestMethod]
public void FfmpegBuilder_SubtitleFormatRemover_Ppgs()
{
const string file = @"D:\videos\testfiles\pgs.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));
FfmpegBuilderSubtitleFormatRemover ffSubRemover = new();
ffSubRemover.SubtitlesToRemove = new List<string> { "hdmv_pgs_subtitle" };
ffSubRemover.PreExecute(args);
int result1 = ffSubRemover.Execute(args);
FfmpegBuilderExecutor ffExecutor = new();
ffExecutor.PreExecute(args);
int result = ffExecutor.Execute(args);
string log = logger.ToString();
Assert.AreEqual(1, result1);
Assert.AreEqual(1, result);
}
}
#endif
+2 -2
View File
@@ -6,8 +6,8 @@
<Nullable>enable</Nullable>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<PublishSingleFile>true</PublishSingleFile>
<FileVersion>1.0.0.177</FileVersion>
<ProductVersion>1.0.0.177</ProductVersion>
<FileVersion>1.0.1.179</FileVersion>
<ProductVersion>1.0.1.179</ProductVersion>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
<Authors>John Andrews</Authors>