Add overload to Join

Former-commit-id: a778ccd58f
This commit is contained in:
Malte Rosenbjerg 2020-05-24 19:27:55 +02:00
parent 2435b5aa8b
commit 82d401b1cf
2 changed files with 13 additions and 3 deletions

View file

@ -480,10 +480,9 @@ public void Video_Join()
try
{
var input = FFProbe.Analyse(Input.FullName);
File.Copy(input.Path, newInput);
var input2 = FFProbe.Analyse(newInput);
File.Copy(Input.FullName, newInput);
var success = FFMpeg.Join(output, input, input2);
var success = FFMpeg.Join(output, Input.FullName, newInput);
Assert.IsTrue(success);
Assert.IsTrue(File.Exists(output));
@ -504,6 +503,7 @@ public void Video_Join()
if (File.Exists(newInput))
File.Delete(newInput);
}
}
[TestMethod]

View file

@ -222,6 +222,16 @@ public static bool Join(string output, params MediaAnalysis[] videos)
Cleanup(temporaryVideoParts);
}
}
/// <summary>
/// Joins a list of video files.
/// </summary>
/// <param name="output">Output video file.</param>
/// <param name="videos">List of vides that need to be joined together.</param>
/// <returns>Output video information.</returns>
public static bool Join(string output, params string[] videos)
{
return Join(output, videos.Select(videoPath => FFProbe.Analyse(videoPath)).ToArray());
}
/// <summary>
/// Converts an image sequence to a video.