ContainerEncodingProperties ContainerEncodingProperties ContainerEncodingProperties ContainerEncodingProperties ContainerEncodingProperties Class


Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Prerelease APIs are identified by a Prerelease label.

[Contains prerelease APIs.]
Describes a media container format.

public : sealed class ContainerEncodingProperties : IContainerEncodingProperties, IMediaEncodingProperties
struct winrt::Windows::Media::MediaProperties::ContainerEncodingProperties : IContainerEncodingProperties, IMediaEncodingProperties
public sealed class ContainerEncodingProperties : IContainerEncodingProperties, IMediaEncodingProperties
Public NotInheritable Class ContainerEncodingProperties Implements IContainerEncodingProperties, IMediaEncodingProperties
var containerEncodingProperties = new containerEncodingProperties();
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


Media files usually contain at least some of the following elements:

  • File headers that describe the number of streams, the format of each stream, and so on.
  • An index that enables random access to the content.
  • Metadata that describes the content (for example, the artist or title).

The term media container describes the entire package of media data, file headers, indexes, and metadata. The reason for using the term container rather than file is that some container formats are designed for live broadcast. A container might be generated in real time, without ever being stored as a file.

An early example of a media container is the AVI file format. Other examples include MP4 and Advanced Systems Format (ASF). Containers can be identified by file name extension (for example, ".mp4") or by MIME type.


ContainerEncodingProperties() ContainerEncodingProperties() ContainerEncodingProperties() ContainerEncodingProperties() ContainerEncodingProperties()

Creates a new instance of the ContainerEncodingProperties class.

public : ContainerEncodingProperties()
ContainerEncodingProperties() const;
public ContainerEncodingProperties()
Public Sub New()
var containerEncodingProperties = new containerEncodingProperties();


Properties Properties Properties Properties Properties

Gets additional format properties for the media container.

public : MediaPropertySet Properties { get; }
MediaPropertySet Properties();
public MediaPropertySet Properties { get; }
Public ReadOnly Property Properties As MediaPropertySet
var mediaPropertySet =;
MediaPropertySet MediaPropertySet MediaPropertySet

A property set that contains format properties.


For information on working with a property set collection, see PropertySet.

Subtype Subtype Subtype Subtype Subtype

Gets or sets the subtype of the media container.

public : Platform::String Subtype { get; set; }
winrt::hstring Subtype(); void Subtype(winrt::hstring subtype);
public string Subtype { get; set; }
Public ReadWrite Property Subtype As string
var string = containerEncodingProperties.subtype;
containerEncodingProperties.subtype = string;
string string string

The subtype.


The value can be the string representation of a GUID in canonical form, or one of the predefined values listed in the following table.

"3GP"3GP file.
"AC3"AC-3 audio.
"ADTS"Audio Data Transport Stream (ADTS) stream.
"MP3"MPEG Audio Layer-3 (MP3).
"MPEG2PS"MPEG-2 program stream.
"MPEG2TS"MPEG-2 transport stream.
"MPEG4"MP4 file container.


The string values returned by the MediaEncodingSubtypes properties may not use the same letter casing as AudioEncodingProperties.Subtype, VideoEncodingProperties.Subtype, ContainerEncodingProperties.Subtype, and ImageEncodingProperties.Subtype. For this reason, if you compare the values, you should use a case-insensitive comparison or use hardcoded strings that match the casing returned by the encoding properties.

Type Type Type Type Type

Gets the format type.

public : Platform::String Type { get; }
winrt::hstring Type();
public string Type { get; }
Public ReadOnly Property Type As string
var string = containerEncodingProperties.type;
string string string

The format type. For media containers, the format type is "Container".


Copy() Copy() Copy() Copy() Copy()

Prerelease. Creates a copy of the ContainerEncodingProperties object.

public : ContainerEncodingProperties Copy()
ContainerEncodingProperties Copy() const;
public ContainerEncodingProperties Copy()
Public Function Copy() As ContainerEncodingProperties
var containerEncodingProperties = containerEncodingProperties.copy();
Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.17095.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)