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

fix: Set minFPS to 20 to allow maximum resolution photo #3063

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

mrousavy
Copy link
Owner

What

After research by @Dingenis, we found out that when setting FPS to 30 (min 30, max 30), the CameraX pipeline will reduce photo resolution to a very low value for some reason.

We are not sure if this is a bug or intended behaviour, that's why we will create an issue in the CameraX issue tracker.

As a temporary (or permanent?) solution for VisionCamera, we now change the FPS logic to not be a fixed rate (min 30 max 30), but instead lower the min FPS to 20 (min 20 max 30) - so it is variable.

In low light conditions, FPS will now drop to as low as 20, while in good light conditions it will go to the desired target FPS value.

Changes

Tested on

Related issues

Copy link

vercel bot commented Jul 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-vision-camera ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 10, 2024 10:17am

@mrousavy
Copy link
Owner Author

We could also add a prop something like fpsRange: 'variable' | 'fixed' which decides whether to use (min: 20, max: 30) or (min: 30, max: 30).

This behaviour also would work on iOS, right now it is fixed to min == max.

@mrousavy mrousavy merged commit a8ba80d into main Jul 10, 2024
5 checks passed
@mrousavy mrousavy deleted the fix/fix-android-resolution branch July 10, 2024 10:56
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

Successfully merging this pull request may close these issues.

🐛 The resolution of the PhotoFile is different than the format photo resolution
1 participant