diff --git a/FFMpegCore.Test/FFMpegCore.Test.csproj b/FFMpegCore.Test/FFMpegCore.Test.csproj
index d7fa1ad..33df305 100644
--- a/FFMpegCore.Test/FFMpegCore.Test.csproj
+++ b/FFMpegCore.Test/FFMpegCore.Test.csproj
@@ -30,6 +30,9 @@
Always
+
+ Always
+
Always
diff --git a/FFMpegCore.Test/Resources/VideoLibrary.cs b/FFMpegCore.Test/Resources/VideoLibrary.cs
index 56ef201..74f5b7f 100644
--- a/FFMpegCore.Test/Resources/VideoLibrary.cs
+++ b/FFMpegCore.Test/Resources/VideoLibrary.cs
@@ -17,6 +17,7 @@ public enum ImageType
public static class VideoLibrary
{
public static readonly FileInfo LocalVideo = new FileInfo(".\\Resources\\input.mp4");
+ public static readonly FileInfo LocalVideoAudioOnly = new FileInfo(".\\Resources\\audio_only.mp4");
public static readonly FileInfo LocalVideoNoAudio = new FileInfo(".\\Resources\\mute.mp4");
public static readonly FileInfo LocalAudio = new FileInfo(".\\Resources\\audio.mp3");
public static readonly FileInfo LocalCover = new FileInfo(".\\Resources\\cover.png");
diff --git a/FFMpegCore.Test/Resources/audio_only.mp4 b/FFMpegCore.Test/Resources/audio_only.mp4
new file mode 100644
index 0000000..55aa483
Binary files /dev/null and b/FFMpegCore.Test/Resources/audio_only.mp4 differ
diff --git a/FFMpegCore.Test/VideoTest.cs b/FFMpegCore.Test/VideoTest.cs
index 242aacf..bb5e109 100644
--- a/FFMpegCore.Test/VideoTest.cs
+++ b/FFMpegCore.Test/VideoTest.cs
@@ -308,5 +308,15 @@ public void Video_Join_Image_Sequence()
}
}
}
+
+ [TestMethod]
+ public void Video_With_Only_Audio_Should_Extract_Metadata()
+ {
+ var video = VideoInfo.FromFileInfo(VideoLibrary.LocalVideoAudioOnly);
+ Assert.AreEqual(video.VideoFormat, "none");
+ Assert.AreEqual(video.AudioFormat, "aac");
+ Assert.AreEqual(video.Duration.TotalSeconds, 79);
+ Assert.AreEqual(video.Size, 1.25);
+ }
}
}