mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
parent
2435b5aa8b
commit
82d401b1cf
2 changed files with 13 additions and 3 deletions
|
@ -480,10 +480,9 @@ public void Video_Join()
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var input = FFProbe.Analyse(Input.FullName);
|
var input = FFProbe.Analyse(Input.FullName);
|
||||||
File.Copy(input.Path, newInput);
|
File.Copy(Input.FullName, newInput);
|
||||||
var input2 = FFProbe.Analyse(newInput);
|
|
||||||
|
|
||||||
var success = FFMpeg.Join(output, input, input2);
|
var success = FFMpeg.Join(output, Input.FullName, newInput);
|
||||||
Assert.IsTrue(success);
|
Assert.IsTrue(success);
|
||||||
|
|
||||||
Assert.IsTrue(File.Exists(output));
|
Assert.IsTrue(File.Exists(output));
|
||||||
|
@ -504,6 +503,7 @@ public void Video_Join()
|
||||||
if (File.Exists(newInput))
|
if (File.Exists(newInput))
|
||||||
File.Delete(newInput);
|
File.Delete(newInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
|
|
@ -222,6 +222,16 @@ public static bool Join(string output, params MediaAnalysis[] videos)
|
||||||
Cleanup(temporaryVideoParts);
|
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>
|
/// <summary>
|
||||||
/// Converts an image sequence to a video.
|
/// Converts an image sequence to a video.
|
||||||
|
|
Loading…
Reference in a new issue