I am working on a rotation of video frames to any degree between 0 to 360 for that I used OpenGL to rotate frames and get rotate the video to any degrees but the problem is after saving the video its view is stretched like this 45 degrees link rotated video sample frame image with stretch corner but I want this result rotated video frame image with a perfect 45 degrees code sample that I'm using please check
import android.opengl.Matrix;
private float[] MVPMatrix = new float[16];
Matrix.setRotateM(MVPMatrix, 0, 45, 0, 0, -1.0f);
please help me to find out the perfect solution, Any help will be appreciated