Source: StackOverflow
Question: How to detect orientation info of video?
Answer: For Api level 17+, we can extract the orientation of video: MediaMetadataRetriever
MediaMetadataRetriever m = new MediaMetadataRetriever();
m.setDataSource(path);
//Bitmap thumbnail = m.getFrameAtTime();
if (Build.VERSION.SDK_INT >= 17) {
String s = m.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION);
Log.d(TAG, "Rotation: " + s);
}