Hi team,
We have a video recording feature in our app. However, the output quality is not very well. It is quite snowing(static noise) even with the default setup in which we got from: https://github.com/android/camera-samples/blob/main/CameraXVideo/app/src/main/java/com/example/android/camerax/video/fragments/CaptureFragment.kt
val rotation = binding.cameraPreview.display.rotation
val resolutionSelector = ResolutionSelector.Builder()
.setAspectRatioStrategy(AspectRatioStrategy(screenAspectRatio, AspectRatioStrategy.FALLBACK_RULE_AUTO))
.build()
val recorder = Recorder.Builder()
.setQualitySelector(qualitySelector)
.setTargetVideoEncodingBitRate(2500000)
.build()
videoCapture = VideoCapture.Builder(recorder)
.setResolutionSelector(resolutionSelector)
.setTargetRotation(rotation)
.build()
In addition to that, video size is being enormous unless we set maximum bitrate. However, while setting a bitrate constraint helps us reduce the video size, but quality is becoming even worse. I am attaching a video sample so you can also check. Do you know how do I get good quality videos while maintaining the size?
Thanks!
--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/6c192323-ddb4-4ad1-a1ce-9fd2c8c2b7e4n%40android.com.
Hello,
Video quality has been improved but video size is still big than it should be(in accordance with our app's requirement). For instance, 1min video is around 20MB but we'd still like to reduce it a bit more, tho. To do so, we set a maximum bitrate of 250000 via
val recorder = Recorder.Builder()
.setTargetVideoEncodingBitRate(2500000)
.build()
and it helped but we wonder if it is possible to have much smaller videos while maintaining quality. We'd like to know what is the best approach;
* Either removing setTargetVideoEncodingBitRate completely
* Or set a smaller bitrate
Thanks