2

Having a wma file, how can one parse the header using c#?

The purpose is to find the Key ID in the Content Encryption Object (that forms a part of the DRM license). Do you use the WM Format SDK or WM rights manager?

Bogdan Gavril MSFT
  • 20,615
  • 10
  • 53
  • 74

3 Answers3

1

WMA files are in the ASF format. You can download the ASF specification from microsoft.

Wim Coenen
  • 66,094
  • 13
  • 157
  • 251
1

There are sample code included in the Microsoft Media Format 11 SDK that display how to read headers from the ASF file format .

Good Luck!

Tomas Vinter
  • 2,690
  • 8
  • 36
  • 45
0

There is a WindowsMediaPlayer class in the framework. It can open asf files and read particular header flags (like prebuffer time), that other libraries (taglib) do not read.

Bogdan Gavril MSFT
  • 20,615
  • 10
  • 53
  • 74
  • 1
    Can you link to the class? I can find a [`System.Windows.Media.MediaPlayer`](http://msdn.microsoft.com/en-us/library/ms635239.aspx) class but that doesn't seem to be what you are talking about. – Wim Coenen Mar 06 '11 at 11:47