Repository navigation
Fix size constraints for camera capture - #6922
Merged
Merged
Conversation
The camera stream can only be rendered on a surface matching the input
size. If the video constraints change the size, an intermediate OpenGL
filter is required.
For example, since 1080 is not a multiple of 16, running scrcpy as
follows:
scrcpy --video-source=camera --camera-size=1920x1080 \
--min-size-alignment=16
resulted in:
ERROR: Camera configuration error
An intermediate OpenGL filter allows adapting the size without error.
Fixes #6919 <#6919>
PR #6922 <#6922>
rom1v
force-pushed
the
camera-constraints
branch
from
June 28, 2026 10:24
2d69c96 to
6f743be
Compare
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.
Only apply alignment constraint for camera
Once the camera size has been selected, do not apply any encoder maximum size constraints. Only adjust the size for alignment.
Use OpenGL for camera to adapt to the target size
The camera stream can only be rendered on a surface matching the input size. If the video constraints change the size, an intermediate OpenGL filter is required.
For example, since 1080 is not a multiple of 16, running scrcpy as follows:
resulted in:
An intermediate OpenGL filter allows adapting the size without error.
Binaries: https://github.com/rom1v/scrcpy/actions/runs/28297540213
Fixes #6919