Android Camera recording video but plays upside down

后端 未结 10 1571
南旧
南旧 2020-12-10 04:42

I record a video using the below code and it records perfectly, but when it plays the video, it plays it upside down.

I tried settings mrec.setOrientationHint(

10条回答
  •  感动是毒
    2020-12-10 04:50

    Finally I have found out that Motorola phones have problem in playing the video which is recorded in portrait mode.

    In order to overcome the rotation of the video, the best solution I have adopted was to upload the video to the server and run ffmpeg on using the command ffmpeg -i input.mp4 -c:v mpeg4 -c:a copy -c:s copy -vf "transpose=2" output.mp4

    If you feel there was another way, please do let me know.

提交回复
热议问题