0

I'm building a custom camera to record video. The camera displays the preview correctly and records the video correctly as well. The problem is with the saved video. The recording is in the wrong orientation(sideways), and I know it's being recorded this way because I'm using a third-party app to playback the video. I've solved it temporarily with this line:

mRecorder.setOrientationHint(270);

However, I'm not sure that this will work on all devices. My question is, what's a more reliable solution to my problem?

Edit

This problem only happens when I record in portrait, when I record in landscape, the orientation is already correct and I don't have to use setOrientationHint

Edit 2

That question is about fixing the preview orientation, I've already solved that problem. My question is how to fix the recording orientation i.e. the orientation of the saved video. –

Ninjaman494
  • 180
  • 3
  • 10
  • Possible duplicate of [How to set Android camera orientation properly?](http://stackoverflow.com/questions/4645960/how-to-set-android-camera-orientation-properly) – Mahendran Sakkarai Feb 07 '17 at 06:28
  • That question is about fixing the preview orientation, I've already solved that problem. My question is how to fix the recording orientation i.e. the orientation of the saved video. – Ninjaman494 May 25 '17 at 19:47

0 Answers0