mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Add overload to Join
This commit is contained in:
parent
ac6b203f39
commit
a778ccd58f
2 changed files with 13 additions and 3 deletions
|
@ -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]
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue