Open nkunadeveloper opened 6 years ago
could you please give more details on how to use exifinterface to solve this
i don't know how to reach them but i wrote a code that can solve this issues if they implement it in BaseMediaCodecVideoCompressor.java -> func initOutputVideoMediaFormat() just after retrieving height and width of the video
int rotationValue = trackInfo.getVideoMediaFormat().getInteger(MediaFormat.KEY_ROTATION);
if (Build.VERSION.SDK_INT > 20) {
if (rotationValue == 90) {
int temp = height;
height = width;
width = temp;
rotationValue = 0;
rotateRender = 270;
} else if (rotationValue == 180) {
rotateRender = 180;
rotationValue = 0;
} else if (rotationValue == 270) {
int temp = height;
height = width;
width = temp;
rotationValue = 0;
rotateRender = 90;
}
}
Landscape videos work fine but portrait videos get distorted ...I think it's swapping the width and height. Using ExifInterface to check orientation should resolve this...please fix @tcking