MediaInfo sample
The MediaInfo sample is a console application that demonstrates how you can use the MediaItem class to extract media and metadata information from a media file. To use it, just run the built application (MediaInfo.exe) at a command prompt with the full path of a media file as the parameter, as shown in the following example.
MediaInfo.exe "c:\users\Public\Videos\Sample Videos\Bear.wmv"
On execution, the sample queries the MediaItem class for information, such as the media type (audio, video, or both), video frame size, frame rate, aspect ratio, and so on. It also queries for supported metadata tags. The following is typical output (from the "Bear.wmv" movie included with Windows Vista).
Type: Audio/Video
Video Information:
Frame Size: 720 x 480
Frame Rate: 29.97p
Aspect Ratio: 4x3
Duration: 00:00:12.6450000
Metadata "WM/SharedUserRating" (1/2): "75"
Metadata "Description" (2/2): "Courtesy of National Geographic. Used by Permission."
© 2011 Microsoft Corporation. All rights reserved.