title: Creating thumbnail from video - choosing the image to be used during preview
body: <p>making a thumbnail from video using the picker is straight forward. However, when I press PLAY in the picker and then chose the video, my thumbnail is alway black. I was hoping it makes a screenshot - however this method only takes the first image of the video - and ONLY IF IT HASN'T BEEN PLAYED!</p>
  
  <p>How can I make a thumbnail at any position of the video?</p>
  
  <p>Here the "normal" code I use for thumbnails, where the video hasn't been played:</p>
  
  <pre><code>- (void) mediaPicker: (MPMediaPickerController *) mediaPicker didPickMediaItems: (MPMediaItemCollection *) mediaItemCollection {
  
      CGSize size = viewImage.size;
      CGFloat ratio = 0;
      if (size.width &gt; size.height) {
          ratio = 80.0 / size.width;
      } else {
          ratio = 80.0 / size.height;
      }
      CGRect rectForthumbnail = CGRectMake(0.0, 0.0, ratio * size.width, ratio * size.height);
  
      UIGraphicsBeginImageContext(rectForthumbnail.size);
  
      CGRect clipRect = CGRectMake(0.0, 0.0,74,74);
      [viewImage drawInRect:clipRect];
      dance.thumbnailImage = UIGraphicsGetImageFromCurrentImageContext();
      UIGraphicsEndImageContext();
  </code></pre>
  
  <p>After having pressed "PLAY", unfortunately, the created thumbnail is black (only shows the top of the iphone screen where the video roll and the current play position is displayed), the remaining of the thumbnail is always black. As said, in other cases it works well.</p>
  
  <p>Thanks very much!</p>