5

When I record video using MediaRecorder in portrait mode, video recorded in landscape mode ,

I have tried for mMediaRecorder.setOrientationHint(90); and mServiceCamera.setDisplayOrientation(90); but it is not working

Mahesh
  • 2,862
  • 2
  • 31
  • 41

1 Answers1

0

There's not a good way to do this for older API levels.

If you're using >=14, you can use Media Effect calls to change the orientation. Instructions for its use can be found in that link. You'll need a valid OpenGL context to use with it, so it's slightly more complicated than a simple camera app.

You'll want to use EFFECT_ROTATE, most likely.

Community
  • 1
  • 1
Geobits
  • 22,218
  • 6
  • 59
  • 103