Warn when a video input declares alpha but decodes fully opaque
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 65/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript
调研方向
Start by tracing the existing video-probing path around VideoMetadata.hasAlpha and the libvpx-vp9 alpha extraction mentioned in the issue. Use the provided ffmpeg alphaextract command to compare decoded alpha, and decide whether to inspect the first frame or a sample. Done means a warning identifies declared-but-fully-opaque alpha without blocking rendering.
由索引模型根据 Issue 内容生成。
描述
Problem
A video whose container says it has alpha, but whose alpha plane decodes fully opaque, composites as a solid black rectangle over whatever is beneath it. We render it correctly — there is nothing to see through — but nothing anywhere tells the user their file is the problem, so it presents as a rendering bug.
#3220 is the worked example. The reporter built a repro repository with an opaque control clip, tested both the local CLI and the cloud renderer, and verified alpha_mode=1 with ffprobe before filing. They still could not reach the answer, because the tag they checked is exactly the thing that lies.
alpha_mode=1 is metadata and can outlive the alpha it describes. A remux can preserve the tag while dropping the BlockAdditional sidecar that carries the alpha plane, so the file keeps promising transparency it no longer contains.
Why this is cheap for us to catch
We already probe every video input, and VideoMetadata.hasAlpha already exists (pixelFormatHasAlpha(pixelFormat) || alphaMode === "1"). We also already extract alpha-capable codecs to PNG through libvpx-vp9, so a decoded frame with an alpha channel is in hand on this path anyway.
The missing step is noticing that the alpha channel is uniformly opaque and saying so.
Proposed
When a video input declares alpha but its decoded alpha plane is uniformly 255, emit a warning naming the file, something to the effect of:
avatar.webmdeclares an alpha channel but decodes fully opaque. Transparency will not composite. If this should be transparent, re-export with-pix_fmt yuva420pand avoid remuxing afterward, which can drop the alpha sidecar while keeping the tag.
Warning only, never an error. An opaque video used as a full-frame background is perfectly legitimate, so this cannot block a render.
Worth deciding: whether to check the first frame only (cheap, catches the common case) or sample a few (catches a clip that is opaque at the head and transparent later). First-frame-only is probably the right trade, but it should be a decision rather than an accident.
Verification
Users can already check by hand, and the warning should agree with this:
ffmpeg -c:v libvpx-vp9 -i in.webm -vf alphaextract -frames:v 1 out.png
Uniformly white means no transparency. Black and white means real alpha.
Filed off #3220.
— Rames Jusso
- 主要语言
- TypeScript
- 星标
- 54.1k
- 派生
- 4.9k
- 平均合并
- 9 小时 46 分钟
- 30 天内合并 PR
- 652
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
heygen-com/hyperframes 的其他 Issue
-
Player: speed button's accessible name doesn't include its visible text可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
heygen-com/hyperframes#6021 ·
维护者通常 1 天内回复
-
inspector: build.mjs resolves paths with URL#pathname, fails ENOENT (F:\\F:\\...) and aborts bun run build on Windows可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
heygen-com/hyperframes#5863 · 1 条评论 ·
维护者通常 1 天内回复
-
product-launch-video: assemble-index.mjs is not idempotent — a second run drops every approved frame video可能已有人在做 @Dante-dan 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
heygen-com/hyperframes#5733 ·
维护者通常 1 天内回复
-
gsap_tween_tail counts GSAP's force3D and autoRound flags as properties可能已有人在做 @rudycelekli 于 5 天前认领。 未关闭bug triage/needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
heygen-com/hyperframes#5683 ·
维护者通常 1 天内回复
-
Timeline: show a clip's full name when its label is cut off可能已有人在做 @DanielMcSheehy 于 3 天前认领。 未关闭desktop-candidate difficulty/easy enhancement good first issue help wanted triage/ready
难度 2/5 1-3 小时 新手友好度 85/100
heygen-com/hyperframes#5582 · 2 条评论 ·
维护者通常 1 天内回复
查看 heygen-com/hyperframes 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
chaitin/MonkeyCode#1437 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
carbon-design-system/carbon-ai-chat#2615 ·
维护者通常 1 天内回复
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 76/100
redhat-developer/rhdh-plugin-export-overlays#4486 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug]: fileUploadMatrix.test.ts URL case does a real DNS lookup and fails offline可能已有人在做 @r2jaff 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
ComposioHQ/composio#5054 ·
维护者通常 1 天内回复