mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-15 18:45:44 +00:00
Compare commits
No commits in common. "cc75e03ec997ed3dfc20e8bae5fb7eff86b01426" and "55d526ce92c65cb2e418c7305af13e55973e01c7" have entirely different histories.
cc75e03ec9
...
55d526ce92
2 changed files with 0 additions and 89 deletions
|
|
@ -93,14 +93,6 @@ public class ArgumentBuilderTest
|
|||
Assert.AreEqual("-i \"concat:1.mp4|2.mp4|3.mp4|4.mp4\" \"output.mp4\"", str);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Builder_BuildString_DemuxConcat()
|
||||
{
|
||||
var str = FFMpegArguments.FromDemuxConcatInput(_concatFiles).OutputToFile("output.mp4", false).Arguments;
|
||||
Assert.Contains("-f concat -safe 0 -i", str);
|
||||
Assert.Contains("\"output.mp4\"", str);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Builder_BuildString_Copy_Audio()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -589,19 +589,6 @@ public class VideoTest
|
|||
Assert.AreEqual(bitmap.RawFormat, ImageFormat.Png);
|
||||
}
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
[OsSpecificTestMethod(OsPlatforms.Windows)]
|
||||
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
||||
public async Task Video_SnapshotAsync_InMemory_SystemDrawingCommon()
|
||||
{
|
||||
using var bitmap = await FFMpegImage.SnapshotAsync(TestResources.Mp4Video, cancellationToken: TestContext.CancellationToken);
|
||||
|
||||
var input = await FFProbe.AnalyseAsync(TestResources.Mp4Video, cancellationToken: TestContext.CancellationToken);
|
||||
Assert.AreEqual(input.PrimaryVideoStream!.Width, bitmap.Width);
|
||||
Assert.AreEqual(input.PrimaryVideoStream.Height, bitmap.Height);
|
||||
Assert.AreEqual(bitmap.RawFormat, ImageFormat.Png);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
||||
public void Video_Snapshot_InMemory_SkiaSharp()
|
||||
|
|
@ -615,19 +602,6 @@ public class VideoTest
|
|||
// e.g. Bgra8888 on Windows and Rgba8888 on macOS.
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
||||
public async Task Video_SnapshotAsync_InMemory_SkiaSharp()
|
||||
{
|
||||
using var bitmap = await Extensions.SkiaSharp.FFMpegImage.SnapshotAsync(TestResources.Mp4Video, cancellationToken: TestContext.CancellationToken);
|
||||
|
||||
var input = await FFProbe.AnalyseAsync(TestResources.Mp4Video, cancellationToken: TestContext.CancellationToken);
|
||||
Assert.AreEqual(input.PrimaryVideoStream!.Width, bitmap.Width);
|
||||
Assert.AreEqual(input.PrimaryVideoStream.Height, bitmap.Height);
|
||||
// Note: The resulting ColorType is dependent on the execution environment and therefore not assessed,
|
||||
// e.g. Bgra8888 on Windows and Rgba8888 on macOS.
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
||||
public void Video_Snapshot_Png_PersistSnapshot()
|
||||
|
|
@ -643,21 +617,6 @@ public class VideoTest
|
|||
Assert.AreEqual("png", analysis.PrimaryVideoStream!.CodecName);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
||||
public async Task Video_SnapshotAsync_Png_PersistSnapshot()
|
||||
{
|
||||
using var outputPath = new TemporaryFile("out.png");
|
||||
var input = await FFProbe.AnalyseAsync(TestResources.Mp4Video, cancellationToken: TestContext.CancellationToken);
|
||||
|
||||
await FFMpeg.SnapshotAsync(TestResources.Mp4Video, outputPath, cancellationToken: TestContext.CancellationToken);
|
||||
|
||||
var analysis = FFProbe.Analyse(outputPath);
|
||||
Assert.AreEqual(input.PrimaryVideoStream!.Width, analysis.PrimaryVideoStream!.Width);
|
||||
Assert.AreEqual(input.PrimaryVideoStream.Height, analysis.PrimaryVideoStream!.Height);
|
||||
Assert.AreEqual("png", analysis.PrimaryVideoStream!.CodecName);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
||||
public void Video_Snapshot_Jpg_PersistSnapshot()
|
||||
|
|
@ -822,46 +781,6 @@ public class VideoTest
|
|||
Assert.AreEqual(input.PrimaryVideoStream.Width, result.PrimaryVideoStream.Width);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
||||
public void Video_Convert_Webm()
|
||||
{
|
||||
using var outputPath = new TemporaryFile("out.webm");
|
||||
|
||||
var success = FFMpeg.Convert(TestResources.Mp4Video, outputPath, VideoType.WebM);
|
||||
Assert.IsTrue(success);
|
||||
Assert.IsTrue(File.Exists(outputPath));
|
||||
|
||||
var input = FFProbe.Analyse(TestResources.Mp4Video);
|
||||
var result = FFProbe.Analyse(outputPath);
|
||||
Assert.AreEqual(input.Duration.Days, result.Duration.Days);
|
||||
Assert.AreEqual(input.Duration.Hours, result.Duration.Hours);
|
||||
Assert.AreEqual(input.Duration.Minutes, result.Duration.Minutes);
|
||||
Assert.AreEqual(input.Duration.Seconds, result.Duration.Seconds);
|
||||
Assert.AreEqual(input.PrimaryVideoStream!.Height, result.PrimaryVideoStream!.Height);
|
||||
Assert.AreEqual(input.PrimaryVideoStream.Width, result.PrimaryVideoStream.Width);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
||||
public void Video_Convert_Ogv()
|
||||
{
|
||||
using var outputPath = new TemporaryFile("out.ogv");
|
||||
|
||||
var success = FFMpeg.Convert(TestResources.Mp4Video, outputPath, VideoType.Ogv);
|
||||
Assert.IsTrue(success);
|
||||
Assert.IsTrue(File.Exists(outputPath));
|
||||
|
||||
var input = FFProbe.Analyse(TestResources.Mp4Video);
|
||||
var result = FFProbe.Analyse(outputPath);
|
||||
Assert.AreEqual(input.Duration.Days, result.Duration.Days);
|
||||
Assert.AreEqual(input.Duration.Hours, result.Duration.Hours);
|
||||
Assert.AreEqual(input.Duration.Minutes, result.Duration.Minutes);
|
||||
Assert.AreEqual(input.Duration.Seconds, result.Duration.Seconds);
|
||||
Assert.AreEqual(input.PrimaryVideoStream!.Height, result.PrimaryVideoStream!.Height);
|
||||
Assert.AreEqual(input.PrimaryVideoStream.Width, result.PrimaryVideoStream.Width);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Timeout(2 * BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
||||
public void Video_Join_Image_Sequence()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue