0

When I record video, it always records in landscape mode, regardless of real device orientation. How to force UIImagePicker to set the Portrait orientation?

AGAIN, UIImagePicker is used -- not AVFoundation recording classes.

1) The various properties (movie source type, dimensions, duration, etc.) of MPMoviePlayerController are only available after the movie has been visually played to the user. Before that they all come back 0. I've tried various things like forcing the system to wait a few seconds (to see if it was just a timing issue), but so far, nothing has worked other than actually playing the movie. Evan at that point, I believe those properties are acting as read-only; it's not like I can adjust them directly.

2) The various CGImageSourceRef calls and routines work only on actual images, not movies, on iOS. On MacOS there is more support for movies, also going through the CV (for Video) as opposed to CI (Image) or CG (Graphic) routines. At least, all the examples I've found so far work only on MacOS, and nothing I've found shows working code on iOS, which matches my results of getting a nil result when I attempt to use it.

  • http://stackoverflow.com/questions/7697026/how-do-i-set-the-orientation-for-a-frame-by-frame-generated-video-using-avfounda look at this – Sport Aug 19 '14 at 04:51
  • The thread appears to be abou detecting the orientation of the phone during AVFoundation recording, and applying a CGTransform to individual frames on as as-needed basis to set the orientation. Unfortunately, this doesn't help us when we're using the UIImagePicker -- we don't have access to the video while it's being recorded, just the final result. Also, we don't really want to transform the entire video pixel-by-pixel if we can help it, we just want (as you've noted before) to set an extra line or two of meta-data in the file. – Colside Paul Aug 20 '14 at 01:14

0 Answers0