From: "santosh jha"
Post by santosh jhaHi friends I have some video file in different format
like .AVI,.WMV,MPEG,DAT etc I want to get the metadata
Like Bit Rate ,Duration ,File size,Author etc,.The path
of the movie file is stored in data base Or will be given
by user ....
This time I am trying to use Windows media SDK11 any help
.... OR any way to fetch Metadata from media file.
The WMF runtime only supports WMV (hence the name).
Each file type requires a specialized parser. DirectShow
(which is a generic framework) can help to some extent, but
it may end up being more complicated and limited than using
specialized code.
There are 2 sets of metadata you seem interested in: file
properties (bitrate, duration...) and user metadata
(author...).
The WMF runtime can extract both sets from WMV/WMA/ASF and
MP3 files.
For AVI and WAV, the AVIFile or mmio APIs can help you
extract the file properties and help you extract the info
chunks that contain the user metadata (from which you must
extract the metadata yourself). But frankly, the AVI and WAV
syntax is so simple that it is easier to write your own
parser than to use the AVIFile or mmio functions.
MPEG is a whole different world and it makes a lot of
difference what set of metadata you want (for example, user
matadata does not exist in MPEG1/2 files unless you use some
non-standard syntax and some file properties are not well
defined, like duration or bitrate). It also makes a lot of
difference what you mean by MPEG: MPEG-1 system (MPG),
MPEG-2 program (MPG), MPEG-2 transport (M2TS), MPEG-1/2
audio (MPA/MP1/MP2), MPEG-1 video, MPEG-2 video, MP4,
MPEG-4/ASP video, MPEG-4/AVC video, AAC audio...
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm