You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked for possible duplicate issues, with possible answers.
Bug summary
Calling compressVideo with bitrate has no effect, since the bitrate parameter is completely unused in the compressVideo function in VideoProcessor.swift:
Thanks for reporting this! You're right - the bitrate parameter was completely unused in the iOS compressVideo implementation.
The root cause: iOS used AVAssetExportSession which only supports Apple's built-in quality presets and doesn't accept custom bitrate values. The bitrate parameter was declared in the function signature but never actually referenced in the function body.
Fixed in #4 by adding an AVAssetWriter + AVAssetReader pipeline that activates when bitrate > 0. This uses AVVideoAverageBitRateKey for precise H.264 bitrate control, matching the Android behavior.
Activity
thangdevalone commentedon Sep 15, 2026
Thanks for reporting this! You're right - the
bitrateparameter was completely unused in the iOScompressVideoimplementation.The root cause: iOS used
AVAssetExportSessionwhich only supports Apple's built-in quality presets and doesn't accept custom bitrate values. Thebitrateparameter was declared in the function signature but never actually referenced in the function body.Fixed in #4 by adding an
AVAssetWriter+AVAssetReaderpipeline that activates whenbitrate > 0. This usesAVVideoAverageBitRateKeyfor precise H.264 bitrate control, matching the Android behavior.FrikkieSnyman commentedon Oct 5, 2026
@thangdevalone thanks for picking this up - are you planning on releasing this as a tagged release/published to NPM?
thangdevalone commentedon Oct 5, 2026
@FrikkieSnyman
Please check in v2.3.7: https://github.com/thangdevalone/react-native-media-toolkit/tree/v2.3.7