MakeMKV picks wrong LPCM codec-id

Please post here for issues related to Blu-ray discs
thebiznatch
Posts: 7
Joined: Tue Feb 01, 2011 1:37 am

MakeMKV picks wrong LPCM codec-id

Post by thebiznatch » Tue Feb 01, 2011 1:46 am

Hi,

I have a registered version of MakeMKV. Running 1.6.3 on Windows 7 x64. Every time I rip a bluray with an LPCM track, it's not playable in any software. When i run mediainfo on it, the codec-id that MakeMKV picks is "A_MS/ACM". This is an extremely uncommon codec. I suspect MakeMKV should be setting this to something like "A_PCM/INT/BIG" or "A_PCM/INT/LIT".

Those 2 are the most common codecs for LPCM. I see google is full of forum posts from people who has this same issue over and over again. I suspect MakeMKV is simply picking the wrong codec-id when it generates the track. I'm investigating if a simple "mkvpropedit" on the file can fix it, but I'm not enough of an expert with this actual stuff.

Is this possibly a very simple reason that no one seems to play any LPCM tracks that MakeMKV rips?

-Joe

mike admin
Posts: 4075
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Re: MakeMKV picks wrong LPCM codec-id

Post by mike admin » Tue Feb 01, 2011 8:40 am

The root cause is a channel order. Generic A_PCM codec only packs data and there is no way to specify channel arrangement ( channels present and their type and order). The solution is to save a LPCM track inside the multi-channel WAV codec. MakeMKV saves LPCM as A_PCM for mono and stereo tracks and and as extended WAV for multi-channel tracks. You can demux this track with eac3to or mkvtoolnix, or play with mplayer. VLC knows about this format and can decode it from WAV files but fails to decode from MKV tracks. And yes, the payload is the same so you can edit two bytes in MKV header and get very compatible LPCM track, but without channel arrangement information.

thebiznatch
Posts: 7
Joined: Tue Feb 01, 2011 1:37 am

Re: MakeMKV picks wrong LPCM codec-id

Post by thebiznatch » Tue Feb 01, 2011 6:30 pm

The .mkv file generated by MakeMKV cannot have the PCM track extracted. When I try to demux it, I get an error along the lines "mkvextract doesn't know how to extract A_MS/ACM". Not sure what you mean that eac3to or mkvtoolnix can demux it.

The only workaround was for me to use AnyDVD, grab the original .ts file, and demux that. Then eventually recombine everything into an mkv using mkvmerge. Seems to work great and plays great in xbmc. Just a ton of extra work and steps.

The codec eventually picked by mkvmerge was "A_PCM/INT/LIT". I guess I don't understand why MakeMKV doesn't just pick that? I'm no expert, but I thought channel assignments were a pretty standard order. Can't MakeMKV just use A_PCM/INT/LIT and pick the most common standard for an order?

mike admin
Posts: 4075
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Re: MakeMKV picks wrong LPCM codec-id

Post by mike admin » Thu Feb 03, 2011 8:24 am

thebiznatch wrote:The .mkv file generated by MakeMKV cannot have the PCM track extracted. When I try to demux it, I get an error along the lines "mkvextract doesn't know how to extract A_MS/ACM". Not sure what you mean that eac3to or mkvtoolnix can demux it.
Latest version of mkvextract should be able to handle this track. Also, eac3to can demux MKV files as well.

MikeMcr
Posts: 13
Joined: Mon Feb 07, 2011 10:13 pm

Re: MakeMKV picks wrong LPCM codec-id

Post by MikeMcr » Mon Feb 07, 2011 10:30 pm

thebiznatch wrote:I have a registered version of MakeMKV. Running 1.6.3 on Windows 7 x64. Every time I rip a bluray with an LPCM track, it's not playable in any software. When i run mediainfo on it, the codec-id that MakeMKV picks is "A_MS/ACM". This is an extremely uncommon codec. I suspect MakeMKV should be setting this to something like "A_PCM/INT/BIG" or "A_PCM/INT/LIT".
I have the same problem. Having moved from ClownBD to MakeMKV, I found LPCM tracks created by MakeMKV fail to work on any software player and also on my Popcorn NMT hardware player (HDMI amp passthrough mode). However, the exact same Blu-ray can be ripped with ClownBD and outputs LPCM perfectly everywhere I try.

