Trimming

To trim a file, you use TrimStartTime and TrimStopTime properties exposed by MediaTranscoder. The following code demonstrates:

async Task TrimUserSelectedFile(){  // Get a source MP4 file from the user  FileOpenPicker openPicker = new FileOpenPicker();  openPicker.FileTypeFilter.Add(".mp4");  StorageFile sourceFile = await openPicker.PickSingleFileAsync();  if (sourceFile != null)  {    // Get a target MP4 file from the user    FileSavePicker savePicker = new FileSavePicker();    savePicker.FileTypeChoices.Add("MP4 file", new string[] { ".mp4" });    StorageFile targetFile = await savePicker.PickSaveFileAsync();    if (targetFile != null)    {      // Just use the source format       MediaEncodingProfile ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.