diff --git a/FFMpegCore.Test/FFMpegCore.Test.csproj b/FFMpegCore.Test/FFMpegCore.Test.csproj
index 50ea8d5..2d6f26a 100644
--- a/FFMpegCore.Test/FFMpegCore.Test.csproj
+++ b/FFMpegCore.Test/FFMpegCore.Test.csproj
@@ -15,6 +15,18 @@
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
diff --git a/FFMpegCore.Test/FFProbeTests.cs b/FFMpegCore.Test/FFProbeTests.cs
index d0f5f7d..9329619 100644
--- a/FFMpegCore.Test/FFProbeTests.cs
+++ b/FFMpegCore.Test/FFProbeTests.cs
@@ -18,7 +18,7 @@ public void Probe_TooLongOutput()
public void Probe_Success()
{
var info = FFProbe.Analyse(VideoLibrary.LocalVideo.FullName);
- Assert.AreEqual(13, info.Duration.Seconds);
+ Assert.AreEqual(3, info.Duration.Seconds);
Assert.AreEqual(".mp4", info.Extension);
Assert.AreEqual(VideoLibrary.LocalVideo.FullName, info.Path);
@@ -27,10 +27,10 @@ public void Probe_Success()
Assert.AreEqual("AAC (Advanced Audio Coding)", info.PrimaryAudioStream.CodecLongName);
Assert.AreEqual("aac", info.PrimaryAudioStream.CodecName);
Assert.AreEqual("LC", info.PrimaryAudioStream.Profile);
- Assert.AreEqual(381988, info.PrimaryAudioStream.BitRate);
+ Assert.AreEqual(377351, info.PrimaryAudioStream.BitRate);
Assert.AreEqual(48000, info.PrimaryAudioStream.SampleRateHz);
- Assert.AreEqual(862991, info.PrimaryVideoStream.BitRate);
+ Assert.AreEqual(1471810, info.PrimaryVideoStream.BitRate);
Assert.AreEqual(16, info.PrimaryVideoStream.DisplayAspectRatio.Width);
Assert.AreEqual(9, info.PrimaryVideoStream.DisplayAspectRatio.Height);
Assert.AreEqual("yuv420p", info.PrimaryVideoStream.PixelFormat);
@@ -48,7 +48,7 @@ public void Probe_Success()
public async Task Probe_Async_Success()
{
var info = await FFProbe.AnalyseAsync(VideoLibrary.LocalVideo.FullName);
- Assert.AreEqual(13, info.Duration.Seconds);
+ Assert.AreEqual(3, info.Duration.Seconds);
}
[TestMethod, Timeout(10000)]
@@ -56,7 +56,7 @@ public void Probe_Success_FromStream()
{
using var stream = File.OpenRead(VideoLibrary.LocalVideoWebm.FullName);
var info = FFProbe.Analyse(stream);
- Assert.AreEqual(10, info.Duration.Seconds);
+ Assert.AreEqual(3, info.Duration.Seconds);
}
[TestMethod]
@@ -64,7 +64,7 @@ public async Task Probe_Success_FromStream_Async()
{
await using var stream = File.OpenRead(VideoLibrary.LocalVideoWebm.FullName);
var info = await FFProbe.AnalyseAsync(stream);
- Assert.AreEqual(10, info.Duration.Seconds);
+ Assert.AreEqual(3, info.Duration.Seconds);
}
}
}
\ No newline at end of file
diff --git a/FFMpegCore.Test/Resources/VideoLibrary.cs b/FFMpegCore.Test/Resources/VideoLibrary.cs
index 2214ced..b39d6d6 100644
--- a/FFMpegCore.Test/Resources/VideoLibrary.cs
+++ b/FFMpegCore.Test/Resources/VideoLibrary.cs
@@ -15,10 +15,10 @@ public enum ImageType
public static class VideoLibrary
{
- public static readonly FileInfo LocalVideo = new FileInfo($".{Path.DirectorySeparatorChar}Resources{Path.DirectorySeparatorChar}input.mp4");
- public static readonly FileInfo LocalVideoWebm = new FileInfo($".{Path.DirectorySeparatorChar}Resources{Path.DirectorySeparatorChar}input.webm");
- public static readonly FileInfo LocalVideoAudioOnly = new FileInfo($".{Path.DirectorySeparatorChar}Resources{Path.DirectorySeparatorChar}audio_only.mp4");
- public static readonly FileInfo LocalVideoNoAudio = new FileInfo($".{Path.DirectorySeparatorChar}Resources{Path.DirectorySeparatorChar}mute.mp4");
+ public static readonly FileInfo LocalVideo = new FileInfo($".{Path.DirectorySeparatorChar}Resources{Path.DirectorySeparatorChar}input_3sec.mp4");
+ public static readonly FileInfo LocalVideoWebm = new FileInfo($".{Path.DirectorySeparatorChar}Resources{Path.DirectorySeparatorChar}input_3sec.webm");
+ public static readonly FileInfo LocalVideoAudioOnly = new FileInfo($".{Path.DirectorySeparatorChar}Resources{Path.DirectorySeparatorChar}input_audio_only_10sec.mp4");
+ public static readonly FileInfo LocalVideoNoAudio = new FileInfo($".{Path.DirectorySeparatorChar}Resources{Path.DirectorySeparatorChar}input_video_only_3sec.mp4");
public static readonly FileInfo LocalAudio = new FileInfo($".{Path.DirectorySeparatorChar}Resources{Path.DirectorySeparatorChar}audio.mp3");
public static readonly FileInfo LocalCover = new FileInfo($".{Path.DirectorySeparatorChar}Resources{Path.DirectorySeparatorChar}cover.png");
public static readonly FileInfo ImageDirectory = new FileInfo($".{Path.DirectorySeparatorChar}Resources{Path.DirectorySeparatorChar}images");
diff --git a/FFMpegCore.Test/Resources/audio_only.mp4 b/FFMpegCore.Test/Resources/audio_only.mp4
deleted file mode 100644
index 55aa483..0000000
Binary files a/FFMpegCore.Test/Resources/audio_only.mp4 and /dev/null differ
diff --git a/FFMpegCore.Test/Resources/input.mp4 b/FFMpegCore.Test/Resources/input.mp4
deleted file mode 100644
index 73bbd71..0000000
Binary files a/FFMpegCore.Test/Resources/input.mp4 and /dev/null differ
diff --git a/FFMpegCore.Test/Resources/input.webm b/FFMpegCore.Test/Resources/input.webm
deleted file mode 100644
index 3faead4..0000000
Binary files a/FFMpegCore.Test/Resources/input.webm and /dev/null differ
diff --git a/FFMpegCore.Test/Resources/input_3sec.mp4 b/FFMpegCore.Test/Resources/input_3sec.mp4
new file mode 100644
index 0000000..7b59bc7
Binary files /dev/null and b/FFMpegCore.Test/Resources/input_3sec.mp4 differ
diff --git a/FFMpegCore.Test/Resources/input_3sec.webm b/FFMpegCore.Test/Resources/input_3sec.webm
new file mode 100644
index 0000000..8f6790f
Binary files /dev/null and b/FFMpegCore.Test/Resources/input_3sec.webm differ
diff --git a/FFMpegCore.Test/Resources/input_audio_only_10sec.mp4 b/FFMpegCore.Test/Resources/input_audio_only_10sec.mp4
new file mode 100644
index 0000000..67243df
Binary files /dev/null and b/FFMpegCore.Test/Resources/input_audio_only_10sec.mp4 differ
diff --git a/FFMpegCore.Test/Resources/input_video_only_3sec.mp4 b/FFMpegCore.Test/Resources/input_video_only_3sec.mp4
new file mode 100644
index 0000000..7d13848
Binary files /dev/null and b/FFMpegCore.Test/Resources/input_video_only_3sec.mp4 differ
diff --git a/FFMpegCore.Test/Resources/mute.mp4 b/FFMpegCore.Test/Resources/mute.mp4
deleted file mode 100644
index 095e8ba..0000000
Binary files a/FFMpegCore.Test/Resources/mute.mp4 and /dev/null differ
diff --git a/FFMpegCore.Test/VideoTest.cs b/FFMpegCore.Test/VideoTest.cs
index 0b40321..65bcbc9 100644
--- a/FFMpegCore.Test/VideoTest.cs
+++ b/FFMpegCore.Test/VideoTest.cs
@@ -566,7 +566,7 @@ public void Video_With_Only_Audio_Should_Extract_Metadata()
var video = FFProbe.Analyse(VideoLibrary.LocalVideoAudioOnly.FullName);
Assert.AreEqual(null, video.PrimaryVideoStream);
Assert.AreEqual("aac", video.PrimaryAudioStream.CodecName);
- Assert.AreEqual(79.5, video.Duration.TotalSeconds, 0.5);
+ Assert.AreEqual(3, video.Duration.TotalSeconds, 0.5);
// Assert.AreEqual(1.25, video.Size);
}