Repository navigation
Conversation
… can start (numandev1#423) Exynos H.264 encoders (c2.exynos.h264.encoder) accept the realtime priority + max operating rate hint in configure() but fail start() with NO_MEMORY ("real-time(32767 fps) is not supported") at higher resolutions such as 1080p. The prepareEncoder fallback only covers configure() failures, so Video.compress rejected. Fixes numandev1#423 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Fixes #423.
On Samsung Exynos devices,
Video.compressrejects at higher output resolutions (e.g. 1080p inmanualmode):#399 added
KEY_PRIORITY = 0(realtime) andKEY_OPERATING_RATE = Short.MAX_VALUEto the encoder format as a throughput hint.c2.exynos.h264.encoderaccepts them inconfigure()but failsstart()when the job exceeds its realtime budget. TheprepareEncoderfallback only coversconfigure()failures, so the error reaches JS, and no option can disable the keys. Smallautooutputs (360×640) still fit the budget, which is why it's resolution-dependent.Changes:
prepareEncodercomments, which now cover only the VBR key.iOS is unaffected.
Changelog
[ANDROID] [FIXED] - Video compression failing with NO_MEMORY on Samsung Exynos encoders
Test Plan
yarn test:pr(passes)yarn test:harness:androidon an emulator (Pixel 8 Pro, API 35): 9/9 passed. The harness has noVideo.compresscase, so this is a regression check only.On-device before/after with the bare example app on a Galaxy A56 (SM-A566E, Exynos 1580, Android 16). Source: 94.1 MB, H.264 1920×1080 portrait, 120 fps, 17 Mbps, 43.6 s. Encoder in all runs:
c2.exynos.h264.encoder.main(keys set)auto(→ 360×640)main(keys set)manual,maxSize: 1920,bitrate: 5_600_000NO_MEMORYinSTARTING, promise rejectsmanual,maxSize: 1920,bitrate: 5_600_000Not tested on Qualcomm/MediaTek devices without the hint. Throughput there may drop somewhat, but output should be unchanged.
🤖 Generated with Claude Code