You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Check encoder support before export instead of failing after the render #32
exportPreview() (public/demo.mjs:282) checks only that VideoEncoder and requestVideoFrameCallback exist. It never checks whether the actual codec settings are supported:
the video settings at demo.mjs:302 (avc1.640033, 1920 wide, 24 Mbps)
the audio settings at demo.mjs:264 (mp4a.40.2, 192 kbps, at the decoded rate and channel count)
WebCodecs H.264 and AAC encoding support varies by platform and build. When AAC is missing, the whole film still renders frame by frame. Then encodeAudio fails at "Adding sound…", the catch at demo.mjs:353 shows "Export failed", and minutes of work are thrown away.
Expected: unsupported settings are caught before rendering, and a video-only file is still produced when only audio is unsupported.
Fix direction: before creating the hidden film, call VideoEncoder.isConfigSupported(...). Once the audio buffer is decoded, call AudioEncoder.isConfigSupported(...). If video is unsupported, show a specific label. If only AAC is unsupported, build the muxer without an audio track and say so afterwards.
Related to #10, but about Chrome/Edge builds, not new browsers.
Done when forcing AudioEncoder.isConfigSupported to return { supported: false } in DevTools produces a silent MP4 right away instead of "Export failed" after the render.
Activity