Like the original poster found, it seems MakeMKV is setting the wrong codec ID.

ClownBD rips set the audio as "PCM (Blu-ray) (Big / Signed)", Codec ID 128

MakeMKV rips set the audio as "PCM (Microsoft)", Codec ID 00001000-0000-0100-8000-00AA00389B71

Looks like I'll have to move back to ClownBD which is a shame as I really like MakeMKV.

thebiznatch
Posts: 7
Joined: Tue Feb 01, 2011 1:37 am

Re: MakeMKV picks wrong LPCM codec-id

Post by thebiznatch » Mon Feb 07, 2011 11:32 pm

What version of mkvextract are you using? I tried 4.4.0 and also tried the brand new 4.5.0 release. Same error occurs on both 4.4.0 and 4.5.0. Don't believe me, here is a snippet of my command-line:

C:\Video\movies>mkvextract --version
mkvextract v4.5.0 ('Speed of Light') built on Feb 1 2011 02:10:32

C:\Video\movies>mkvextract tracks "CasinoRoyale.mkv" 3:CasinoRoyale.wav
Error: Extraction of track number 3 with the CodecID 'A_MS/ACM' is not supported

If you google your own product, you'll see many, many, many complaints about "A_MS/ACM" and MakeMKV. http://www.google.com/search?q=makemkv+%22A_MS%2FACM%22

No one is having success playing these files even on something like VLC. Furthermore, competitive products pick "A_PCM/INT/LIT".

The documentation for Mastroska files point out that "A_MS/ACM" is an "uncommon" format. That is probably a good reason why many mainstream media players won't play it. That's probably a good reason why the mkvtoolnix apps won't extract them. Please visit this page and look at the description for "A_MS/ACM": http://wiki.multimedia.cx/index.php?title=Matroska

What's the issue with adjusting the MakeMKV product to simply use a different codec-id? I love your product, but this is the biggest thorn in my side. If you run google searches, you'll see I'm not alone. Please, please, please fix this :-)

mike admin
Posts: 4075
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Re: MakeMKV picks wrong LPCM codec-id

Post by mike admin » Tue Feb 08, 2011 10:03 am

I stand corrected, only eac3to can extract tracks like these.

thebiznatch
Posts: 7
Joined: Tue Feb 01, 2011 1:37 am

Re: MakeMKV picks wrong LPCM codec-id

Post by thebiznatch » Tue Feb 08, 2011 9:59 pm

Does that mean you'll look into fixing this in a future version of MakeMKV? Would be glad to beta test it. I have 3 BD discs with a confirmed issue.

I haven't tried eac3to on these files yet, but doesn't it seem like a hassle to extract the track using ea3to, then to merge it back in using mkvmerge? In the end, I think the entire process is just swapping the codec-id.

Also, ea3to is limited to 4GB files for .wav files, so for movies longer than 2 hours, eac3to splits the .wav into 2 files. I end up having to copy it over to a linux box, run "sox" on it to recombine the .wavs, to copy it back and use mkvmerge. It's a huge pain.

mike admin
Posts: 4075
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Re: MakeMKV picks wrong LPCM codec-id

Post by mike admin » Thu Feb 10, 2011 9:34 am

Ok, let me clarify. The issue is clearly apparent and will be corrected. As a quick fix you can always use hex editor to patch 2 bytes in MKV header so every program would recognize this audio format without re-encoding. The proper fix is planned in (near) future.

thebiznatch
Posts: 7
Joined: Tue Feb 01, 2011 1:37 am

Re: MakeMKV picks wrong LPCM codec-id

Post by thebiznatch » Thu Feb 10, 2011 9:45 pm

Cool. I'll look forward to the update.

I don't know which 2 bytes to replace or what bytes they should be replaced with. Any ideas on a command-line to run in linux that would search and replace? Would be a great workaround, I just am not quite sure what 2 bytes I should swap and what to swap them with.

thebiznatch
Posts: 7
Joined: Tue Feb 01, 2011 1:37 am

Re: MakeMKV picks wrong LPCM codec-id

Post by thebiznatch » Fri Feb 18, 2011 9:54 pm

