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

Low Frame Rate for both CameraView preview and Frame Processing #404

Open
jeffreyfjohnson opened this issue Jun 5, 2020 · 0 comments
Open

Comments

@jeffreyfjohnson
Copy link

What are you trying to achieve or the steps to reproduce?

On my Moto G7, as well as other Android devices that I've tested, Fotoapparat has a low frame rate, as evidenced by two things. The CameraView that previews the frames the camera is capturing is choppy, and a println that I added in my FrameProcessor shows the callback is only invoked 2-4 times every second.

By contrast, I did a quick implementation using the Android CameraX framework, and the camera preview was very smooth, and the equivalent of the frame processor was getting 20-30 callbacks per second. Same exact device, same exact use case.

How did you initialize FA?

 private val camera = Fotoapparat(
        context = context,
        view = cameraView,
        lensPosition = back(),
        scaleType = ScaleType.CenterInside,
        cameraConfiguration = CameraConfiguration(frameProcessor = frameProcessor),
        cameraErrorCallback = { error ->
            logError("Camera error", error)
        }
    )

Are there any knobs I can tweak in order to get better performance out of Fotoapparat. It is clear that my device is capable of better performance, it can get that out of the CameraX framework.

Context:

  • FA version: 2.7.0
  • Devices/APIs affected: Any that I have tried
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant