title: C#: Retrieve Video Codec Information from a WMV file
body: <p>I am having a hard time retrieving the video codec information from a WMV file.  I am using .Net 2.0 in C# (I know it is old.. but it is required).  I have looked in to using DirectShowLib amoungst other things, although I just can not find where to locate this information.</p>
  
  <p>For Reference, Here is a picture of what I am looking to obtain:  <a href="http://imgur.com/yNSKo" rel="nofollow">http://imgur.com/yNSKo</a></p>
  
  <p>I would like to avoid using 3rd party dll's, but if I must I will.  If anyone could help, I would greatly appreciate the information!</p>
  
  <p>Here is some code (although I do not think it is worth its weight in salt):</p>
  
  <pre><code>        WindowsMediaPlayer wmp = new WindowsMediaPlayer();
          IWMPMedia mediaInfo = wmp.newMedia(fileName);
          MessageBox.Show(mediaInfo.getItemInfo("WM/Codec"));
  </code></pre>