How can I rotate a mediarecorder video?

Source: Internet
Author: User

================================= Problem description ========================== =
In the latest project, the camera is installed at 90 degrees with the mobile phone, and the video is recorded at mediarecorder or in the direction of the camera instead of the mobile phone. The video is rotated at 90 degrees, I tried many methods and did not use them. Mediarecorder. setorientationhint has no effect and is not implemented in the underlying authordriver; camera. parameters. setrotation and then camera. setparameters and mediarecorder. setcamera does not work either. Do you know the solution? The code is roughly as follows:
Camera mcameradevice = camera. Open (camera_id );
Camera. Parameters mparameters = mcameradevice. getparameters ();
Mparameters. setrotation (90 );
Mcameradevice. setparameters (mparameters );
Mediarecorder mmediarecorder = new mediarecorder ();
Mmediarecorder. setcamera (mcameradevice );
Mmediarecorder. setorientationhint (90 );
......
Mmediarecorder. Prepare ();
=============================== Solution 1 ========================== ===
In the camera driver layer, you rotate the captured data buffer according to the orientation of gsensor.

How can I rotate a mediarecorder video?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.