rFlex / SCRecorder

iOS camera engine with Vine-like tap to record, animatable filters, slow motion, segments editing
Apache License 2.0
3.06k stars 583 forks source link

Bad video quality!? #380

Open hmaalen opened 7 years ago

hmaalen commented 7 years ago

The example project and my own usage of the lib results in quite bad quality video (pixelation etc). A bit surprised this has not been mentioned by anyone else. Am I the only one having this problem?

rFlex commented 7 years ago

Which device do you use? The quality should be configurable through the bitrate property of videoConfiguration.

howeguo commented 7 years ago

hi,@rFlex , I found the issue of the bad quality in iPhone7, can you tell me what is the exact bitrate in iPhone 7 ? thanks very much

ruslanmoskalenko commented 7 years ago

I'm seeing the same problem. I use AVAssetExportPresetHighestQuality but quality video is bad(pixelated). My device iPhone 6s. Have suggestions how to fix it? @rFlex

dyadenkor commented 7 years ago

@rFlex Problem exist only on iPhone 7. Seems there problem with hardware. Is it possible for you to check?

jjsandgreen commented 7 years ago

@rFlex are you alive? :)

wojczitsu commented 7 years ago

@rFlex same here

freeubi commented 7 years ago

just set to a better resolution

FatihGirisken commented 6 years ago

The same here @rFlex I tried every resolution and every setting, the video is pixelated each time. Please, help!

MMasterson commented 6 years ago

Have you guys looked at the PRs or forks? Seems this fork is the most active and advanced.

https://github.com/lucaji/SCRecorder

FatihGirisken commented 6 years ago

yeah, I have checked them. I dont know how no one noticed this problem. The videos are mostly pixelated, and also depending on the light in the room, it gets better or worse. Is it some exposure setting or sth maybe? Please, open the native camera, or to any other video app, and compare the video quality. I am thinking to change the library because of it. But it will be too much work, so trying to avoid it.

freeubi commented 6 years ago

I dont have any problem like this. Go and check your exported videos quality, how is it exported (not the setti gs, the real video file)

FatihGirisken commented 6 years ago

Exported video(file) is the same. I use front camera, iPhone7, AVCaptureSessionPresetHigh. And similar settings in the export config. SCPresetHighestQuality, SCContextTypeAuto, AVFileTypeMPEG4.

FatihGirisken commented 6 years ago

@freeubi are you using a different fork? and which device? Pls, see this screenshot from a video file exported. This is obviously not the highest quality video on an iPhone-7. img_4122 @hmaalen Have you found any solution? Or any other lib?

freeubi commented 6 years ago

This is my settings:

assetExportSession.outputFileType = AVFileTypeQuickTimeMovie;

                    assetExportSession.audioConfiguration.preset = SCPresetMediumQuality;

                    assetExportSession.videoConfiguration.bitrate = 250000;
                    assetExportSession.videoConfiguration.maxFrameRate = 24;
                    assetExportSession.videoConfiguration.codec = AVVideoCodecH264;
                    assetExportSession.videoConfiguration.size = CGSizeMake(360, 640);

i dont know wihtch version, because i dont use pods. From the image i see low bitrate, try check the exported file data.

Ahmed-Elsman commented 6 years ago

Solved !! You can fix it by change default bitrate value "kSCVideoConfigurationDefaultBitrate" to very large number found in "SCVideoConfiguration.h" file

define kSCVideoConfigurationDefaultBitrate 13000000

SerjPridestar commented 5 years ago

In my case I had the same problem however, I had a configuration that was responsible for this:

exportSession.videoConfiguration.shouldKeepOnlyKeyFrames = true

When I removed the following the video was agreeably much better.

Also, what might also cause an issue is the maxFrameRate.