Skip to content

[camera_android_camerax] video encoding bitrate support#11757

Draft
ivan-vanyusho wants to merge 8 commits into
flutter:mainfrom
ivan-vanyusho:video_encoding_bitrate
Draft

[camera_android_camerax] video encoding bitrate support#11757
ivan-vanyusho wants to merge 8 commits into
flutter:mainfrom
ivan-vanyusho:video_encoding_bitrate

Conversation

@ivan-vanyusho
Copy link
Copy Markdown
Contributor

@ivan-vanyusho ivan-vanyusho commented May 22, 2026

Added video encoding bitrate support

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@flutter-dashboard
Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for video encoding bitrate in the CameraX Android implementation by passing the bitrate from media settings to the recorder. Review feedback suggests adhering to the repository's changelog convention by using a 'NEXT' header instead of a specific version number and recommends adding audio bitrate support for feature parity with other platform implementations.

Comment on lines +5 to +8
## 0.7.3

* Support video encoding bitrate

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In this repository, new changes should be added to the ## NEXT section rather than creating a new version header. The version header is typically added only when a release is being prepared by renaming the ## NEXT section. Please move the 'Support video encoding bitrate' entry under ## NEXT and remove the ## 0.7.3 header.

Suggested change
## 0.7.3
* Support video encoding bitrate
* Support video encoding bitrate
References
  1. The repository follows a convention where unreleased changes are listed under a '## NEXT' header. Version headers are added only during the release process. (link)

recorder = Recorder(qualitySelector: presetQualitySelector);
recorder = Recorder(
qualitySelector: presetQualitySelector,
targetVideoEncodingBitRate: mediaSettings?.videoBitrate,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The MediaSettings class also includes an audioBitrate property. For completeness and parity with other platform implementations (such as camera_android), consider supporting audio encoding bitrate as well if the underlying Recorder wrapper provides a corresponding parameter.

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator

Thanks for the contribution!

As previous covered in #10832, the checklist needs to be completed (and as mentioned in #10498 you need to do the steps for the things you check off; this doesn't address the required versioning step in any way, or follow our changelog style guide). It's great that you are interested in continuing to contribute, but if you are going to do so please make sure you are following our process; revisiting it each time is not a good use of reviewer time.

@stuartmorgan-g stuartmorgan-g marked this pull request as draft May 22, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants