Is there a way to make an app where it takes landscape video in portrait mode?

Discussion in 'iOS Programming' started by helloimD4NNY, Jun 20, 2011.

  1. helloimD4NNY macrumors regular

    Joined:
    Aug 15, 2009
    Location:
    Las Vegas, NV
  2. jackhdev, Jun 20, 2011
    Last edited by a moderator: Jun 21, 2011

    jackhdev macrumors 6502

    Joined:
    Apr 9, 2011
    Location:
    Bismarck, North Dakota
    #2
    Please user
    Code:
     tags.[/b]
    
    This code should make it work. However, I've read in multiple places that, for some reason, this is against Apple's Developer Agreement and will cause your app to be rejected when submitted for approval. You should confirm this, but here is code just for fun:
    
    [CODE]@interface MPMoviePlayerController (extend)
    -(void)setOrientation: (int)orientation animated: (BOOL)value;
    @end
    
    moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieUR];
    [moviePlayer setOrientation:UIDeviceOrientationPortrait animated:NO];
    if (moviePlayer)
    {
            [self.moviePlayer play];
    }
     
  3. helloimD4NNY thread starter macrumors regular

    Joined:
    Aug 15, 2009
    Location:
    Las Vegas, NV
    #3
    I'll try. I'm just getting started w/ developing apps so i'm a noob right now. I'm trying to figure out how to work xcode.
     
  4. Fliesen macrumors 6502a

    Fliesen

    Joined:
    Mar 30, 2010
    Location:
    Austria
    #4
    i'm not an Xcode dev, but the code looks as if it force- _plays_ movies in landscape
    (cmiiw)

    isn't the OP asking for something that'll force RECORD movies in landscape, even if you hold the phone in portrait?
     
  5. helloimD4NNY, Jun 21, 2011
    Last edited by a moderator: Jun 21, 2011

    helloimD4NNY thread starter macrumors regular

    Joined:
    Aug 15, 2009
    Location:
    Las Vegas, NV
    #5
    Quoted post edited.

    Anyways upon using that code, xcode gives me the "build failed" error. Any ideas why?
     
  6. jackhdev macrumors 6502

    Joined:
    Apr 9, 2011
    Location:
    Bismarck, North Dakota
    #6
    Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3 like Mac OS X; en-us) AppleWebKit/534.32 (KHTML, like Gecko) Version/5.0.2 Mobile/8F190 Safari/6533.18.5)

    Oh yeah, no problem man. I remember when I was in your shoes and whenever I asked a question on Stack Overflow I would always receive answers that half answered my question with no attempt to shield their negative attitude. Lol, whatever, you'll get used to objective C and Xcode eventually.
     
  7. helloimD4NNY thread starter macrumors regular

    Joined:
    Aug 15, 2009
    Location:
    Las Vegas, NV
    #7
    This is correct. I guess I should've looked over the code. Haha. Back to the drawing board. ( .__.)
     
  8. helloimD4NNY thread starter macrumors regular

    Joined:
    Aug 15, 2009
    Location:
    Las Vegas, NV
    #8
    So no ideas on how to record landscape style videos while holding the phone in portrait mode?
     
  9. Fliesen macrumors 6502a

    Fliesen

    Joined:
    Mar 30, 2010
    Location:
    Austria
    #9
    a quick and dirty workaround would be to start in landscape, turn the phone after a second and keep filming in portrait (which will stay locked to landscape)

    the orientation doesn't change anymore while filming.
    You'd just have to trim off that 1 second at the beginning of each take though :/
     
  10. touchmonkey macrumors 6502

    Joined:
    Oct 14, 2008
    #10
    Didn't work for me, and I so wanted it to.
    I remember this being the case with my nano though.

    I would like more user options on all of this also because when you can use the volume up button for shutter I would prefer it on the top.
     
  11. Fliesen macrumors 6502a

    Fliesen

    Joined:
    Mar 30, 2010
    Location:
    Austria
    #11
    how did that not work?

    the recorded image doesn't rotate mid-film
     
  12. touchmonkey, Jun 21, 2011
    Last edited by a moderator: Jun 21, 2011

    touchmonkey macrumors 6502

    Joined:
    Oct 14, 2008
    #12
    Mine is rotating for some reason....will keep trying.
    I even let it stay in landscape for several seconds to see if that locked it in.
    I thought it would work, as I say, that's how it did on my nano.

    Hmmmm.
    Can you think of any reason for this not to work on my iP4?
    Uploading a video now to youtube to show you.
    I'll probably be embarrassed at something stupid I'm doing wrong.

    EDIT:

    Should be done processing in a few minutes

    http://www.youtube.com/watch?v=s_wkmfOcHqE
     
  13. touchmonkey macrumors 6502

    Joined:
    Oct 14, 2008
    #13
    the video image stays in landscape mode but does rotate
    One could, with the right video editor rotate it to correct, but....not easy
    still waiting to hear if i've done something stupidly wrong here....
    which is always a likely possibility
     

Share This Page