[video] Add averageBitrate and peakBitrate for video tracks#41532
Merged
[video] Add averageBitrate and peakBitrate for video tracks#41532
averageBitrate and peakBitrate for video tracks#41532Conversation
Contributor
|
Subscribed to pull request
Generated by CodeMention |
20c065d to
e181c97
Compare
amandeepmittal
approved these changes
Dec 10, 2025
Collaborator
|
The Pull Request introduced fingerprint changes against the base commit: dcbb313 Fingerprint diff[
{
"op": "changed",
"beforeSource": {
"type": "dir",
"filePath": "../../packages/expo-video/android",
"reasons": [
"expoAutolinkingAndroid"
],
"hash": "aaa8c285db73e770d84b7cd8566eede93b069405"
},
"afterSource": {
"type": "dir",
"filePath": "../../packages/expo-video/android",
"reasons": [
"expoAutolinkingAndroid"
],
"hash": "049483bf0a0d5776fdc48b29f3d872033f36d705"
}
},
{
"op": "changed",
"beforeSource": {
"type": "dir",
"filePath": "../../packages/expo-video/ios",
"reasons": [
"expoAutolinkingIos"
],
"hash": "2a27dec09277e07b57e4773e36c3d02ede152da4"
},
"afterSource": {
"type": "dir",
"filePath": "../../packages/expo-video/ios",
"reasons": [
"expoAutolinkingIos"
],
"hash": "88b7a9893d5d99d672da77cb9385c5b21276dca8"
}
}
]Generated by PR labeler 🤖 |
tsapeta
approved these changes
Dec 10, 2025
packages/expo-video/android/src/main/java/expo/modules/video/records/Tracks.kt
Outdated
Show resolved
Hide resolved
b5974c1 to
264e5d4
Compare
aleqsio
pushed a commit
that referenced
this pull request
Dec 22, 2025
# Why Currently we provide the `bitrate` field, which behaves the same as the `bitrate` field in `ExoPlayer` - it reports peak bitrate or average if peak is unavailable. There are currently a few issues with this: 1. There is no way to know which of those is reported. 2. On iOS we weren't able to read peak bitrate for sources in MPEG-4 container at all since the AVKit doesn't provide this information 3. I decided that i ***really*** don't like this ambiguous way of reporting bitrate # How Add `averageBitrate` and `peakBitrate` fields for much clearer bitrate reporting. On iOS use the metadata fields to find the `btrt` box, which contains bitrate information. This is not the most reliable solution, but should work for most common sources where the source actually reports the peak bitrate (for our test sources we have parity with ExoPlayer peak bitrate reporting). I also marked the bitrate field as deprecated # Test Plan Tested in BareExpo and Android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Currently we provide the
bitratefield, which behaves the same as thebitratefield inExoPlayer- it reports peak bitrate or average if peak is unavailable.There are currently a few issues with this:
How
Add
averageBitrateandpeakBitratefields for much clearer bitrate reporting.On iOS use the metadata fields to find the
btrtbox, which contains bitrate information. This is not the most reliable solution, but should work for most common sources where the source actually reports the peak bitrate (for our test sources we have parity with ExoPlayer peak bitrate reporting).I also marked the bitrate field as deprecated
Test Plan
Tested in BareExpo and Android