MediaInfoLib icon indicating copy to clipboard operation
MediaInfoLib copied to clipboard

E-AC-3/DTS-HD/TrueHD with embedded streams: meaning of the different Format attributes?

Open jdayx opened this issue 5 years ago • 6 comments

This might be related to https://github.com/MediaArea/MediaInfoLib/issues/1053

I am confused by how Format from the Full output works, for instance with https://github.com/MediaArea/MediaInfoLib/files/4424113/00007.ac3.gz, EAC3 comes second :

Format                                   : AC-3
Format                                   : E-AC-3

The non-Full output shows the correct format.

Format                                   : E-AC-3

I have tested other files from https://samples.ffmpeg.org/A-codecs/AC3/eac3/

For example 7_pt_1.eac3.gz (EAC3 with an EAC3 substream) has:

Format                                   : E-AC-3
Format                                   : E-AC-3

Does this mean that the first Format is always the embedded one?

Shouldn't the embedded format be the second one and the main format first? It is a bit confusing and it seems to happen for DTS HD MA too.

Format                                   : DTS
Format                                   : DTS XLL

It's also even more confusing because matrix2_english_5.1_640.eac3.gz has no embedded stream and Format is still present twice.

Format                                   : E-AC-3
Format                                   : E-AC-3

More examples: TrueHD+AC3, AC3 comes first too:

Format                                   : AC-3
Format                                   : AC-3 MLP FBA 16-ch

But TrueHD without anything embedded: two different formats, why?

Format                                   : MLP FBA
Format                                   : MLP FBA 16-ch

I'm sorry about the wall of text, I hope there is an explanation for all this. It looks like in the case when an embedded stream exists, its codec is the first format. But when there isn't, there are still two formats, sometimes they different and I don't understand why.

jdayx avatar Apr 02 '20 23:04 jdayx

00007.ac3: this file is AC-3 core + E-AC-3 dependency, it could be detected as AC-3 by legacy decoders, reason there is a "AC-3" format line (mainly for legacy reasons).

7_pt_1.eac3: this file is E-AC-3 core + E-AC-3 dependency, so no "AC-3" format line.

matrix2_english_5.1_640.eac3: this file is E-AC-3 core only (no "dep").

Generally speaking, first "Format" line contains the most compatible (the oldest) format, second "Format" line contains the less compatible (the newest) format.

More examples: TrueHD+AC3, AC3 comes first too:

This one may be a bug compared to what was expected, I'll check that.


Now (since v20.03) we have the support of nested elements and the possibility to display sub-streams, I am think to add the "legacy" parts at this place, so the internals of the file (the "core" part) could be easier to understand.

JeromeMartinez avatar Apr 08 '20 15:04 JeromeMartinez

Generally speaking, first "Format" line contains the most compatible (the oldest) format, second "Format" line contains the less compatible (the newest) format.

OK I understand that. But at the moment, I can't really see the difference between EAC3 with embedded EAC3 and EAC3 with no dependent substream.

we have the support of nested elements and the possibility to display sub-streams

What option do I need to use to do that? Or is it not yet implemented?

Also, you haven't answered my question about MLP FBA 16-ch and MLP FBA for TrueHD. Is that another bug?

jdayx avatar Apr 13 '20 20:04 jdayx

What option do I need to use to do that? Or is it not yet implemented?

This is implemented in the core of the tool, used for the moment for AC-4 and MPEG-H Audio, for the "presentations" and "presets". See this screenshot for an example. It is not yet implemented for showing legacy streams on "older" formats like AC-3 and DTS, but this is something I am thinking about.

Also, you haven't answered my question about MLP FBA 16-ch and MLP FBA for TrueHD. Is that another bug?

This is similar to the previous answer, Generally speaking, first "Format" line contains the most compatible (the oldest) format, second "Format" line contains the less compatible (the newest) format. Here oldest format is "MLP FBA" and newest format is "MLP FBA 16-ch" ("MLP FBA" with "16-ch" additions).

This is far from perfect, but the "less worse" method for making development not too hard, keeping some info, and having sponsors what they wanted.

JeromeMartinez avatar Apr 13 '20 20:04 JeromeMartinez

I see, thanks. Can you link an example AC-4 file so I can see what the CLI output looks like on one of those?

jdayx avatar Apr 13 '20 21:04 jdayx

about MLP FBA 16-ch and MLP FBA for TrueHD. Is that another bug?

Yes, that was a bug. In ffmpeg. https://github.com/FFmpeg/FFmpeg/commit/99c191151a716d8315e938297bd9b50a6a0902d3

you link an example AC-4 file

Sure, read it all. https://trac.ffmpeg.org/ticket/8349#comment:33

ValZapod avatar Feb 11 '21 10:02 ValZapod

BTW, this code https://github.com/MediaArea/MediaInfoLib/blob/5e8b59097e0c252c453e02f17364b515aa6a2cde/Source/MediaInfo/Audio/File_Ac3.cpp#L211

cannot parse Vhl/Vhr pair.

000036EC chanmap: 40976 (0xA010) - (16 bits) - Front: L R

ValZapod avatar Sep 26 '22 01:09 ValZapod