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?
精彩评论