title: How to determine video width and height on Android
body: <p>I have a video file and I want to get width and height of video. I don't want to play it, just to get size.
  I've tried to use MediaPlayer:</p>
  
  <pre><code>MediaPlayer mp = new MediaPlayer();
  mp.setDataSource(uriString);
  mp.prepare();
  int width = mp.getVideoWidth();
  int height = mp.getVideoHeight();
  </code></pre>
  
  <p>but it returns 0 for width and height, because VideoSizeChangedEvent didn't fire yet.
  How can I get width and height of video?</p>
  
  <p>UPD: I need API version 7</p>