Closed daniloercoli closed 7 years ago
video rotation fix works. How to handle text overlay rotation in relation to video rotation fix?
@smackd40 +1, this works when just translating, but not when applying a filter.
Ok, just add
int orientation = mediaFileInfo.getRotation(); mediaComposer.setTargetFile(dstMediaPath, orientation);
on setTrasncodeParameter method on the ComposerVideoEffectCoreActivity and will keep the orientation.
I am using the samples and for example when I use Cut Video it will rotate the video by 90 degrees when I use a video I had recorded before. The video was shot in portrait mode and looking at it it shows correctly. But after using Cut video it is rotated by 90 degrees counter-clockwise.
When I use a landscape recorded video it seems to work though.. very weird.
As this is a sample I assume it uses the class ComposerTranscodeCoreActivity which calls this:
` protected void setTranscodeParameters(org.m4m.MediaComposer mediaComposer) throws IOException {
mediaComposer.addSourceFile(mediaUri1);
int orientation = mediaFileInfo.getRotation();
mediaComposer.setTargetFile(dstMediaPath, orientation);
....
} ` so it should be set correctly but it is not.
Fix #64 and upgrade Gradle and Gradle wrapper