For helping other users until MakeMKV fixes this issue, here is the easiest way to resolve this particular issue:

1. Rip bluray/hddvd using MakeMKV -- selecting the PCM track as something you want.
2. Use eac3to to extract PCM track as WAV. I use the HdBrStreamExtractor frontend. (Sorry, windows only at this point). The entire track (even >4GB ones) is correctly extracted as a .WAV file. NOTE: It will play in winamp at this point, but the length of the track is always wrong. Don't worry.
3. Use mkvtoolnix (mkvmerge) to reconstruct a new .mkv file. Include all the original tracks from the original .mkv file, but swap in the wav file in replace of the LPCM. At this point, make sure the order is correct for the soundtracks you want included in the final mkv. Most players will start from top to bottom as the preferred soundtrack and they pick the first one they can play. You can may also want to make sure "Default Track" is set to yes for the new PCM track.
4. The final MKV now has the PCM track set to the correct codec-id.
5. This file is playable in everything (VLC, XBMC, etc.)

A couple other notes:

1. XBMC plays the original MKV file without any issue. It clearly has no issue playing MS ACM tracks. VLC doesn't play them.
2. Do NOT rip the bluray to a .ts and then use tsMuxer to demux them. tsMuxer cannot extract > 4GB soundtracks without splitting them into 2 files. You then have to concatenate them back together in linux using something like sox. Use eac3to instead. It has no problem extracting such large WAV files.
3. VLC seems to play the final soundtrack incorrectly. The channel mappings are off. XBMC plays the final MKV (both original and remastered) beautifully.

Hope this helps anyone else who stumbles across this problem.

MikeMcr
Posts: 13
Joined: Mon Feb 07, 2011 10:13 pm

Re: MakeMKV picks wrong LPCM codec-id

Post by MikeMcr » Sat Feb 19, 2011 7:34 am

Thanks for those steps, it is very useful. Let's hope this is finally fixed in MakeMKV soon.

mike admin
Posts: 4075
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Re: MakeMKV picks wrong LPCM codec-id

Post by mike admin » Sat Feb 19, 2011 10:15 am

thebiznatch wrote:3. VLC seems to play the final soundtrack incorrectly. The channel mappings are off. XBMC plays the final MKV (both original and remastered) beautifully.
This is the whole reason to use extended WAV - to preserve channel mappings. Ironically VLC has no problem playing extened WAV file from a file, but chokes on the same file in MKV container.

tester22
Posts: 1
Joined: Sat Feb 19, 2011 11:04 am

Re: MakeMKV picks wrong LPCM codec-id

Post by tester22 » Sat Feb 19, 2011 11:13 am

Hello , i test new version and i see Codec ID : FFFE i hope this work but not :(

Again test my Blu-Rey The_Fifth_Element_1997_Remastered and have the same problem like before KMPlayer not recognize LPCM .

Code: Select all


MakeMKV wrong codec id again :( and not working .

   Audio #3
      ID : 3
      Format : PCM
      Codec ID : FFFE
      Codec ID/Info : Extensible
      Duration : 2h 5mn
      Bit rate mode : Constant
      Bit rate : 4 608 Kbps
      Channel(s) : 6 channels
      Sampling rate : 48.0 KHz
      Resolution : 16 bits
      Stream size : 4.05 GiB (14%)
      Title : 3/2+1
      Language : English

      =====================================

Other tools that i test work normal and KMPlayer show LPCM when play the movie .

   Audio #3
      ID : 3
      Format : PCM
      Codec ID : A_PCM/INT/LIT
      Duration : 3mn 40s
      Bit rate mode : Constant
      Channel(s) : 6 channels
      Sampling rate : 48.0 KHz
      Resolution : 16 bits
      Video delay : -42ms
      Language : English

Hope this will help you to fix this again .

Thanks.

EvertonMonkey
Posts: 1
Joined: Tue Apr 05, 2011 9:51 am

Re: MakeMKV picks wrong LPCM codec-id

Post by EvertonMonkey » Tue Apr 05, 2011 10:01 am

Is this something that can be fixed or is still planed to be fixed in MakeMKV ?

Any Blu-rays I have tried with LPCM soundtracks dont get "passed through" to my AV receiver.

Post Reply