iOS 26: .mp4 recordings play silent in AVFoundation — QuickTime-branded file with an MPEG-4 audio sample entry (recommendedMovieMetadata path)
What's happening?
On iOS 26, a recording made with fileType: 'mp4' and audio: true plays back silent in every AVFoundation-based player (AVPlayer, react-native-video, QuickTime Player on macOS, the Photos app), while ffprobe, Android and VLC all see and play the AAC track. The audio is written to the file; AVFoundation just does not surface the track.
AVURLAsset(url:).tracks on the resulting .mp4 lists only the vide track and the mebx timed-metadata track. The soun track is missing. Renaming the same file to .mov (no other change) makes the soun track appear and it plays with sound.
Cause, as far as I could bisect it
The iOS 26 branch in HybridCameraVideoFrameOutput.createRecorder (recorder.setTimescale(output.recommendedMediaTimeScaleForAssetWriter) + recorder.setMetadata(output.recommendedMovieMetadata(...))) makes the asset writer produce a file that is
- branded QuickTime —
ftypmajor brandqt, compatible brandsqt, awideatom — even though the file type asked for was.mp4, and - carries an MPEG-4-style audio sample entry:
mp4aversion 0 with theesdsdirectly inside it.
AVFoundation chooses its parser by file extension. For .mp4 it uses the MPEG-4 reader, and that reader drops a version-0 mp4a entry when the file is qt-branded. Either half alone is fine:
- Same bytes with the
ftyprewritten toisom/isom(andwide→free):sountrack present, plays. - Same bytes as
.mov:sountrack present, plays. ffmpeg -i in.mp4 -c copy out.mp4(which writes anisombrand): plays.
With the pre-iOS-26 path (recorder.setMetadata([], settings: settings)) on the same device, the writer still brands the file qt and still adds the mebx track, but writes the audio entry in the QuickTime form — mp4a version 1 with a wave/frma/esds sub-box — and AVFoundation reads that fine under the .mp4 name. Transplanting only that stsd box into the silent file makes its audio track appear, so the sample entry is the discriminator (not the track flags, edit list, sgpd, or the metadata track — I tried each).
Sample-entry bytes from the two files, both mono AAC-LC 48 kHz with byte-identical esds:
iOS 26 branch (silent): mp4a v0 channelcount=2 samplesize=16 → esds
[] metadata path (plays): mp4a v1 channelcount=1 compression=0xFFFE samplesPerPacket=1024 → wave { frma mp4a, mp4a, esds }Workaround in use
Take the pre-26 path on every OS (try recorder.setMetadata([], settings: settings) unconditionally). With that, AVFoundation lists three tracks and AVAssetReader decodes the audio at the expected level. A patch-package diff of that is what we ship. Presumably the proper fix is to keep the iOS 26 metadata but make the writer emit an isom/mp42 brand for fileType: 'mp4' (or .mov for the QuickTime container).
Reproduction
- Record with
<Camera video audio fileType="mp4">on an iOS 26 device,startRecording({ fileType: 'mp4' }). - Play the resulting file in
AVPlayer, or load it withAVURLAssetand printtracks— nosountrack. ffprobethe same file — the AAC stream is there.
Environment
- VisionCamera 5.2.2 (branch present in 5.2.3 as well)
- React Native 0.86.0, New Architecture
- iPad (9th generation), iOS 26.3.1; also reported by testers on iPhones running iOS 26
- Not reproducible below iOS 26, where the
[]path runs
Logs
Nothing is logged: the recording finishes normally and the file has the expected size. The only signal is the missing track in AVURLAsset.tracks.
Source: mrousavy/react-native-vision-camera