Repository navigation
fix(openfilm): handle mixed PNG alpha on FFmpeg 9.1 and deflake caption test - #1
Closed
Rehan-nawroz wants to merge 1 commit into
Closed
Rehan-nawroz wants to merge 1 commit into
Rehan-nawroz wants to merge 1 commit into
Conversation
…on test Fix the two failures on main in CI run 44950194416. Windows: transparent ProRes/WebM export failed on FFmpeg 9.1 Chromium omits PNG's alpha plane for an entirely opaque frame, so a render that has transparency on some frames sends rgba followed by rgb24. Alpha exports pass -reinit_filter 0 on purpose, to keep tmix and select from being reset, so FFmpeg cannot rebuild the graph. FFmpeg 9.1 now errors when crop receives a format change: Frame size or format changed without filter graph reinitialization crop supports dynamic frame size but not dynamic frame format. scale does support both, so normalize PNG frames before the crop with: scale=iw:ih:flags=neighbor,format=rgba The scale is 1:1 with nearest neighbours, so it resamples nothing; it only gives rgb24 frames an opaque alpha plane and makes every frame rgba before the crop. The final pixel-format conversion stays after the crop, as before. Verified with clip-export-regressions.test.mjs: 10/10 pass on FFmpeg 9.1.0 (the same essentials build CI installs) and 10/10 on 9.0.2. macOS: caption group move timed out The test waits for 185 selection frames after Cmd+A: 183 caption cues and 2 media clips. It had a 15 s budget, but the failing macOS runs took 19.7 s and 23.8 s on a shard that was about twice as slow as the other runners. It also pressed Cmd+A after waiting only for the cues, not for the second media clip, so select-all could be built from a half-loaded timeline. Finally, selected was a dependency of the timeline keydown effect, so every clip click rebuilt the global listener and a Cmd+A arriving during that swap could be lost. Wait for both media clips before Cmd+A, raise the wait budget to 60 s and the test timeout to 180 s, and read the selection through the existing selectedRef so the listener stays registered across picks. Verified locally (caption test passes in about 5 s); the next macOS CI run confirms the runner-load behaviour.
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.
Fixes the two failures from CI run 44950194416: Windows shard 1/3 and macOS shard 1/3. Both failed on the first attempt and on retry.
Windows: transparent ProRes/WebM export failed on FFmpeg 9.1
What broke
transparent ProRes and WebM blur keeps nearly transparent white from becoming a luminous blue edgefailed with:Root cause
choco install ffmpegnow installs FFmpeg 9.1.0.rgbaand thenrgb24through the image2pipe stream.-reinit_filter 0on purpose, so a format change cannot rebuild the graph without resettingtmixandselect.cropsupports dynamic frame size, but not dynamic format, so it is the filter that throws.FFmpeg 9.0.2 only warns, which is why this passed locally.
Fix
For PNG input, normalize the frame format before the crop:
scalesupports dynamic frame params. The 1:1 nearest-neighbour scale resamples nothing; it only givesrgb24frames an opaque alpha plane and makes every frame RGBA before the crop. The final pixel-format conversion stays after the crop, as before.macOS: caption group move timed out
What broke
unlocked caption tracks move with a mixed selection, with one undo for media and captionsfailed with:Root cause
selectedwas a dependency of the timeline keydown effect, so every clip click rebuilt the global listener. A Cmd+A arriving during that swap could be lost.Fix
selectedRefand removeselectedfrom the keydown effect dependencies, so the listener stays registered across picks.Verification
clip-export-regressions.test.mjs: 10/10 pass on FFmpeg 9.1.0 (the essentials build CI installs).caption-group-move.test.mjs: passes locally in ~5 s.pnpm typecheck: all workspace packages pass.pnpm --filter openfilm build:ui: passes.pnpm audit:public --no-secrets: no findings.git diff --check: clean.The macOS fix removes the hard 15 s deadline and both race windows, but the next macOS CI run is the real confirmation under runner load.