Repository navigation
fix(android): drop KEY_PRIORITY/KEY_OPERATING_RATE so Exynos encoders can start (#423) - #424
Merged
numandev1 merged 1 commit intoOct 25, 2026
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>
Contributor
|
we are encountering this issue too @numandev1 could you please take a look when you have a second? |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrow removal addresses the reported failure, preserves required encoding settings, and is supported by targeted device validation with no unresolved findings.
No open issues 🎉
What changed in this PR
Fixes #423 by removing Android encoder scheduling hints introduced in #399 that caused Samsung Exynos encoders to fail at startup. Required encoding parameters and fallback behavior remain unchanged; iOS is unaffected.
Changes:
- Remove
KEY_PRIORITYandKEY_OPERATING_RATEfrom the encoder format. - Update fallback comments to describe only the remaining VBR setting.
- Document the Exynos limitation and record the fix in triage notes.
The PR reports successful Galaxy A56 before/after validation. Native behavior was not independently runtime-verified during this review.
| File | Description |
|---|---|
TRIAGE.md |
Records #423, its cause, and reported device validation. |
CLAUDE.md |
Documents the encoder scheduling-key pitfall. |
android/src/main/java/com/reactnativecompressor/Video/VideoCompressor/utils/CompressorUtils.kt |
Removes the two scheduling hints that trigger Exynos startup failures. |
android/src/main/java/com/reactnativecompressor/Video/VideoCompressor/compressor/Compressor.kt |
Updates comments only to reflect the remaining VBR fallback. |
Review effort: Balanced
numandev1
approved these changes
Oct 25, 2026
Contributor
|
Thank you so much @numandev1 <3 |
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