feat(android): add videoBitrate option for recordAsync #2055
Conversation
…te takes an integer value (e.g. 1000*1000*5 aka 5Mbps).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when user does not pass it?
It falls back to default behavior, as if this code was never implemented.
… On Jan 16, 2019, at 10:44 AM, Sibelius Seraphini ***@***.***> wrote:
@sibelius approved this pull request.
What happens when user does not pass it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#2055 (review)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AlQSbczqNFFQN3vwWqMC3GM1GOV9tXDAks5vD1bVgaJpZM4aDelH>.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrewschenk-linx Could you please add types and documentation
…targetBitrate in RNCamera. Adds safety rails for proper usage.
Added documentation and types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After thinking about it a bit I think we can name it videoBitrate
instead of targetBitrate
.
Can you please rename it? I will merge it aftwerwards!
:tada: This PR is included in version 1.9.0 :tada: The release is available on: Your semantic-release bot 📦🚀 |
# [1.9.0](react-native-camera/react-native-camera@v1.8.1...v1.9.0) (2019-01-18) ### Features * **android:** add videoBitrate option for recordAsync ([#2055](react-native-camera/react-native-camera#2055)) [skip release] ([d93a6c7](react-native-camera/react-native-camera@d93a6c7)) * allow camera scene when audio permissions are denied ([#2048](react-native-camera/react-native-camera#2048)), Fixes [#2047](react-native-camera/react-native-camera#2047), Fixes [#2051](react-native-camera/react-native-camera#2051) ([22533ed](react-native-camera/react-native-camera@22533ed))
While VideoQuality can be set, this option does not give developers anyway to fine-tune the resulting file size of a recorded video. 720p recording will use a 12 Mbps bitrate on a Galaxy S8+, even though 720p should be closer to 5 Mbps.
Introducing a new optional recording option helps to solve this problem.
targetBitrate takes an integer value (e.g. 1000 x 1000 x 5 aka 5Mbps).
Example of calling it from React Native