diff --git a/FFMpegCore.Test/VideoTest.cs b/FFMpegCore.Test/VideoTest.cs index aafb334..1181875 100644 --- a/FFMpegCore.Test/VideoTest.cs +++ b/FFMpegCore.Test/VideoTest.cs @@ -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] diff --git a/FFMpegCore/FFMpeg/FFMpeg.cs b/FFMpegCore/FFMpeg/FFMpeg.cs index 8d16a19..dfca4e2 100644 --- a/FFMpegCore/FFMpeg/FFMpeg.cs +++ b/FFMpegCore/FFMpeg/FFMpeg.cs @@ -222,6 +222,16 @@ public static bool Join(string output, params MediaAnalysis[] videos) Cleanup(temporaryVideoParts); } } + /// + /// Joins a list of video files. + /// + /// Output video file. + /// List of vides that need to be joined together. + /// Output video information. + public static bool Join(string output, params string[] videos) + { + return Join(output, videos.Select(videoPath => FFProbe.Analyse(videoPath)).ToArray()); + } /// /// Converts an image sequence to a video.