Skip to content

ffprobe misidentifies iPhone AAC audio as split-stereo instead of dual-mono

Probing iPhone .MOV files to decide whether audio is dual-mono (safe to downmix) or genuine split-stereo (must preserve channels), using an L-R RMS probe on the stereo AAC track. One clip failed the dual-mono test with real channel separation, which by the heuristic means a two-transmitter wireless-mic setup whose channels carry different content and must not be collapsed. No second mic was used — it was a single subject talking to a handheld phone, and the recording sounds like ordinary close-mic audio. ffprobe -show_entries stream=channels reports channels=2, channel_layout=stereo, matching every other clip in the archive that passes the dual-mono test fine. Also saw ffmpeg emit 'Could not find codec parameters for stream 2 (Audio: none (apac / 0x63617061), 48000 Hz, 4 channels, 394 kb/s): unknown codec' plus 'Guessed Channel Layout: 4.0' on the same file, and assumed that was an unrelated container quirk. Nothing errors and every render succeeds, so the only symptom is a channel-preservation decision that comes out backwards.

1 solution
ranked by outcome — not votes
Accepted

Root cause

The clip was recorded with iPhone Spatial Audio, which writes two audio streams, not one:

$ ffprobe -v error -show_entries stream=index,codec_type,codec_name,channels \
    -of default=nw=1 clip.MOV
index=1  codec_name=aac      codec_type=audio  channels=2
index=2  codec_name=unknown  codec_type=audio  channels=4   <- APAC

Stream 2 is APAC (Apple Positional Audio Codec, fourcc apac), the 4-channel ambisonic bed. The unknown codec warning is the actual tell, not an unrelated quirk — ffmpeg (through 9.0.1) has no APAC decoder.

The stereo AAC track is a binaural render of the room, so it has genuine L/R decorrelation from a single sound source. That is why an L-R RMS probe reports "true stereo" and why the conclusion is wrong: the separation encodes spatial position, not independent channel content.

The fix

An L-R probe alone cannot distinguish these two cases, so stop asking it to. Check the stream list first and branch on cause:

  • Spatial Audio (a second apac stream present): the stereo is one voice captured binaurally. Downmixing to mono is correct and desirable for speech.
  • Multi-transmitter rig (single stereo stream, channels fail the dual-mono test): the channels are separate sources. Preserve them.

In code, gate the decision on stream count/codec before trusting the RMS result, and record which case you concluded so a later pass doesn't re-derive it wrongly.

The APAC stream is otherwise harmless: -map 0:a:0, and ffmpeg's default "best audio stream" selection, both pick the AAC track, so transcoding, transcription and rendering all behave. You only need to know it exists because its side effect is corrupting a heuristic three steps away. Do not try to decode or map stream 2 — there is no decoder, and it carries no content you want for a speech edit.

Worth noting for anyone tempted to trust channels=2 as a proxy for "plain stereo capture": every clip in this archive reported channels=2, whether single-mic dual-mono or Spatial Audio. The channel count carries no information here; the stream list does.