Video Recorder Sample


Windows Phone 7.5, Windows Phone 8
video, Media, camera
Phone
en-US
12/14/2012

This sample demonstrates how to use the device camera to record video in your own app, including video preview, recording, and playback.

Learn how to use the device camera to record video in your own app. This sample demonstrates video preview, recording, and playback. It uses the FileSink class to write video to isolated storage, from which it can be played afterward. For detailed information about how this sample works, see How to record video in a camera app for Windows Phone.

You need to install Windows Phone SDK 7.1 to run this sample. To get started, go to the Windows Phone Dev Center.

To run the sample on the device

  1. Double-click the .sln file to open the solution.

  2. Press F5 to start debugging the app.

  3. When the app launches on the device, the UI provides the following app bar buttons for recording and playing video:

    • Record: Starts video recording.

    • Stop: Stops video recording or video playback, depending on the state of the app.

    • Play: Plays the recorded video. You must record a video before this button is available.

    • Pause: Pauses playback. This button is not available during preview or recording.

Note:

This sample is packaged as a Windows Phone 7.5 project. It can be converted to a Windows Phone 8 project, by changing the target Windows Phone OS version of the project. To create a Windows Phone 8 project, you must be running the Windows Phone SDK 8.0 on Visual Studio 2012. You can download the latest version of the SDK from http://dev.windowsphone.com/downloadsdk.

To convert the sample to a Windows Phone 8 project:

  1. Double-click the .sln file to open the solution in Visual Studio.

  2. Right-click the project in the Solution Explorer and select Properties. This opens the Project Properties window.

  3. In the Application tab of the Project Properties window, select Windows Phone OS 8.0 from the Target Windows Phone OS Version dropdown. A dialog will appear asking if you want to upgrade this project to Windows Phone OS 8.0.

  4. Select Yes to upgrade the project.