Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EAC-3 support #230

Open
liyuxi opened this issue May 25, 2018 · 21 comments
Open

EAC-3 support #230

liyuxi opened this issue May 25, 2018 · 21 comments
Labels
codec mapping spec_codecs Codec Matroska spec document target

Comments

@liyuxi
Copy link

liyuxi commented May 25, 2018

I watched a mkv with EAC-3 before,but I can't see EAC-3 CodecID in the spec

@dericed
Copy link
Contributor

dericed commented May 25, 2018

See this note here, #100 (comment). There were 83 files in archive.org using A_EAC3, I could look up those urls or associated muxers if needed.

@mbunkus
Copy link
Contributor

mbunkus commented May 26, 2018

E-AC-3 is stored with CodecID A_AC3, just like normal AC-3. Nothing to do here.

@mbunkus mbunkus closed this as completed May 26, 2018
@robUx4
Copy link
Contributor

robUx4 commented Jun 3, 2018

It may be good to know when an AC3 is actually of the enhanced kind, without having to parse the codec data. And since A_EAC3 already exists it should probably be used. libavf can read/write such files as well as VLC (which will transmit it the proper way over S/PDIF and HDMI).

@robUx4 robUx4 reopened this Jun 3, 2018
@mbunkus
Copy link
Contributor

mbunkus commented Jun 3, 2018

I disagree strongly. With the same argument, you could reintroduce A_AC3/BSID9 and similar sub-specifications, or introduce A_DTS/HD/MA, V_AVC/MAIN@L5.1 and similar ones. Additionally, other containers do not differentiate between those two easier — and decoders must be able to decode both simply by looking at the stream. Differentiating via the CodecID simply doesn't matter.

@robUx4
Copy link
Contributor

robUx4 commented Jun 3, 2018

We can add an optional CodecPrivate to store which format is used if a codec ID is not desired. Players supporting A_AC3 will see no difference. But IMO we need a way to indentify th variants before playback. It lets the user known which one has better quality when downloading/selecting a track.

@mbunkus
Copy link
Contributor

mbunkus commented Jun 3, 2018

The problem is that all players that support E-AC-3 do so with the codec ID A_AC3. It isn't given that they also support the codec ID A_EAC3 — which means that using A_EAC3 would be a drawback without any real benefit.

@robUx4
Copy link
Contributor

robUx4 commented Jun 3, 2018 via email

@mbunkus
Copy link
Contributor

mbunkus commented Jun 3, 2018

What, exactly, would be better? Why is doing it like it is done in MP4, MPEG-TS, AVI etc. not enough and insufficient?

@mbunkus
Copy link
Contributor

mbunkus commented Jun 3, 2018

And the real issue aren't VLC and ffmpeg, in fact, quite the opposite — those are the ones that are updated the most often in the wild. What is a problem is hardware devices which often never get updated at all. Switching to a different codec ID will only break support on those for no apparent benefit.

@JeromeMartinez
Copy link
Contributor

Why is doing it like it is done in MP4, MPEG-TS, AVI etc. not enough and insufficient?

MP4 has 2 dedicated atoms (dac3 and dec3, depending on the stream bsid).
MPEG-TS has 1 dedicated descriptor (AC-3_descriptor, which has a "enhanced AC-3" flag and a "bsid" field).

So if you want to do "like it is done in MP4, MPEG-TS", you need a CodecPrivate part with atom or descriptor (i.e. something not needed for decoding, but described in a "track header").

@mbunkus
Copy link
Contributor

mbunkus commented Jun 3, 2018

Alright, I'm obviously wrong about the other container formats. Sorry.

Still, my question remains: what actual benefits are there that would outweigh having to update software & hardware even if they can already play E-AC-3-as-A_AC3?

@JeromeMartinez
Copy link
Contributor

I didn't say I am in favor of changing the codec ID. actually I am in favor not to change it ;-).
from #230 (comment) I understand the idea is more to keep "A_AC3" Codec ID and add a "descriptor" for not having to probe the data for detecting AC-3 vs E-AC-3.
I am personally not in favor of using CodecPrivate, I think it should be used only for content needed for decoding (init stuff), so maybe using a new dedicated Matroska element for "descriptors" not mandatory for decoding.

@dericed
Copy link
Contributor

dericed commented Jun 3, 2018

If helpful here is a list of public files with A_EAC3

http://www.archive.org/download/08052017CAQM8844JR8HF/08052017CAQM.mkv
http://www.archive.org/download/Djdjfjd/Outcast.S02E05.1080p.WEBRip.X264-DEFLATE.mkv
http://www.archive.org/download/Dakar2017DiarioDelDakar72050pSpaSPPCCTEAM/Dakar%202017%20-%20Diario%20del%20Dakar%20720@50p%20Spa%20[SPPCCTEAM].mkv
http://www.archive.org/download/Dakar2017EspecialDakarRTVE72050pSpaSPPCCTEAM/Dakar%202017%20-%20Especial%20Dakar%20RTVE%20720@50p%20Spa%20[SPPCCTEAM].mkv
http://www.archive.org/download/Dakar2017Etapa01AsuncionResistencia72050pSpaSPPCCTEAM/Dakar%202017%20-%20Etapa%2001%20-%20Asuncion%20-%20Resistencia%20720@50p%20Spa%20[SPPCCTEAM].mkv
http://www.archive.org/download/Dakar2017Etapa02ResistenciaSanMiguelDeTucuman72050pSpaSPPCCTEAM/Dakar%202017%20-%20Etapa%2002%20-%20Resistencia%20-%20San%20Miguel%20de%20Tucuman%20720@50p%20Spa%20[SPPCCTEAM].mkv
http://www.archive.org/download/Dakar2017Etapa03SanMiguelDeTucumanSanSalvadorDeJujuy72050pSpaSPPCCTEAM/Dakar%202017%20-%20Etapa%2003%20-%20San%20Miguel%20de%20Tucuman%20-%20San%20Salvador%20de%20Jujuy%20720@50p%20Spa%20[SPPCCTEAM].mkv
http://www.archive.org/download/Dakar2017Etapa04SanSalvadorDeJujuyTupiza72050pSpaSPPCCTEAM/Dakar%202017%20-%20Etapa%2004%20-%20San%20Salvador%20de%20Jujuy%20-%20Tupiza%20720@50p%20Spa%20[SPPCCTEAM].mkv
http://www.archive.org/download/Dakar2017Etapa07LaPazUyuni72050pSpaSPPCCTEAM/Dakar%202017%20-%20Etapa%2007%20-%20La%20Paz%20-%20Uyuni%20720@50p%20Spa%20[SPPCCTEAM].mkv
http://www.archive.org/download/Dakar2017Etapa08UyuniSalta72050pSpaSPPCCTEAM/Dakar%202017%20-%20Etapa%2008%20-%20Uyuni%20-%20Salta%20720@50p%20Spa%20[SPPCCTEAM].mkv
http://www.archive.org/download/Dakar2017Etapa09SaltaChilecito72050pSpaSPPCCTEAM/Dakar%202017%20-%20Etapa%2009%20-%20Salta%20-%20Chilecito%20720@50p%20Spa%20[SPPCCTEAM].mkv
http://www.archive.org/download/Dakar2017Etapa10ChilecitoSanJuan72050pSpaSPPCCTEAM/Dakar%202017%20-%20Etapa%2010%20-%20Chilecito%20-%20San%20Juan%20720@50p%20Spa%20[SPPCCTEAM].mkv
http://www.archive.org/download/Dakar2017Etapa11SanJuanRioCuarto72050pSpaSPPCCTEAM/Dakar%202017%20-%20Etapa%2011%20-%20San%20Juan%20-%20Rio%20Cuarto%20720@50p%20Spa%20[SPPCCTEAM].mkv
http://www.archive.org/download/Dakar2017EtapaDeDescanso72050pSpaSPPCCTEAM/Dakar%202017%20-%20Etapa%20de%20Descanso%20720@50p%20Spa%20[SPPCCTEAM].mkv
http://www.archive.org/download/Dakar2017PresentacionPilotosEspanoles72050pSPPCCTEAM/Dakar%202017%20-%20Presentacion%20Pilotos%20Españoles%20720@50p%20[SPPCCTEAM].mkv
http://www.archive.org/download/Dhsjs/Outcast.S02E04.1080p.WEBRip.X264-DEFLATE.mkv
http://www.archive.org/download/Dkdkddj/Outcast.S02E05.1080p.WEBRip.X264-DEFLATE.mkv
http://www.archive.org/download/fsfaf/Outcast.S02E07.1080p.WEBRip.X264-DEFLATE[ettv].mkv
http://www.archive.org/download/LBRCW/Lo.and.Behold.Reveries.of.the.Connected.World.2016.1080p.WEBRip.DD5.1.x264-AM.mkv
http://www.archive.org/download/nzrwycpkwsxdordudumtfjexhzmfdepxnynjwdsnyvmqbywpdtqswudkrvjwjybzcexznsqyaomcdzzurqeomuiit1/nzrwycpkwsxdordudumtfjexhzmfdepxnynjwdsnyvmqbywpdtqswudkrvjwjybzcexznsqyaomcdzzurqeomuiit1.mkv
http://www.archive.org/download/oenfvqangkrfrgdrwafryqmbdaiqyvykjtjfydcpjssvxrthrxcrwfaigmutebubvthydyhbxrjbsayceutvkkmvr2/oenfvqangkrfrgdrwafryqmbdaiqyvykjtjfydcpjssvxrthrxcrwfaigmutebubvthydyhbxrjbsayceutvkkmvr2.mkv
http://www.archive.org/download/T83R0YA1SS03E02.720.H265/THE%20ROYALS%20S03E02.mkv
http://www.archive.org/download/T83R0YA1SS03E03.720.H265/THE%20ROYALS%20S03E03.mkv
http://www.archive.org/download/Td58d6r69/The.Originals.S04E07.1080p.WEBRip.DD5.1.x264-DONNA.mkv
http://www.archive.org/download/test304034403/Running.Wild.With.Bear.Grylls.S03E01.Nick.Jonas.1080p.AMZN.WEBRip.DD5.1.x264-CasStudio.mkv
http://www.archive.org/download/test304034403/Running.Wild.With.Bear.Grylls.S03E02.Julianne.Hough.1080p.AMZN.WEBRip.DD5.1.x264-CasStudio.mkv
http://www.archive.org/download/test304034403/Running.Wild.With.Bear.Grylls.S03E03.Courteney.Cox.1080p.AMZN.WEBRip.DD5.1.x264-CasStudio.mkv
http://www.archive.org/download/test343-04232/Running.Wild.With.Bear.Grylls.S03E04.Shaquille.O'Neal.1080p.AMZN.WEBRip.DD5.1.x264-CasStudio.mkv
http://www.archive.org/download/test343-04232/Running.Wild.With.Bear.Grylls.S03E05.Lindsey.Vonn.1080p.AMZN.WEBRip.DD5.1.x264-CasStudio.mkv
http://www.archive.org/download/test343-04232/Running.Wild.With.Bear.Grylls.S03E07.Marshawn.Lynch.1080p.AMZN.WEBRip.DD5.1.x264-CasStudio.mkv
http://www.archive.org/download/Cuntextually/Jim.Norton.Contextually.Inadequate.2015.1080p.WEBRip.DD5.1.x264-monkee.mkv
http://www.archive.org/download/CopaCatalunya2013FinalBarcelonaEspanyol01SimaoBarcelonaHD.plogspot.com/Copa%20Catalunya%202013%20Final%20-%20Barcelona%20-%20Espanyol%20%200-1%20Simao%20barcelona-HD.plogspot.com.mkv
http://www.archive.org/download/gwhw5h35u3/The.Originals.S04E08.1080p.WEBRip.DD5.1.x264-DONNA.mkv
http://www.archive.org/download/PE..TSV1tDDAn1mal1Sciencefun2O161O8OpX2641ta3NG/P-E.-.T-S%20-%20V1tà_dà_An1mal1%20-%20Sciencefun%202O16%201O8Op%20%20x264%201ta%203NG.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2001x02%20Catteries%20Not%20Included.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2001x04%20Flash%20The%20Wonder%20Dog.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2001x05%20Out%20To%20Launch.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2001x06%20Kiwi's%20Big%20Adventure.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2001x07%20Adventures%20In%20Squirrelsitting.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2001x09%20Risky%20Beesness.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2001x10%20Three%20Men%20And%20A%20Booby.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2001x12%20Bearing%20Up%20Baby.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x01%20Rescue%20Rangers%20To%20The%20Rescue,%20Part%201.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x02%20Rescue%20Rangers%20To%20The%20Rescue,%20Part%202.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x04%20Rescue%20Rangers%20To%20The%20Rescue,%20Part%204.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x05%20Rescue%20Rangers%20To%20The%20Rescue,%20Part%205.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x07%20The%20Luck%20Stops%20Here.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x08%20Battle%20Of%20The%20Bulge.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x11%20Fake%20Me%20To%20Your%20Leader.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x12%20Last%20Train%20To%20Cashville.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x13%20A%20Case%20Of%20Stage%20Blight.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x14%20The%20Case%20Of%20The%20Cola%20Cult.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x15%20Throw%20Mummy%20From%20The%20Train.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x16%20A%20Wolf%20In%20Cheap%20Clothing.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x17%20Robocat.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x18%20Does%20Pavlov%20Ring%20A%20Bell.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x19%20Prehysterical%20Pet.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x21%20Normie's%20Science%20Project.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x22%20Seer%20No%20Evil.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x23%20Chipwrecked%20Shipmunks.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x24%20When%20Mice%20Were%20Men.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x25%20Chocolate%20Chips.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x26%20The%20Last%20Leprechaun.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x28%20One-Upsman-Chip.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x30%20Love%20Is%20A%20Many%20Splintered%20Thing.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x32%20Double%20'O'%20Chipmunk.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x33%20Gadget%20Goes%20Hawaiian.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x34%20It's%20A%20Bird,%20It's%20Insane,%20It's%20Dale!.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x35%20Short%20Order%20Crooks.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x36%20Mind%20Your%20Cheese%20And%20Q's.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x37%20Out%20Of%20Scale.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x38%20Dirty%20Rotten%20Diapers.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x39%20Good%20Times,%20Bat%20Times.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x40%20Pie%20In%20The%20Sky.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x41%20Le%20Purrfect%20Crime.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x42%20When%20You%20Fish%20Upon%20A%20Star.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x44%20A%20Lean%20On%20The%20Property.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2002x46%20Gorilla%20My%20Dreams.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2003x01%20Zipper%20Come%20Home.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2003x03%20A%20Fly%20In%20The%20Ointment.mkv
http://www.archive.org/download/personal_default/Chip%20'N%20Dale%20Rescue%20Rangers%2003x04%20A%20Chorus%20Crime.mkv
http://www.archive.org/download/WCreek/Wolf.Creek.S01E01.Billabong.1080p.WEBRip.DD5.1.x264-Web4HD.mkv
http://www.archive.org/download/YnHTroll/Young%20&%20Hungry%20S02E21%201080p%20WEB-DL%20DD+%205.1%20x264-TrollHD.mkv

