Is it possible to capture video in landscape while the device is in portrait mode?
something like this:
actually what i need is to capture in portrait but with width > height, i dont want the user to rotate the device, but i do want to capture a wider picture like in landscape mode.
just changing the preview layer frame to be wide (width>height) wont be enough of course.
i tried changing the video orientation of the preview layer, but that will rotate the picture, and thats not what i want.
previewLayer.connection.videoOrientation = .landscapeRight
is that make any sense?
No its not possible as you would have to physically rotate the camera.
You can CROP the output video to whatever aspect ratio you desire.
This will however make your vertical resolution be at most what your horizontal resolution currently is.
As well as decreasing your field of view.
If you still wanna crop the video to simulate this "smaller landscape mode" in real time i suggest you use the "GPUImageCropFilter" from the library GPUImage
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With