Urgent.News

What's breaking now, across thousands of outlets.

Tech

iOS Safari can't decode your .mov, and the reason is 2 bytes deep in the container

Our tool transcribes audio in the browser — Whisper running locally via transformers.js , no upload. It worked fine, until analytics showed something too clean to be a coincidence: .mov uploads on mobile failed 100% of the time. Not 90%. Every single one. Desktop had never reported a single .mov failure. This is what I found, and how it got fixed without pulling in ffmpeg.wasm or WebCodecs. The…

iOS Safari had been failing to decode .mov files uploaded on mobile devices 100% of the time, while desktop devices never reported any such failures. The issue was traced down to the container format, specifically the version field inside the audio sample entry in the moov box of the MP4 file. QuickTime and Safari both expect version 0 audio sample entries, while the version field is a uint16 (two bytes) that determines whether the file plays or not.

The fix was to rebuild the container, discarding the codec and simply rewriting the container with a well-formed stsd entry forced to version 0. This allowed Safari to decode the audio without requiring additional external libraries like ffmpeg.wasm or WebCodecs. The fix was implemented by extracting the audio samples, writing a fresh audio-only MP4 with a well-formed stsd, and handing it back to Safari's native decodeAudioData.

The solution was tested on various mobile file formats and successfully decoded audio buffers without any regression.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

MSc Final Project DevLog #5: Tutorial and Level Design

With all of the primary mechanics sufficiently developed to allow playtesting, the next step in the project was to develop levels to teach players how to use them as well as a single level containing puzzles for players to solve using the knowledge provided in the tutorial levels.

More from Monday 31 August →