@robUx4
Copy link
Contributor

robUx4 commented Jun 4, 2018

A way to identify the proper codec flavour is crucial for players. For example VP9 doesn't tell which profiles it's using (because there wasn't in the first place) but now there are hardware that can decode new profiles and some that don't. The player has to go to lengthy analysis (a pre-decoder does the job) before deciding if it can use the hardware or not. Historically we have been using the CodecPrivate to store some codec init that usually include the profile. We do not have a proper way to add profiles properly. And I think it's too late for that now. We may rename it to CodecInit because it ain't so private anymore.

@robUx4
Copy link
Contributor

robUx4 commented Jun 4, 2018

Now do we want to know if a track is E-AC3 or basic AC3 ? IMO yes. It makes sense on the player side. IMO it makes sense on the cataloging side as well. All that without parsing inside the codec to know which is it.

We also want to use the fact that E-AC3 plays in regular AC3 setup since it works. So we should keep using A_AC3. But IMO we should signal in the CodecPrivate/CodecInit that it's E-AC3.

@JeromeMartinez
Copy link
Contributor

But IMO we should signal in the CodecPrivate/CodecInit that it's E-AC3.

I am not against an extra element, but I am not in favor of using CodecPrivate/CodecInit, because I think it should be used only for bytes needed for decoder init. Not the case here. Worse, it could break some players (you don't know what they do with CodecPrivate with AC-3/E-AC-3, possible side effect due to generic code)

@robUx4
Copy link
Contributor

robUx4 commented Jun 4, 2018

On the player side the CodecPrivate is usually provided to the decoder if it exists (no matter the codec) and it uses it if needed. It's not something you just append to the codec data stream. There is no (E)AC3 decoder that would use it right now.

The proper way would be to have an element defining profiles (still a binary blob depedent on the codec). But that would mean all other codecs with the profile currently in the CodecPrivate would need to have this data copied/moved in that new element. Or we have two ways to do it (the old one and the new one) that sucks for existing files/players. So even if it's not ideal I think it's better in the CodecPrivate/CodecInit/CodecBlob.

@mbunkus
Copy link
Contributor

mbunkus commented Jun 4, 2018

There is no (E)AC3 decoder that would use it right now.

Steve, you simply cannot know what all codecs out there will or won't do if they encounter CodecPrivate. I've had so many weird bug reports from people about their hardware not accepting Matroska files simply because one tiny little thing wasn't how they expected it to be. It is very, very dangerous to change currently used mappings that way.

The proper way would be to have an element defining profiles

Again, what would be the use? Decoders cannot rely on such an element being present. So they have to do the work of analyzing the bitstream anyway.

And what about changing profiles? For e.g. AVC/HEVC, there are tons of streams out there where SPS/PPS parameters change in the middle of the stream, often multiple times, at arbitrary places. Having a single static descriptor in the track headers wouldn't provide anything of real value here from a decoder's point of view — it would still have to handle the stream not being decodable from somewhere in the middle.

I really, really fear you're imposing a lot of work on a lot of people here (spec writers, people doing codec-/container-mappings, implementers of multiplexers) for very little actual benefit.

Anyway, all of this is very much off-topic for an issue dealing with A_EAC3. As for A_EAC, I'd be fine with adding that as a known codec mapping stating that it's basically the same as A_AC3 and that A_AC3 SHOULD be used for better compatibility with existing devices and software out there.

@JeromeMartinez
Copy link
Contributor

A_AC3 SHOULD be used for better compatibility with existing devices and software out there.

I am in favor of:

  • A_AC3 SHOULD be used for AC-3 and E-AC-3 streams
  • A_EAC3 SHOULD be supported by players as like A_AC3.
  • A_EAC3 SHOULD NOT be used by muxers.

@mbunkus
Copy link
Contributor

mbunkus commented Jun 4, 2018

That's what I'd prefer, too.

@mbunkus
Copy link
Contributor

mbunkus commented Sep 25, 2018

I just realized mkvmerge has been using A_EAC3 for ages, even though I've argued vehemently against its use in this issue. That totally slipped my mind. I'm… not sure how to feel about that. I'm also sorry for basing all of my arguments on wrong information.

@robUx4 robUx4 added the spec_codecs Codec Matroska spec document target label Dec 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codec mapping spec_codecs Codec Matroska spec document target
Projects
Codec specifications
Awaiting triage
Development

No branches or pull requests

5 participants