mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-16 11:05:44 +00:00
Compare commits
1 commit
e801d616f8
...
c38c308630
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c38c308630 |
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);
|
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]
|
[TestMethod]
|
||||||
public void Builder_BuildString_Copy_Audio()
|
public void Builder_BuildString_Copy_Audio()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -606,19 +606,6 @@ public class VideoTest
|
||||||
Assert.AreEqual(bitmap.RawFormat, ImageFormat.Png);
|
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]
|
[TestMethod]
|
||||||
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
||||||
public void Video_Snapshot_InMemory_SkiaSharp()
|
public void Video_Snapshot_InMemory_SkiaSharp()
|
||||||
|
|
@ -632,19 +619,6 @@ public class VideoTest
|
||||||
// e.g. Bgra8888 on Windows and Rgba8888 on macOS.
|
// 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]
|
[TestMethod]
|
||||||
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
||||||
public void Video_Snapshot_Png_PersistSnapshot()
|
public void Video_Snapshot_Png_PersistSnapshot()
|
||||||
|
|
@ -660,21 +634,6 @@ public class VideoTest
|
||||||
Assert.AreEqual("png", analysis.PrimaryVideoStream!.CodecName);
|
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]
|
[TestMethod]
|
||||||
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
||||||
public void Video_Snapshot_Jpg_PersistSnapshot()
|
public void Video_Snapshot_Jpg_PersistSnapshot()
|
||||||
|
|
@ -839,46 +798,6 @@ public class VideoTest
|
||||||
Assert.AreEqual(input.PrimaryVideoStream.Width, result.PrimaryVideoStream.Width);
|
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]
|
[TestMethod]
|
||||||
[Timeout(2 * BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
[Timeout(2 * BaseTimeoutMilliseconds, CooperativeCancellation = true)]
|
||||||
public void Video_Join_Image_Sequence()
|
public void Video_Join_Image_Sequence()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue