title: StorageItemThumbnail to BitmapImage converter fails with MediaCapture mp4
body: <p>I am using a ValueConverter to get the thumbnail for an m4 file that was recorded by directly with WinRT's <strong>MediaCapture</strong>. After much debugging and alternate approaches, I've settle on the converter code below. I am getting the following error <code>The component cannot be found. (Exception from HRESULT: 0x88982F50)</code> on the <strong>GetThumbnailAsync</strong> method.</p>
  
  <p>I have confirmed that the thumbnail <strong>is</strong> being shown for the video in the Xbox Video app and the file explorer app when I use CopyTo(KnownFolders.VideosLibrary).</p>
  
  <p>The converter seems to work fine when it's an external video file, but not with one of my app's mp4s. Is there something wrong with my converter or can you reproduce this?</p>
  
  <p><strong>SEE UPDATE 1</strong> I try to get the thumbnail when the file is first created, same error occurs.</p>
  
  <pre><code>public class ThumbnailToBitmapImageConverter : IValueConverter
  {
      readonly StorageFolder localFolder = ApplicationData.Current.LocalFolder;
      BitmapImage image;
  
      public object Convert(object value, Type targetType, object parameter, string language)
      {
          if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
              return "images/ExamplePhoto2.jpg";
  
          if (value == null)
              return "";
  
          var fileName = (string)value;
  
          if (string.IsNullOrEmpty(fileName))
              return "";
  
          var bmi = new BitmapImage();
          bmi.SetSource(Thumb(fileName).Result);
          return bmi;
      }
  
      private async Task&lt;StorageItemThumbnail&gt; Thumb(string fileName)
      {
          try
          {
              var file = await localFolder.GetFileAsync(fileName)
                  .AsTask().ConfigureAwait(false);
              var thumbnail = await file.GetScaledImageAsThumbnailAsync(ThumbnailMode.ListView, 90, ThumbnailOptions.UseCurrentScale)
                  .AsTask().ConfigureAwait(false);
              return thumbnail;
          }
          catch (Exception ex)
          {
              new MessageDialog(ex.Message).ShowAsync();
          }
          return null;
      }
  
      public object ConvertBack(object value, Type targetType, object parameter, string language)
      {
          throw new NotImplementedException();
      }
  }
  </code></pre>
  
  <p>UPDATE 1</p>
  
  <p>I decided to go back to where I save the video to a file and grab the thumbnail there, then save it to an image for use later. I get the same error, here is the code for grabbing and saving the thumbnail after the video is saved:</p>
  
  <pre><code>var thumb = await videoStorageFile.GetThumbnailAsync(ThumbnailMode.ListView);
  var buffer = new Windows.Storage.Streams.Buffer(Convert.ToUInt32(thumb.Size));
  var thumbBuffer = await thumb.ReadAsync(buffer, buffer.Capacity, InputStreamOptions.None);
  using (var str = await thumbImageFile.OpenAsync(FileAccessMode.ReadWrite))
  {
        await str.WriteAsync(thumbBuffer);
  }
  </code></pre>