title: Frame from Videostream
body: <p>I need to get frame from this videostream: <a href="http://tcp://62.109.15.84:1300" rel="nofollow">http://tcp://62.109.15.84:1300</a></p>
  
  <p>I used this method, but it isn't suitable for videostrams.</p>
  
  <pre><code>public static Bitmap getVideoFrame(Context context, Uri uri) {
      MediaMetadataRetriever retriever = new MediaMetadataRetriever();
      try {
          retriever.setDataSource(uri.toString(),new HashMap&lt;String, String&gt;());
          return retriever.getFrameAtTime(50000000,MediaMetadataRetriever.OPTION_NEXT_SYNC);
      } catch (IllegalArgumentException ex) {
          ex.printStackTrace();
      } catch (RuntimeException ex) {
          ex.printStackTrace();
      } finally {
          try {
              retriever.release();
          } catch (RuntimeException ex) {
          }
      }
      return null;
  }
  </code></pre>