Skip to content

TrueHD Atmos missed (and channel layout wrong) when the Atmos substream does not start at the beginning of the stream #2685

Description

@Sawtaytoes

MediaInfo v25.04 (CLI, MediaInfoLib - v25.04, Linux x86-64) reports a Blu-ray TrueHD
Atmos track as plain Dolby TrueHD whenever the Atmos substream does not start at the
very beginning of the stream. It also reports the wrong channel layout for that same
track. Running the read on a 60-second clip of the same track shows it is not about how
big the file is — it looks like the detection only ever inspects the first frames.

I hit this on a feature film where the Atmos substream begins somewhere between 20 and 40
seconds in (studio logos first). It made me think a disc rip I made myself had lost Atmos,
and I nearly went and re-ripped the disc over it.

What I measured

Same TrueHD track every time, only the byte range differs. Each sample was cut with
ffmpeg -c copy, so the audio frames are untouched.

Read Format_Commercial_IfAny Format_AdditionalFeatures
whole file Dolby TrueHD (absent)
whole file with --ParseSpeed=1.0 Dolby TrueHD (absent)
60 s starting at 0 s (24 MB file) Dolby TrueHD (absent)
300 s starting at 0 s (118 MB file) Dolby TrueHD (absent)
20 s starting at 20 s Dolby TrueHD (absent)
20 s starting at 40 s Dolby TrueHD with Dolby Atmos 16-ch
20 s starting at 60, 90, 120, 180, 300, 600 s Dolby TrueHD with Dolby Atmos 16-ch

The 60-second sample is the one that matters: it contains the point where the Atmos
substream starts, it is 24 MB, and it still reports no Atmos.

The channel layout is wrong in the same read

This is the part I did not expect. The track is 7.1. On the read that misses Atmos:

"Channels": "6",
"ChannelPositions": "Front: L C R, Side: L R, LFE",
"ChannelLayout": "L R C LFE Ls Rs",

On the read that finds Atmos, from a later offset in the same track:

"Channels": "6",
"Channels_Original": "8",
"ChannelPositions_Original": "Front: L C R, Side: L R, Back: L R, LFE",
"ChannelLayout_Original": "L R C LFE Ls Rs Lb Rb",
"extra": { "NumberOfDynamicObjects": "11", "BedChannelCount": "1", "BedChannelConfiguration": "LFE" }

So three reported values change depending on where in the stream you read: the commercial
format name, Format_AdditionalFeatures, and the channel layout.

It is not file size

Two controls, both large, both correct on a plain whole-file read, because their Atmos
substream is there from the first frame:

  • a 73 GB file: Dolby TrueHD with Dolby Atmos, 16-ch
  • an 80 GB file: Dolby TrueHD with Dolby Atmos, 16-ch

So a big file is fine. A stream that starts without the substream is not.

Repro

ffmpeg -v error -t 60 -i <film>.mkv -map 0:a:0 -c copy head60.mka
ffmpeg -v error -ss 60 -t 20 -i <film>.mkv -map 0:a:0 -c copy mid20.mka
mediainfo --Output=JSON head60.mka   # Dolby TrueHD
mediainfo --Output=JSON mid20.mka    # Dolby TrueHD with Dolby Atmos, 16-ch

Any TrueHD title whose opening reel has no Atmos substream should do it.

What I would expect

That the MLP major-sync scan keeps going past the first frames until it finds the
substream, or at least far enough in to clear the opening logos. Right now the only
reliable way to know whether a TrueHD track is Atmos is to cut a sample out of the middle
of the film and read that instead, which is not something most people are going to think
of doing.

I can put a sample together if one would help — say what length and offset you want.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions