Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portrait video is rotated by 90 degrees counter-clockwise after using samples #85

Open
devingDev opened this issue Apr 11, 2018 · 1 comment

Comments

@devingDev
Copy link

devingDev commented Apr 11, 2018

Hi, using the samples I tried transcoding, for example using Cut Video . I opened a video I had recorded in portrait mode with my other custom app. When you view the video in a mediaplayer it shows correctly in portrait mode!
Now when I press cut and it transcodes and outputs a file the video that was output is rotated by 90 degrees counter-clockwise!
Its the samples so I did not do custom stuff in there and I saw this piece of code which should make the output retain the original orientation in "ComposerTranscodeCoreActivity" class :

` protected void setTranscodeParameters(org.m4m.MediaComposer mediaComposer) throws IOException {

    mediaComposer.addSourceFile(mediaUri1);
    int orientation = mediaFileInfo.getRotation();
    mediaComposer.setTargetFile(dstMediaPath, orientation);

    configureVideoEncoder(mediaComposer, videoWidthOut, videoHeightOut);
    configureAudioEncoder(mediaComposer);
}`

Additionally landscape videos do not seem to get rotated and show correctly after transcoding.

@devingDev
Copy link
Author

So I tried the cutter again. When I input a video recroded from screen (with DU Recorder app) I have no problems (except it saying missing audioformat)

When i use the camera app to record and open that file it 1) displays wrongly on the last activity where you press start (rotated by -90 degrees) and 2) the output is very weird , it has big black borders? and the original video is small in the middle taking up only 50% space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant