Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: Query mediafile for some properties (artist, title, etc)

HTVi
TV Discussion Newsgroups

Query mediafile for some properties (artist, title, etc)
DDN 6/7/2007 8:41:01 AM
Anybody hi there!

I'm in frustration....I need to query for bitrate,artist,title, etc
information of mediafile (mostly mp3) in my .NET 2.0 application (winforms)
Looked at the Windows Media Player SDK documentation and see two ways:

1. add my mediafile to WMP media library and after that query its attributes
2. start playing my mediafile and immediately query attributes and stop
playing


All two ways are no good in my opinion (and frustrating me):

1. because we may do not have write access to user medialibrary (to perform
cycle "add->query info->delete")

2. because user workstation may haven't got any sound devices at all and
playing will fail. Second it's be very funny - start playing file to query
his properties



Is any other ways are exist? I.E.:

.........

AxMediaPlayer.URL="C:\\myfile.mp3";

AxMediaPlayer.currentMedia.getItemInfo("Bitrate");

..........

Re: Query mediafile for some properties (artist, title, etc)
Glyn Davies <sgd.work[ at ]googlemail.com> 6/7/2007 8:52:58 AM
DDN wrote:
[Quoted Text]
> Anybody hi there!
>
> I'm in frustration....I need to query for bitrate,artist,title, etc
> information of mediafile (mostly mp3) in my .NET 2.0 application (winforms)
> Looked at the Windows Media Player SDK documentation and see two ways:
>
> 1. add my mediafile to WMP media library and after that query its attributes
> 2. start playing my mediafile and immediately query attributes and stop
> playing
>
>
> All two ways are no good in my opinion (and frustrating me):
>
> 1. because we may do not have write access to user medialibrary (to perform
> cycle "add->query info->delete")
>
> 2. because user workstation may haven't got any sound devices at all and
> playing will fail. Second it's be very funny - start playing file to query
> his properties
>
>
>
> Is any other ways are exist? I.E.:
>
> ........
>
> AxMediaPlayer.URL="C:\\myfile.mp3";
>
> AxMediaPlayer.currentMedia.getItemInfo("Bitrate");
>
> .........
>

You want "Windows Media Format 11 SDK"
http://msdn2.microsoft.com/en-us/windowsmedia/bb190309.aspx

You may have to wrap some stuff up using COM Interop, but there is some
managed sample code.

Glyn

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen