Skip to content

Add --ignore-video-encoder-constraints#6849

Open
rom1v wants to merge 2 commits into
devfrom
ignore-video-encoder-constraints
Open

Add --ignore-video-encoder-constraints#6849
rom1v wants to merge 2 commits into
devfrom
ignore-video-encoder-constraints

Conversation

@rom1v
Copy link
Copy Markdown
Collaborator

@rom1v rom1v commented May 18, 2026

Some encoders report incorrect capabilities. Add an option to ignore these constraints.

Fixes #6829
Fixes #6848

rom1v added 2 commits May 18, 2026 23:34
Some encoders report incorrect capabilities. Add an option to ignore
these constraints.

Fixes #6829 <#6829>
Fixes #6848 <#6848>
@rom1v
Copy link
Copy Markdown
Collaborator Author

rom1v commented May 20, 2026

When --ignore-video-encoder-constraints is set, maybe I should change the default value for --min-size-alignment to 8 if it is not explicitly set, otherwise the video will often fail due to misalignment… Or maybe not…

@anotheruserofgithub
Copy link
Copy Markdown

Or maybe this option should only apply to max/min size, not alignment?

I guess the alignment reported by video capabilities will always work (except e.g. for emulators).

But I'm even wondering if the supported size is really wrong. In #6769 (comment) as well as in other issues you're assuming that the encoder reports incorrect capabilities. It seems more probable that the way you compute the maximum possible size is not appropriate, as additional logs in #6769 (comment) tend to suggest (IMHO).

What I mean is that I wouldn't be surprised if the encoder could handle only a limited number of pixels in total or a limited aspect ratio, something like that. Thus if you first retrieve the maximum allowed width and the encoder returns 2048, then if you ask it the maximum possible height it can handle for this width it will return 448. On the other hand, if you ask what is the maximum height for a width of, say, 1600, it would return 1200 or higher. In other words, maybe it can handle larger areas for big squares than for thin rectangles, but anyway the more you increase one dimension, the more the other dimension has to be limited. Or maybe not? How would you know a priori? You should probably test with more values on a real device.

As a consequence, the decision for the maximum minor dimension should depend dynamically on the current (capped) major dimension in Size.constrain().

I don't know, just a guess. At least, did I manage to make myself clear?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants