mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-14 02:04:14 +01:00
Tests: add video with only audio stream test
This commit is contained in:
parent
3e856845ae
commit
c2004fc549
4 changed files with 14 additions and 0 deletions
|
@ -30,6 +30,9 @@
|
||||||
<None Update="Resources\audio.mp3">
|
<None Update="Resources\audio.mp3">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
<None Update="Resources\audio_only.mp4">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
<None Update="Resources\cover.png">
|
<None Update="Resources\cover.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
|
|
@ -17,6 +17,7 @@ public enum ImageType
|
||||||
public static class VideoLibrary
|
public static class VideoLibrary
|
||||||
{
|
{
|
||||||
public static readonly FileInfo LocalVideo = new FileInfo(".\\Resources\\input.mp4");
|
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 LocalVideoNoAudio = new FileInfo(".\\Resources\\mute.mp4");
|
||||||
public static readonly FileInfo LocalAudio = new FileInfo(".\\Resources\\audio.mp3");
|
public static readonly FileInfo LocalAudio = new FileInfo(".\\Resources\\audio.mp3");
|
||||||
public static readonly FileInfo LocalCover = new FileInfo(".\\Resources\\cover.png");
|
public static readonly FileInfo LocalCover = new FileInfo(".\\Resources\\cover.png");
|
||||||
|
|
BIN
FFMpegCore.Test/Resources/audio_only.mp4
Normal file
BIN
FFMpegCore.Test/Resources/audio_only.mp4
Normal file
Binary file not shown.
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue