Compartilhar via


Capturing or rendering audio, video, and images (XAML)

[ This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation ]

This section contains information on how to capture photos and videos from a capture device, such as a webcam, and how to render audio streams in an app.

The control to capture media is CaptureElement. This is defined in the Windows.UI.Xaml.Controls namespace. Windows.Media.Capture contains the majority of the API used in capturing media.

For samples that use media capture, see the Media capture sample and the other samples listed in the Samples section in the Related topics below.

If you’d like to try working with media capture and other key features, download the hands-on labs for Windows 8. These labs provide a modular, step-by-step introduction to creating a sample app in the programming language of your choice (JavaScript and HTML or C# and XAML).

In this section

Topic Description

Quickstart: capturing video by using the MediaCapture api

This topic shows you how to capture video to a file using the Windows.Media.Capture API. You can use the Windows.Media.Capture API to control the asynchronous capture operation, select an encoding profile and send the resulting video to a file.

How to preview video from a webcam

You can preview live video from a camera or webcam by using a CaptureElement object and the Windows.Media.Capture API.

How to rotate captured video

You can rotate video captured from a camera by using the SetPreviewRotation and SetRecordRotation methods on the MediaCapture class.

How to add video stabilization effect to captured video

The VideoStabilization effect can help reduce shakiness in video, such as from a hand-held camera.

How to add a slow motion effect to captured video

This topic shows you how to add a slow-motion effect to video. This effect can be added during live capture or added as a post-processing step during transcoding.

Quickstart: recording the screen with ScreenCapture

You can capture the audio and video playing on the device by using the ScreenCapture object and the Windows.Media.Capture API.

Quickstart: capturing a variable photo sequence

This topic shows you how to capture a variable photo sequence, which allows you to capture multiple frames of images in rapid succession and configure each frame to use different focus, ISO, exposure, and exposure compensation settings.

 

Roadmaps

Roadmap for Windows Runtime apps using C# and Visual Basic

Roadmap for Windows Runtime apps using C++

Designing UX for apps

Samples

Media capture sample

Camera capture UI sample

Camera options UI sample

Device enumeration sample

Media extension sample

Real-Time communication sample

Hands-on labs for Windows 8

Reference

Windows.Media

Windows.Media.Capture

Windows.Media.Devices

Windows.Media.MediaProperties

Other resources

Supported audio and video formats

Optimize media resources