Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image pixelete when using capture photo from video #38

Closed
replytoashish008 opened this issue Jan 12, 2017 · 5 comments
Closed

Image pixelete when using capture photo from video #38

replytoashish008 opened this issue Jan 12, 2017 · 5 comments

Comments

@replytoashish008
Copy link

Image pixelate when using capture photo from video.I required a image of high quality photo. I am using the the following code :-

NextLevel.sharedInstance.capturePhotoFromVideo()

Properties that I am setting to shared instance of NextLevel:-

let nextLevel = NextLevel.sharedInstance
        nextLevel.deviceOrientation = .portrait
        nextLevel.videoConfiguration.maximumCaptureDuration = CMTimeMakeWithSeconds(maximumDuration, 600)
        
        //   video configuration
        nextLevel.videoConfiguration.bitRate = 2000000
        nextLevel.videoConfiguration.scalingMode = AVVideoScalingModeResizeAspectFill
        
        // audio configuration
        nextLevel.audioConfiguration.bitRate = 128000
        
        nextLevel.isVideoCustomContextRenderingEnabled = true
        nextLevel.videoConfiguration.preset = AVCaptureSessionPresetHigh
@piemonte
Copy link
Contributor

hi @replytoashish008

the quality of a photo from video is limited by the fact that you're encoding a video frame without changing modes, so there isn't much to do besides increasing the quality of the video itself.

@monish152
Copy link

and how we can increase quality of video?

@monish152
Copy link

Video quality comparision:

This we have recorded from our app:
https://dl.dropboxusercontent.com/u/53512841/709D907C-E9F3-4F1F-96C2-BDABAACCCB01-NL-clip.0.mp4

This we have recorded from iphone default camera
https://dl.dropboxusercontent.com/u/53512841/IMG_3046.MOV

It seems pixelation in our app. @piemonte can you please have a look.

@monish152
Copy link

And in image left side video recorded from nextlevel and right side video recorded from default apple. left seems pixelated
screen shot 2017-01-13 at 2 16 07 pm

@piemonte
Copy link
Contributor

Configuration of NextLevel can be done using the NextLevelVideoConfiguration object. If you're trying to match the default iOS camera application, then you need to look at what you're using for compression settings as well as your preset, both in NextLevelVideoConfiguration.

📚 https://nextlevel.github.io/NextLevel/

@NextLevel NextLevel locked and limited conversation to collaborators Jan 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants