MediaMetadataRetriever retr = new MediaMetadataRetriever();
retr.setDataSource(mVideoPath);
String rotation = retr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION);
只找到上述代码在API 17 之后可以使用,那API 17之前该如何获取视频的方向?
大家讲道理2017-04-17 15:49:20
API 14 can get the length and width. If you need a lower version, you can only implement it yourself. However, the source code contains native code, so you can only consider using some third-party players. For example, Vitamio also has MediaMetadataRetriever that supports up to 2.1. Version