Metadata Properties for Media Files

This topic lists the most common metadata properties for media files.

Common Media Properties

The Shell property system defines a set of common metadata properties for all types of shell objects. A subset of these are applicable to media files. The following table lists the most common Shell properties for media. Media files might support additional properties not listed here. Also, not every file format supports every property listed. For a complete list of Shell properties, see Shell Properties.

PROPERTYKEY Shell Name Description Data Type
MFPKEY_Content_DLNA_Profile_ID None Digital Living Network Alliance (DLNA) profile identifier. VT_LPWSTR
PKEY_Audio_ChannelCount System.Audio.ChannelCount Number of audio channels. VT_UI4
PKEY_Audio_EncodingBitrate System.Audio.EncodingBitrate Average audio bit rate, in bits per second. VT_UI4
PKEY_Audio_Format System.Audio.Format Audio subtype (MF_MT_SUBTYPE) expressed as a string. VT_LPWSTR
PKEY_Audio_IsVariableBitRate System.Audio.IsVariableBitRate Indicates whether the audio stream uses variable bit-rate encoding. VT_BOOL
PKEY_Audio_PeakValue System.Audio.PeakValue Peak volume level of audio content. VT_UI4
PKEY_Audio_SampleRate System.Audio.SampleRate Audio sample rate in samples per second. Equivalent to the MF_MT_AUDIO_SAMPLES_PER_SECOND attribute in the media type. VT_UI4
PKEY_Audio_SampleSize System.Audio.SampleSize Number of bits per audio sample. Equivalent to the MF_MT_AUDIO_BITS_PER_SAMPLE attribute in the media type. VT_UI4
PKEY_Audio_StreamNumber System.Audio.StreamNumber Identifier of the audio stream. VT_UI4
PKEY_Author System.Author Author. VT_LPWSTR
PKEY_Comment System.Comment A comment attached to a file, typically added by a user. VT_LPWSTR
PKEY_Copyright System.Copyright Copyright information. VT_LPWSTR
PKEY_DRM_IsProtected System.DRM.IsProtected Indicates whether the content is protected using digital rights management (DRM). VT_BOOL
PKEY_Keywords System.Keywords Keywords. VT_LPWSTR
PKEY_Language System.Language Language. VT_LPWSTR
PKEY_Media_AuthorUrl System.Media.AuthorUrl URL of the author's website. VT_LPWSTR
PKEY_Media_AverageLevel System.Media.AverageLevel Average volume level of audio content. VT_UI4
PKEY_Media_ClassPrimaryID System.Media.ClassPrimaryID The string representation of a GUID that identifies the primary class of media. For valid values, see the documentation for the WM/MediaClassPrimaryID attribute. VT_LPWSTR
PKEY_Media_ClassSecondaryID System.Media.ClassSecondaryID The string representation of a GUID that identifies the secondary class of media. For valid values, see the documentation for the WM/MediaClassSecondaryID attribute. VT_LPWSTR
PKEY_Media_CollectionGroupID System.Media.CollectionGroupID The string representation of a GUID that identifies the collection group. VT_LPWSTR
PKEY_Media_CollectionID System.Media.CollectionID The string representation of a GUID that identifies the collection. VT_LPWSTR
PKEY_Media_ContentDistributor System.Media.ContentDistributor Distributor of the content. VT_LPWSTR
PKEY_Media_ContentID System.Media.ContentID The string representation of a GUID that identifies the collection. VT_LPWSTR
PKEY_Media_DateEncoded System.Media.DateEncoded Time when the content was encoded. VT_FILETIME
PKEY_Media_DateReleased System.Media.DateReleased Original release date. VT_LPWSTR
PKEY_Media_Duration System.Media.Duration Duration, in 100-nanosecond units. Equivalent to the MF_PD_DURATION attribute in the presentation descriptor. VT_UI8
PKEY_Media_DVDID System.Media.DVDID Digital video disc identifier (DVDID). VT_LPWSTR
PKEY_Media_EncodedBy System.Media.EncodedBy Name of the person or group that encoded the content. VT_LPWSTR
PKEY_Media_EncodingSettings System.Media.EncodingSettings Description of the settings used to encode the content. VT_LPWSTR
PKEY_Media_MCDI System.Media.MCDI Music CD identifier. This value is used to identify a CD. VT_LPWSTR
PKEY_Media_MetadataContentProvider System.Media.MetadataContentProvider Name of the metadata content provider. (For example, metadata might be provided by a commercial service.) VT_LPWSTR
PKEY_Media_Producer System.Media.Producer Name of the producer of the content. VT_LPWSTR
PKEY_Media_PromotionUrl System.Media.PromotionUrl URL of a website offering a promotion related to the content. VT_LPWSTR
PKEY_Media_ProviderRating System.Media.ProviderRating Rating of the content as assigned by the metadata content provider. VT_LPWSTR
PKEY_Media_ProviderStyle System.Media.ProviderStyle Style or genre of the content as assigned by the metadata content provider. VT_LPWSTR
PKEY_Media_Publisher System.Media.Publisher Publisher. VT_LPWSTR
PKEY_Media_SubTitle System.Media.SubTitle Subtitle. VT_LPWSTR
PKEY_Media_UniqueFileIdentifier System.Media.UniqueFileIdentifier A generic string that can be to identify the file. VT_LPWSTR
PKEY_Media_Writer System.Media.Writer Writer. VT_LPWSTR
PKEY_Media_Year System.Media.Year Year the content was published. VT_UI4
PKEY_Music_AlbumArtist System.Music.AlbumArtist Primary artist for the album. This attribute can be used to distinguish the primary artist for an album from an artist who collaborated on a particular track. VT_LPWSTR
PKEY_Music_AlbumTitle System.Music.AlbumTitle Album title. VT_LPWSTR
PKEY_Music_Artist System.Music.Artist Artist. VT_LPWSTR
PKEY_Music_BeatsPerMinute System.Music.BeatsPerMinute Beats per minute. VT_LPWSTR
PKEY_Music_Composer System.Music.Composer Composer. VT_LPWSTR
PKEY_Music_Conductor System.Music.Conductor Conductor. VT_LPWSTR
PKEY_Music_ContentGroupDescription System.Music.ContentGroupDescription Description of the content group (for example, boxed set or series). VT_LPWSTR
PKEY_Music_Genre System.Music.Genre Genre. VT_LPWSTR
PKEY_Music_InitialKey System.Music.InitialKey The initial key of the music. VT_LPWSTR
PKEY_Music_IsCompilation System.Music.IsCompilation Indicates whether the music file is part of a compilation. VT_BOOL
PKEY_Music_Lyrics System.Music.Lyrics Lyrics. VT_LPWSTR
PKEY_Music_Mood System.Music.Mood Mood. VT_LPWSTR
PKEY_Music_PartOfSet System.Music.PartOfSet The part number and the total number of parts in the set to which the file belongs, separated by a slash. VT_LPWSTR
PKEY_Music_Period System.Music.Period Period. VT_LPWSTR
PKEY_Music_TrackNumber System.Music.TrackNumber Track number. VT_UI4
PKEY_ParentalRating System.ParentalRating Parental rating. VT_LPWSTR
PKEY_ParentalRatingReason System.ParentalRatingReason Reasons for the assigned parental rating. VT_LPWSTR
PKEY_Rating System.Rating User rating. VT_UI4
PKEY_ThumbnailStream System.ThumbnailStream Thumbnail image. VT_STREAM
PKEY_Title System.Title Title. VT_LPWSTR
PKEY_Video_Compression System.Video.Compression Video subtype (MF_MT_SUBTYPE) expressed as a string. VT_LPWSTR
PKEY_Video_Director System.Video.Director Director. VT_LPWSTR
PKEY_Video_EncodingBitrate System.Video.EncodingBitrate Average video bit rate, in bits per second. VT_UI4
PKEY_Video_FourCC System.Video.FourCC The FOURCC of the video encoding format. Applies only if the video subtype can be expressed as a FOURCC value. VT_UI4
PKEY_Video_FrameHeight System.Video.FrameHeight Video frame height. VT_UI4
PKEY_Video_FrameRate System.Video.FrameRate Video frame rate, expressed as frames per second × 1000. VT_UI4
PKEY_Video_FrameWidth System.Video.FrameWidth Video frame width. VT_UI4
PKEY_Video_HorizontalAspectRatio System.Video.HorizontalAspectRatio The horizontal component of the pixel aspect ratio. (Equivalent to the numerator of the MF_MT_PIXEL_ASPECT_RATIO attribute in the media type.) VT_UI4
PKEY_Video_IsStereo System.Video.IsStereo Indicates whether the video stream contains stereo video content. VT_BOOL
PKEY_Video_StreamNumber System.Video.StreamNumber Identifier of the video stream. VT_UI4
PKEY_Video_TotalBitrate System.Video.TotalBitrate Total data rate for all video and audio streams, in bits per second. (Applies only to files with at least one video stream.) VT_UI4
PKEY_Video_VerticalAspectRatio System.Video.VerticalAspectRatio The vertical component of the pixel aspect ratio. (Equivalent to the denominator of the MF_MT_PIXEL_ASPECT_RATIO attribute in the media type.) VT_UI4


Media Sharing Properties

To make a media file compatible with the Media Sharing feature, the property handler should expose the following metadata properties. These properties enable the Media Sharing service to offer the proper options to transcode the content into different formats or bit rates.

  • MFPKEY_Content_DLNA_Profile_ID
  • PKEY_Audio_ChannelCount
  • PKEY_Audio_EncodingBitrate
  • PKEY_Audio_Format
  • PKEY_Audio_SampleRate (optional)
  • PKEY_Audio_SampleSize (optional)
  • PKEY_DRM_IsProtected (required for DRM content)
  • PKEY_Media_Duration
  • PKEY_Video_Compression
  • PKEY_Video_EncodingBitrate
  • PKEY_Video_FrameHeight
  • PKEY_Video_FrameRate (optional)
  • PKEY_Video_FrameWidth
  • PKEY_Video_TotalBitrate

The PKEY_DRM_IsProtected property is required if the content is protected using DRM. Otherwise, this property is optional.

The PKEY_Audio_SampleRate, PKEY_Audio_SampleSize, and PKEY_Video_FrameRate properties are optional. The Media Sharing service will expose them if they are available.

Properties in the PKEY_Audio_* group apply only to files with an audio stream, and properties in the PKEY_Video_* group apply only to files with a video stream.

Windows Media Format SDK Mappings

