Silent video clips exposed a flawed file-existence check in a video merge tool
A developer discovered a bug in their browser-based video merge tool after a user reported a crash at the final output stage. The root cause was a normalisation step that mistakenly treated a file's existence as proof it contained an audio stream, when ffmpeg silently succeeds even without encoding audio. Because ffmpeg.wasm resolves its promise regardless of whether a command truly succeeded, the silence-track fallback never triggered for audio-free clips. This left the transition filter graph referencing a non-existent audio stream, causing the merge to fail with a misleading error about the output file. The fix was a dedicated audio-probe function that explicitly checks for an audio stream before choosing the encode command, rather than inferring stream presence from file existence alone.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in