1

I am trying to capture video with PBJVision.

I set up camera like this

vision.cameraMode = PBJCameraModeVideo;
vision.cameraOrientation = PBJCameraOrientationPortrait;
vision.outputFormat = PBJOutputFormatWidescreen;

And this produces output 1280x720 where 1280 is width.

Setting orientation to Landscape ROTATES the stream.

I have been trying to record video with GPUImage, and there I can

videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset1280x720
cameraPosition:AVCaptureDevicePositionBack];
videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait;

_movieWriter = [[GPUImageMovieWriter alloc] initWithMovieURL:_movieURL size:CGSizeMake(720.0, 1280.0)];

So that i get vertical output.

I would like to achieve vertical output for PBJVision, because I experience problems with GPUImage writing video to disk. (I will make another question for that).

What method/property of AVFoundation is responsible for giving the vertical output instead of horizontal?

Sorry for the question, I have been googling 2 days - can't find the answer.

kerd
  • 307
  • 2
  • 13

1 Answers1

0

I was having the same issue. I changed the output format to vision.outputFormat = PBJOutputFormatPreset; and I'm getting that portrait/vertical output.

Billy Coover
  • 3,827
  • 5
  • 36
  • 50