Front Camera Mirror Video Android - android-camera

I captured the video in front camera using MediaRecorder. It was mirrored. For image I used matrix.preScale() method to reverse the image. But for video I can't reverse it.
if (!camera.getConfig().isFaceCamera)
{
//For Back camera
mediaRecorder.setOrientationHint(90);
}
else
{
//For Front camera
mediaRecorder.setOrientationHint(270);
}

You can flip the video during playback. You cannot tweak MediaRecorder to flip the video. You can set an orientation hint, to indicate whether you hold the device in Portrait or Landscape orientation. See also https://stackoverflow.com/a/47249032/192373.

Related

Correcting Video Orientation in iOS

I am developing a video app in which user can merge different videos present in Asset Library. I am able to join the videos but I am facing the orientation issues.
For example, if a video is landscape right and other is landscape left, the second video will be joined upside down. Moreover, I have tried different codes available at stackExchange, however if i apply those codes to portrait videos, they can be transformed to landscape right but leaving black margins on the sides.
Is there any way that when I select a video to be inserted in my project, first its orientation should be checked, if it is other then landscape right, it should be rotated accordingly and in the end if the original video was portrait, the video should be resized as the native player do when we play a video in full screen mode.
Thanks in advance.

How to know the orientation of video in Objective-C?

I am developing an app in which I am taking a video from photo-library.
the video may be taken in portrait or in landscape mode.
I want to know the orientation of video so that based on that i can rotate stand play it in MPMoviePlayerController.
I did try it with AVAssetImageGenerator but its taking time and sometimes not generating image as required.

AVCapture not working well with retina screen

I am trying to use AVCapture in my app to capture the image and post it to a server, but I have a problem with this framework:
With a normal iPhone screen, this framework work very well, but with a retina screen, the AVCamera doesn't work well: The iPhone's video is zooming in to the target higher than the camera, so my camera is too close to the object I want to shoot.
I researched this and saw that the retina device's default camera has this problem too. The image camera and the video camera have different scale zooming, and the AVCamera probably uses the video camera so the target is higher than the image camera. But I want to take the picture with the image camera with AVCapture, how can i do it?

iPhone movie recording and playing in wrong orientation

In my application I want to record a movie using the AVFoundation classes in the landscape (button right) orientation mode.
I set the camera preview layer orientation layer to the landscape orientation and everything looks as it should in the preview.
I record the video using the AVCaptureMovieFileOutput class.
BUT when I play the movie with MVMoviePlayer the video is shown as if I recorded it in portrait mode ! (though the player's interface is displayed in the right landscape orientation as it should)
It seems like the preview layer orientation only affects the view and not what being recorded by the camera.
So how can I record the movie so it will record with the right orientation ?
Thanks
BTW
I use the front camera for the recording
I still have this same problem. Only happens when recording with the front camera on iPhone 4. A recording made with the iPad 2's front camera plays back fine.
I also tried rotating the movie view while playing back, but somehow the transform property of the MPMoviePlayerController.view is ignored, or interpreted strangely (I can only get the playback to flip horizontally, but the image stays 90 degrees rotated...).
Any progress on this?

iPhone : How to get the access to the default quicktime player that is launched?

I am loading a YouTube video link in UIWebView and when I click the play button, it launches the Quicktime player and plays the video in it. The issue here is that the default orientation of the Quicktime player is Portrait--I want it to be in Landscape mode.
Even though my base view and the webview are both in landscape mode, Quicktime player still gets launched in portrait mode.
I thought I could get the access to the default quicktime player and change its orientation to landscape.
May be this is not the case, but what about intercepting the click on the link and play the video using mpmovieplayercontroller?
That's only a suggestion and probably not a real answer to your problem.
Good luck!