How a 2-byte container quirk caused 100% of iOS Safari .mov audio decodes to fail
A browser-based audio transcription tool using Whisper locally via transformers.js saw 100% failure rates for .mov file uploads on iOS Safari, while desktop browsers handled the same files without issue. Investigation revealed the problem was not the AAC audio codec but the QuickTime container format, specifically a difference in the mp4a sample description entry written by QuickTime versus standard MP4. Rather than relying on heavy solutions like ffmpeg.wasm or WebCodecs, the developers wrote a lightweight DataView-based fix that rewrites only the relevant container metadata and extracts just the audio bytes. The fix includes strict validation checks so that any unsupported or edge-case format falls back to the original decode path, ensuring no previously working format is broken. After shipping the fix, the team also removed a user-facing warning about large .mov files, since the underlying issue was never file size but container structure.
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