Awalz / SwiftyCam

A Snapchat Inspired iOS Camera Framework written in Swift
BSD 2-Clause "Simplified" License
2.08k stars 327 forks source link

Video orientation issue #204

Open dheerajkmani opened 5 years ago

dheerajkmani commented 5 years ago

SwiftyCam is really good.

I am using this for customised video recorder. But I am facing a problem while getting the video orientation.

For 'SwiftyCamViewController' I have set the following parameters.

When I record the video with above parameters, it is working fine on iOS devices. But on Android phone the video is shown rotated. When I ran ffprobe (ffmpeg) command to check the orientation of the video file recorded via SwiftyCam on an iphone, the value was -90.

What value should I set so that the orientation of file is correct?

eVerup commented 5 years ago

Same problem here, i don't find solution ... Please help !

RobinHe0212 commented 5 years ago

In the Orientation file. Go to function getVideoOrientation() -> AVCaptureVideoOrientation?, change to the following syntax:(Hope it works. It works like a charm for me) switch deviceOrientation { case .landscapeLeft: return .landscapeLeft case .landscapeRight: return .landscapeRight case .portraitUpsideDown: return .portraitUpsideDown default: return .portrait }

aayubhagat commented 5 years ago

I also face same problem... Please help!