开发者

Whant to check all kind of audio & video quality in asp.net C#

How can I check the quality and bit-rate of audio & video files in C# asp.net开发者_StackOverflow?


if it is a riff / wave file the file can be examined on a binary level to get this kind of information, but it depends on exactly what kind of file.

https://ccrma.stanford.edu/courses/422/projects/WaveFormat/

Or you can use windows media player to get some information.

using WMPLib; 
// this file is called Interop.WMPLib.dll
WindowsMediaPlayerClass wmp = new WindowsMediaPlayerClass();
IWMPMedia mediaInfo = wmp.newMedia("myfile.wmv"); 

// write duration
Console.WriteLine("Duration = " + mediaInfo.duration);
// write named attributes
for (int i=0; i<mediaInfo.attributeCount; i++) {
Console.WriteLine(mediaInfo.getAttributeName(i) + " = " +  mediaInfo.getItemInfo(mediaInfo.getAttributeName(i)) );
}

How to get the Interop.WMPLib.dll

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