VideoProperties VideoProperties VideoProperties VideoProperties VideoProperties Class


Provides access to the video-related properties of an item (like a file or folder).

public : sealed class VideoProperties : IStorageItemExtraProperties
struct winrt::Windows::Storage::FileProperties::VideoProperties : IStorageItemExtraProperties
public sealed class VideoProperties : IStorageItemExtraProperties
Public NotInheritable Class VideoProperties Implements IStorageItemExtraProperties
// This class does not provide a public constructor.

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


This example demonstrates how to retrieve properties of a file, including video properties like Year and Rating.

    StorageFile file = rootPage.sampleFile;
    if (file != null)
        StringBuilder outputText = new StringBuilder();

        // Get video properties
        VideoProperties videoProperties = await file.Properties.GetVideoPropertiesAsync();
        outputText.AppendLine("Year: " + videoProperties.Year);
        outputText.AppendLine("Rating: " + videoProperties.Rating);
// Handle errors with catch blocks
catch (FileNotFoundException)
 // For example, handle a file not found error

var file = SdkSample.sampleFile;
if (file !== null) {
    var outputDiv = document.getElementById("output");

    // Get video properties (videoProperties) {
        outputDiv.innerHTML += "Year: " + videoProperties.year + "<br/>";
        outputDiv.innerHTML += "Rating: " + videoProperties.rating + "<br/>";
    // Handle errors with an error function
    function (error) {
       // Handle errors encountered while retrieving properties

After GetVideoPropertiesAsync completes, videoProperties gets a VideoProperties object.

In the example, file contains a StorageFile that represents the file to retrieve properties for.


You can access a VideoProperties object asynchronously using the getVideoPropertiesAsync method from the Properties property of an item (like a file of folder), or synchronously using the VideoProperties property if it is available. You can get a VideoProperties object using any of the following methods and properties:


Properties that are get or set using a property handler that is defined by another app (like Microsoft Word) may not be accessible. Instead, you can try to get these properties using a file query that is backed by the system index. For more information, see QueryOptions.

For more code samples about accessing properties, see the File access sample.


Bitrate Bitrate Bitrate Bitrate Bitrate

Gets the sum audio and video bitrate of the video.

Directors Directors Directors Directors Directors

Gets the directors of the video.

Duration Duration Duration Duration Duration

Gets the duration of the video.

Height Height Height Height Height

Gets the height of the video.

Keywords Keywords Keywords Keywords Keywords

Gets the collection of keywords associated with the video.

Latitude Latitude Latitude Latitude Latitude

Gets the latitude coordinate where the video was shot.

Longitude Longitude Longitude Longitude Longitude

Gets the longitude coordinate where the video was shot.

Orientation Orientation Orientation Orientation Orientation

Gets a VideoOrientation value that indicates how the video should be rotated to display it correctly.

Producers Producers Producers Producers Producers

Gets the producers of the video.

Publisher Publisher Publisher Publisher Publisher

Gets or sets the publisher of the video.

Rating Rating Rating Rating Rating

Gets or sets the rating associated with a video file.

Subtitle Subtitle Subtitle Subtitle Subtitle

Gets or sets the subtitle of the video.

Title Title Title Title Title

Gets or sets the title of the video.

Width Width Width Width Width

Gets the width of the video.

Writers Writers Writers Writers Writers

Gets the script writers for the video.

Year Year Year Year Year

Gets or sets the year that the video was shot or released.


RetrievePropertiesAsync(IIterable<String>) RetrievePropertiesAsync(IIterable<String>) RetrievePropertiesAsync(IIterable<String>) RetrievePropertiesAsync(IIterable<String>) RetrievePropertiesAsync(IIterable<String>)

Retrieves the specified properties associated with the item.

SavePropertiesAsync() SavePropertiesAsync() SavePropertiesAsync() SavePropertiesAsync() SavePropertiesAsync()

Saves all properties associated with the item.

SavePropertiesAsync(IIterable<IKeyValuePair<String, Object>>) SavePropertiesAsync(IIterable<IKeyValuePair<String, Object>>) SavePropertiesAsync(IIterable<IKeyValuePair<String, Object>>) SavePropertiesAsync(IIterable<IKeyValuePair<String, Object>>) SavePropertiesAsync(IIterable<IKeyValuePair<String, Object>>)

Saves the specified properties and values associated with the item.

See also