The ASF media source maps the following property keys to ASF header attributes. In some cases, the data types differ between the Shell property and the Format SDK attribute.

PROPERTYKEY Format SDK Attribute
PKEY_Audio_IsVariableBitRate IsVBR
PKEY_Audio_PeakValue PeakValue
PKEY_Author Author
PKEY_Comment Description
PKEY_Copyright Copyright
PKEY_DRM_IsProtected Is_Protected
PKEY_Keywords WM/Category
PKEY_Language WM/Language
PKEY_Media_AuthorUrl WM/AuthorURL
PKEY_Media_AverageLevel AverageLevel
PKEY_Media_ClassPrimaryID WM/MediaClassPrimaryID
PKEY_Media_ClassSecondaryID WM/MediaClassSecondaryID
PKEY_Media_CollectionGroupID WM/WMCollectionGroupID
PKEY_Media_CollectionID WM/WMCollectionID
PKEY_Media_ContentDistributor WM/ContentDistributor
PKEY_Media_ContentID WM/WMContentID
PKEY_Media_DateEncoded WM/EncodingTime
PKEY_Media_DateReleased WM/OriginalReleaseTime
PKEY_Media_EncodedBy WM/EncodedBy
PKEY_Media_EncodingSettings WM/EncodingSettings
PKEY_Media_MetadataContentProvider WM/Provider
PKEY_Media_Producer WM/Producer
PKEY_Media_PromotionUrl WM/PromotionURL
PKEY_Media_ProviderRating WM/ProviderRating
PKEY_Media_ProviderStyle WM/ProviderStyle
PKEY_Media_Publisher WM/Publisher
PKEY_Media_SubTitle WM/SubTitleDescription
PKEY_Media_UniqueFileIdentifier WM/UniqueFileIdentifier
PKEY_Media_Writer WM/Writer
PKEY_Media_Year WM/Year
PKEY_Music_AlbumArtist WM/AlbumArtist
PKEY_Music_AlbumTitle WM/AlbumTitle
PKEY_Music_Artist Author
PKEY_Music_BeatsPerMinute WM/BeatsPerMinute
PKEY_Music_Composer WM/Composer
PKEY_Music_Conductor WM/Conductor
PKEY_Music_ContentGroupDescription WM/ContentGroupDescription
PKEY_Music_Genre WM/Genre
PKEY_Music_InitialKey WM/InitialKey
PKEY_Music_IsCompilation WM/IsCompilation
PKEY_Music_Lyrics WM/Lyrics
PKEY_Music_Mood WM/Mood
PKEY_Music_PartOfSet WM/PartOfSet
PKEY_Music_Period WM/Period
PKEY_Music_TrackNumber WM/TrackNumber
PKEY_ParentalRating WM/ParentalRating
PKEY_ParentalRatingReason WM/ParentalRatingReason
PKEY_Rating WM/SharedUserRating
PKEY_ThumbnailStream WM/Picture
PKEY_Title Title
PKEY_Video_Director WM/Director


Media Metadata

Shell Metadata Providers