Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change video orientation in MediaRecorder to portrait

When I record video by MediaRecorder, it always records in landscape mode, regardless of real device orientation. How to force MediaRecorder/Camera use real orientation ?

like image 418
Vladimir Berezkin Avatar asked Oct 10 '10 16:10

Vladimir Berezkin


1 Answers

refer to Camera.Parameters.setRotation() for more information.

There is an example there and instead of calling setRotation(rotation) try to call mediaRecorder.setOrientationHint(rotation) when recording video.

like image 86
artsylar Avatar answered Sep 17 '22 13:09

artsylar