Demuxed stereo LPCM is messed up (bad header?)

User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Demuxed stereo LPCM is messed up (bad header?)

Post by SomeHumanPerson »

I've seen this on a number of discs now. The most recent ones are:

https://www.amazon.co.uk/On-the-Run-Blu ... B09YRK8N4L
https://www.amazon.co.jp/KihachirA-Kawa ... B09MJ74TH1

(I'm sorry that they are not exactly mainstream releases, but stereo LPCM isn't very common. Seems like most studios prefer DTS-MA for older mono or stereo films these days.)

Anyway, the problem:

The LPCM 2.0 audio tracks show up in DGDemuxGUI as "PCM RES RES RES [lang]" instead of showing the actual bitrate, sample rate, and channel count. When demuxed, the resulting .w64 file has bizarre values for those specs when checked in MediaInfo or ffmpeg:

Code: Select all

General
Complete name                            : E:\MMYY PID 1100 zho DELAY 0ms.w64
Format                                   : Wave64
File size                                : 1.44 GiB
Duration                                 : 7 s 793 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 1 585 Mb/s

Audio
Format                                   : PCM
Format settings                          : Little / Signed
Codec ID                                 : 1
[b]Duration                                 : 7 s 793 ms[/b]
Bit rate mode                            : Constant
Bit rate                                 : 1 585 Mb/s
[b]Channel(s)                               : 35 840 channels
Sampling rate                            : 2 152 MHz
Bit depth                                : 102 bits[/b]
Stream size                              : 1.44 GiB (100%)

ReportBy                                 : MediaInfoLib - v22.12
Demuxing the same track with eac3to v3.34 yields a normal PCM .WAV file with the correct values (in this specific case it also strips 8 bits of padding because the audio is actually only 16-bit, but the same thing happens with "real" 24-bit too):

Code: Select all

General
Complete name                            : E:\MMYY.wav
Format                                   : Wave
File size                                : 982 MiB
Duration                                 : 1 h 29 min
Overall bit rate mode                    : Constant
Overall bit rate                         : 1 536 kb/s

Audio
Format                                   : PCM
Format settings                          : Little / Signed
Codec ID                                 : 00000001-0000-0010-8000-00AA00389B71
[b]Duration                                 : 1 h 29 min[/b]
Bit rate mode                            : Constant
Bit rate                                 : 1 536 kb/s
[b]Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz[/b]
Bit depth                                : 16 bits
Stream size                              : 982 MiB (100%)

ReportBy                                 : MediaInfoLib - v22.12
If you want me to do more testing before you consider ordering one of these discs, please advise.
User avatar
Rocky
Posts: 3466
Joined: Fri Sep 06, 2019 12:57 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Rocky »

Thank you for your report. I have ordered the first disk. It may be some time before it is delivered so please be patient.
User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Demuxed stereo LPCM is messed up (bad header?)

Post by SomeHumanPerson »

No problem, and thank you for looking into it.
User avatar
Sherman
Posts: 576
Joined: Mon Jan 06, 2020 10:19 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Sherman »

Rocky forgot to say: Welcome to the forum!
User avatar
Rocky
Posts: 3466
Joined: Fri Sep 06, 2019 12:57 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Rocky »

My bad.
User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Demuxed stereo LPCM is messed up (bad header?)

Post by SomeHumanPerson »

Sherman wrote:
Fri Mar 24, 2023 7:39 pm
Rocky forgot to say: Welcome to the forum!
:hat:
User avatar
Britney
Posts: 145
Joined: Sun Aug 09, 2020 3:24 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Britney »

A real man! Slide into my PMs.
User avatar
Natasha
Posts: 150
Joined: Wed Nov 20, 2019 11:11 am

Demuxed stereo LPCM is messed up (bad header?)

Post by Natasha »

User avatar
Baltasar
Posts: 60
Joined: Tue Nov 02, 2021 9:51 am

Demuxed stereo LPCM is messed up (bad header?)

Post by Baltasar »

User avatar
Britney
Posts: 145
Joined: Sun Aug 09, 2020 3:24 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Britney »

User avatar
Sherman
Posts: 576
Joined: Mon Jan 06, 2020 10:19 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Sherman »





User avatar
Rocky
Posts: 3466
Joined: Fri Sep 06, 2019 12:57 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Rocky »

Disk scheduled for arrival tomorrow.
User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Demuxed stereo LPCM is messed up (bad header?)

Post by SomeHumanPerson »

Superb! Faster than I expected.
User avatar
Rocky
Posts: 3466
Joined: Fri Sep 06, 2019 12:57 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Rocky »

Yeah, well, that's because I misread the tracking info and mistook May for April. Actual window is April 6 to May 2.
User avatar
Sherman
Posts: 576
Joined: Mon Jan 06, 2020 10:19 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Sherman »

We forgive you, Rocky.



User avatar
Rocky
Posts: 3466
Joined: Fri Sep 06, 2019 12:57 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Rocky »

Disk is in hand. Ripping now...
User avatar
Rocky
Posts: 3466
Joined: Fri Sep 06, 2019 12:57 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Rocky »

OK, I understand the problem. Now how to fix it?

It's actually a regression of the fix made for this issue:

https://www.rationalqm.us/board/viewtop ... =16&t=1214
User avatar
Rocky
Posts: 3466
Joined: Fri Sep 06, 2019 12:57 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Rocky »

Please test this fix. Just update DGDemux.exe from this:

https://rationalqm.us/misc/DGDemux_lpcm.rar
User avatar
Rocky
Posts: 3466
Joined: Fri Sep 06, 2019 12:57 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Rocky »

I went ahead and released fixes for DGDemux/DGDemuxGUI and DGDecNV. Marking resolved.
User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Demuxed stereo LPCM is messed up (bad header?)

Post by SomeHumanPerson »

Sorry for being slow to respond; I was away for a few days.

In any case, thank you for jumping on this so quickly. I'll grab the updated version and try it out today.
User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Demuxed stereo LPCM is messed up (bad header?)

Post by SomeHumanPerson »

Looks good!

I'm mildly surprised that I didn't notice it being a regression, but discs like this are uncommon enough that maybe I'd never run into one before that point while using DGDemux (to notice that it once had worked).

In any case, thank you again!

:salute:
User avatar
Rocky
Posts: 3466
Joined: Fri Sep 06, 2019 12:57 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Rocky »

You're welcome and thank you for your update. I think it was actually broken for all PCM streams, and not just this exotic flavor. Definitely that is the case when only PCM is present. If other audio types were also present, then it depended on the order of their first appearance in the stream. Whatever, it's good to have this fixed.
User avatar
Curly
Posts: 702
Joined: Sun Mar 15, 2020 11:05 am

Demuxed stereo LPCM is messed up (bad header?)

Post by Curly »

Rocky kicked butt on this. Where's Sherman?
User avatar
Sherman
Posts: 576
Joined: Mon Jan 06, 2020 10:19 pm

Demuxed stereo LPCM is messed up (bad header?)

Post by Sherman »

Right here:

User avatar
Natasha
Posts: 150
Joined: Wed Nov 20, 2019 11:11 am

Demuxed stereo LPCM is messed up (bad header?)

Post by Natasha »

Give it up, Sherman. She hit the wall.

Post Reply