Awalz / SwiftyCam

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

Video Recording 4K outputs 1080p #102

Open DerrickDevelop opened 7 years ago

DerrickDevelop commented 7 years ago

When recording with VideoQuality.resolution3840x2160 the output video results in 1080p resolution.

Result is also the same on VideoQuality.high.

Tested on iPhone 6s Plus running 10.3.3.

DerrickDevelop commented 7 years ago

Quick fix was setting the quality parameter in this function below under SwiftyCamViewController.swift to my desired resolution.

Not genuine fix, just workaround.

`fileprivate func configureVideoPreset() {

if currentCamera == .front {
    session.sessionPreset = videoInputPresetFromVideoQuality(quality: .high)
} else {
    if session.canSetSessionPreset(videoInputPresetFromVideoQuality(quality: .resolution3840x2160)) {
        session.sessionPreset = videoInputPresetFromVideoQuality(quality: .resolution3840x2160)
    } else {
        session.sessionPreset = videoInputPresetFromVideoQuality(quality: .high)
    }
}

}`

Awalz commented 7 years ago

I justed tested and my iPhone 7 records at 3840x2160. Can you confirm this occurs for the back camera and not the front