Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion helpers/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,14 @@ def build_final_composite(
inputs: list[str] = ["-i", str(base_path)]
for ov in overlays:
ov_path = resolve_path(ov["file"], edit_dir)
inputs += ["-i", str(ov_path)]
# VP9/WebM overlays carry alpha as a side-data plane. ffmpeg's native vp9
# decoder drops it (decodes to yuv420p → opaque), which turns a full-frame
# transparent overlay into an opaque black layer. Force the alpha-aware
# libvpx-vp9 decoder so overlay alpha is honored.
if ov_path.suffix.lower() == ".webm":

@cubic-dev-ai cubic-dev-ai Bot Jun 6, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Extension-based decoder selection for .webm files is incorrect — WebM is a container that can hold VP8, VP9, or AV1 video. Forcing libvpx-vp9 (a VP9-only decoder) for all .webm files will cause ffmpeg decode failure and abort the render when the overlay uses VP8 or AV1.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At helpers/render.py, line 522:

<comment>Extension-based decoder selection for .webm files is incorrect — WebM is a container that can hold VP8, VP9, or AV1 video. Forcing `libvpx-vp9` (a VP9-only decoder) for all `.webm` files will cause ffmpeg decode failure and abort the render when the overlay uses VP8 or AV1.</comment>

<file context>
@@ -515,7 +515,14 @@ def build_final_composite(
+        # decoder drops it (decodes to yuv420p → opaque), which turns a full-frame
+        # transparent overlay into an opaque black layer. Force the alpha-aware
+        # libvpx-vp9 decoder so overlay alpha is honored.
+        if ov_path.suffix.lower() == ".webm":
+            inputs += ["-c:v", "libvpx-vp9", "-i", str(ov_path)]
+        else:
</file context>
Fix with cubic

inputs += ["-c:v", "libvpx-vp9", "-i", str(ov_path)]
else:
inputs += ["-i", str(ov_path)]

filter_parts: list[str] = []
# PTS-shift every overlay so its frame 0 lands at start_in_output
Expand Down