

StorageFile destination = await savePicker.PickSaveFileAsync() SavePicker.SuggestedFileName = "New Video" SavePicker.DefaultFileExtension = ".mp4" StorageFile source = await openPicker.PickSingleFileAsync() OpenPicker.SuggestedStartLocation = .VideosLibrary This example uses a FileOpenPicker and a FileSavePicker to allow the user to pick a source and a destination file. The way that your app determines the source and destination files for transcoding depends on your implementation.

In addition to the namespaces referenced by the default project template, you will need to reference these namespaces in order to transcode media files using the code in this article. In that case, the re-encoded file might use the same codec as the original file, but it would have a different encoding profile. Or, you might convert a high-definition video file to a lower resolution. For example, you might convert a Windows Media file to MP4 so that it can be played on a portable device that supports MP4 format. This is usually done by decoding and then re-encoding the file. Transcoding is the conversion of a digital media file, such as a video or audio file, from one format to another. You can use the APIs to transcode video files from one format to another.
