Discussion:
to get and edit metadata of a video file
(too old to reply)
santosh jha
2009-03-27 11:56:01 UTC
Permalink
Hi 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.

thanks
Alessandro Angeli
2009-03-27 20:28:12 UTC
Permalink
From: "santosh jha"
Post by santosh jha
Hi 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
santosh jha
2009-03-28 05:10:01 UTC
Permalink
Post by Alessandro Angeli
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.
Thanks for ur reply ....
I have two type of video files AVI and WMV. and I am totaly new about this
part that is media so please tell me the best by which i can fetch the
required data from both format. You have asked me to write own parser .I am a
web developer and just having little exp. so please give me some help to
write or ...
thanks

Loading...