I haven't done this before. The most simple purpose is just to get the time long information of the WMV file. If you study the WMV file format and then write the program to read it, it may be quite costless, not worth it. After studying WindowsMediaPlayer and found a simple method.
The following is a simple C # code.
WMPLib.WindowsMediaPlayerClass w; w = new WMPLIB.WindowsMediaPlayerClass (); WMPLib.IWMPMedia m = w.newMedia (str_wmvfilepath); MessageBox.Show (m.durationString); // m.duration is long double type
// The project needs to reference% system% / wmp.dll // can only read the time long information of the WMV file ************************************* *********** This is some of the relevant information I found. 1. About ID3HTTP: //www.id3.org/develop.html2, MP3 file format http://blog.9cbs.net/airhand/Articles/60005.aspx3, Microsoft provided Windows Media related download http: // msdn . Microsoft.com / library / default.asp? url = / downloads / list / winmedia.asp4, csharp windows media format sdk translationHttp: //www.thecodeproject.com/cs/media/manwmf.asp****** ***************************************