MediaMetadataRetriever extractMetadata method returning null
<p>I am using MediaMetadataRetriever class to get metadata about a video but while getting the information about the height it is returning null and for width it is returning zero.
Here is my code:</p>

<pre><code>MediaMetadataRetriever metaRetriever = new MediaMetadataRetriever();
String width =  metaRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH);
String height = metaRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT);
</code></pre>

<p>Is there any other way to get width and height of a video?</p>
