views:

765

answers:

2

I am looking for a nice wrapper for extracting media file attributes dependent of file type. I am creating a bit of a generic media library that can handle video, audio, images etc. They are not just .wmv or .mp3, i would like to be able to support various formats and dont want to pigeon hole myself to an sdk like WMP SDK that seem to only support MS codecs. I have seen small write ups on a VLC wrpper that is in dev but not quite mature yet.

so basically I would like to be able to point at a file and extract what it is. music, image, video, and then get the meta data on top of it resolution, fps, bitrate, codec if possible etc, etc being artist, album song, this i realize not be always possible.

Cheers in advance

A: 

You can use the IFilter interface which was design for Windows Desktop search, there are already implementation of the interface for MP3, WMV, JPEG.
You will need to act as an IFilter host load IFilter implementation and feed them the files, not simple but not too complicated.

Shay Erlichmen
I am trying to avoid implemeting all the attributes of a media file and would like to see something that can report on it.class File{}class MediaFile : File{ int resolutionx int resolutiony}class Video : MediaFile{ decimal FPS }ETC.....
Brandon Grossutti
+2  A: 

Try MediaInfo, should do what you want it to.

Stefan Moser
I actually found that last night as well, and the guys from media browser built a little wrapper around the unmanaged portion, thanks
Brandon Grossutti
for people looking for more info goto http://mediainfo.sourceforge.net/en/Download and for implementations there's some great source here at http://videobrowser.googlecode.com/svn/trunk , these guys in their project have also wrapped some helpful utilities like frame snapshotting
Brandon Grossutti