Log in

View Full Version : Cracks and pops in BD playback (Avatar) with MPC-HC


mikeggsm
2nd June 2010, 00:18
Right at the very beginning, just after the 20th Century Fox logo at 00:24 (edit: BD = Avatar, region B), there is a deep, low bass drum. When this drum hits, I have significant cracks and pops.

The same bass drum hits at 00:32 and again, cracks and pops.

It always happens exactly the same way at the same time.

Any idea?

MPC-HC build 1984, audio filter is "AC3Filter"

Thanks.

dansrfe
2nd June 2010, 01:04
Use ffdshow audio decoder with libdts as the designated DTS decoder. AC3Filter has some problems with DTS playback I have heard.

mikeggsm
2nd June 2010, 01:28
The exact same clicks and pops happen with ffdshow's libdts (and libavcodec too), and also with "DTS Decoder", MPC-HC's internal filter.

I've read somewhere that DTS sound has its dynamic range reduced when played on PCs. Could it be because that bass drum suddenly uses a larger dynamic range and the clicks and pops happen when the range adjustements are made? Does this make any sense?

dansrfe
2nd June 2010, 01:48
I have the exact same bluray and it works perfectly with ffdshow audio decoder and libdts. Make sure all the internal MPC decoders are unchecked and there is nothing else that is intercepting the DTS-MA feed to ffdshow. In your filters list in MPC-HC it should have ONLY ffdshow audio decoder as the audio decoder, 1 splitter (I recommend the internal MPEG PS, TS Splitter) and your AVC decoder (in my case CoreAVC).

mikeggsm
2nd June 2010, 01:57
The chain as displayed by ffdshow audio is:

MPC - Mpeg Source (Gabest)
ffdshow Audio Decoder
MPC Video Decoder
Audio Switcher
Enhanced Video Renderer
Directsound Audio Renderer
NullTextRenderer

It may have something to do with LFE being played on my headphones (Sony MDR 7506): that bass drum is supposed to have some heavy LFE and maybe the headphones can't render them?

dansrfe
2nd June 2010, 02:14
Check the MPEG PS/TS/PVA in the internal filter list. Disable internal audio switcher in mpc. Disable all internal filters on the MPC page except for the MPC Video decoder you're using. if you don't have CoreAVC I would personally recommend using ffdshow's video decoder with ffmpeg-mt or using the DXVA decoder. Change Directsound to "Directsound: (output devive)". I have no clue what NullTextRenderer is. Also in the mixer of ffdshow audio decoder tick it and select dolby pro logic II and tick LFE and tick the Volume checkbox in the audio decoder options while you're at it.

mikeggsm
2nd June 2010, 02:40
The problem is definitely related to LFEs because the clicks and pops almost completely disappear if, in ffdshow audio, I check "LFE Crossover" and check "remove low frequencies added to LFE from left and right channel". If, in addition, I put the lowpass frequency at the maximum (300), then they disappear completely.

But that is a fix which does not address the source of the problem, which is the MPC internal audio switcher's "Normalize" function. Apparently the normalization doesn't agree with LFEs: if I uncheck "Normalize", the problem goes away immediately. But now the volume a bit low compared to other Windows sounds.

Something learned. I'll try to fool around with the "Enable custom channel mapping" option in the audio switcher to see if the LFE normalization problem can be solved.

EDIT: I am not sure how "Normalize" works, I suppose the audio stream is analyzed to see what the maximum volume is, and then that maximum volume is scaled to a constant, reasonable value. But I'd be surprised if the whole film's audio stream was analyzed to find the maximum volume -- I guess the normalization is local and loudness can fluctuate over time, which may be why there are clicks and pops when normalizing the LFE channel: LFEs are usually silent and just come up once in a while; the normalization routine is surprised to see a sudden volume peak in the LFE channel after almost constant silence, maybe the peak is too high compared to the average?

mikeggsm
2nd June 2010, 04:10
I forgot to thank you for your help. Follow-up to the problem if you're interested (doubtful...):

When using Normalize I have the same cracks and pops problem with a few mkv files which are regular two channel stereo, no LFE channel. The pops appear precisely when there are low, deep sound effects.

Bottom line: normalize just seems to suck at dealing with very low frequencies.

This makes sense if normalize works in audio just like dynamic contrast works in video -- it tries to determine a maximum level "locally in time" (kind of an "instantaneous" maximum level) and scales it to a reasonable value. But it's impossible to determine an "instantaneous" level for very low frequencies because they don't repeat themselves enough times within a small period of time. So the scaling value becomes alternatively too low and too high, and when it's too high the sound clips, hence the clicks and pops.

dansrfe
2nd June 2010, 04:39
That's true but I don't think it actually normalizes the LFE channel for this very reason. btw did you try normalizing in ffdshow audio decoder? MPC's internal filters aren't that great in comparison to using ffdshow decoders. I would completely eliminate any decoding from MPC and let ffdshow do all the decoding.

ranpha
2nd June 2010, 05:43
It may have something to do with LFE being played on my headphones (Sony MDR 7506): that bass drum is supposed to have some heavy LFE and maybe the headphones can't render them?

Is that headphone of yours a stereo headphone or does it has a surround configuration with its own LFE channel?

mikeggsm
2nd June 2010, 05:54
Is that headphone of yours a stereo headphone or does it has a surround configuration with its own LFE channel?

They are regular stereo headphones.

That's true but I don't think it actually normalizes the LFE channel for this very reason

That's very possible but normalize still screws up any low frequency content, whether it comes from the LFE channel or not -- as proved by the fact that the same cracks and pops problem happens when very low frequencies are played in mkv files which are regular two-channel stereo.

btw did you try normalizing in ffdshow audio decoder?

I just did. Interestingly ffdshow's tooltips explain exactly what normalize does:

- if you don't check "regain volume", then the normalization is one-pass, apparently meaning that ffdshow determines the maximum volume "once and for all" and normalizes to that volume. Obviously it only has access to the audio stream as it is played (not the whole movie's stream at once) so it doesn't know what kind of levels are going to come up in the future -- but it displays the "current amplification" percentage, and looking at that value it seems that if bigger volumes come up in the future then ffdshow just lowers that "current amplification" percentage permanently. The value can only go down -- in other words ffdshow determines the peak volume for the complete stream it has seen so far, and then normalizes to that constant value.

- if you check "regain volume" then ffdshow reevaluates the maximum volume constantly in time, which creates the cracks and pops problem with low frequencies, even in ffdshow.

But ffdshow's normalization (without regain volume) doesn't produce the cracks and pops whereas MPC-HC's normalization does. However I don't think it's because ffdshow's algorithms are better, it's simply because ffdshow normalizes to a lower value (as proved by the fact that it just sounds a lot louder with MPC), so the low-frequency audio is less likely to clip. And MPC's normalization cracks and pops even if you don't check MPC's regain volume option. So if ffdshow's normalization amplified as much as MPC's does, then it would crack and pop in low frequencies just like MPC's.

I think all these functions just fail at determining the volume of very low frequencies (probably because these frequencies don't repeat fast enough). I just don't trust these normalizations anymore, it's the equivalent of dynamic contrast in video, and I don't really like dynamic contrast. I think I'll use MPC's constant boost, which just scales each audio sample by a constant value.

ranpha
2nd June 2010, 06:54
If you have a stereo headphone, does the problem still happen if you downmix the audio stream to stereo (without LFE) in 'Mixer' filter?

Do not use the 'LFE Crossover' filter if your don't have a surround headset, because you will lose low-frequency information.

Do not use the 'Volume' filter either.

If you want to normalize volume, enable the 'Normalize matrix' function in 'Mixer' filter.

Then enable MPC-HC normalize volume function in Audio Switcher and see if the pop-up still happened or not. Do not use the custom channel function.

mikeggsm
2nd June 2010, 21:20
Yes, LFE Crossover does remove the clicks and pops, but it's throwing the baby with the bathtub water: since the pops happen in low frequencies, removing them removes the pops...

If you want to normalize volume, enable the 'Normalize matrix' function in 'Mixer' filter.

I believe "Normalize matrix" does not normalize volume in the sense that "normalize" in MPC does (it does not scale the volume to a reasonable level). It only normalizes the transformation between source channels configuration (eg 5.1) and the chosen speaker configuration (2/0/0 Stereo in my case), so that the overall level is equal to what you would get if you had the same speaker configuration as the source (i.e. if I had a 5.1 system). The content of the stream is irrelevant and not even inspected, only its speaker configuration is relevant. If the source volume is constantly very low, it will still be very low after "normalize matrix" because the actual volume value is completely disregarded: this is not volume normalization.

But as I've explained in my last post, I now think volume normalization is always a mistake: if the source volume is too low, boost it by hand by a constant factor (eg with boost in MPC), but any attempt to normalize volume automatically will determine a wrong volume in low frequency content, which introduces audible distortion and clipping.

ranpha
3rd June 2010, 02:51
Normalize matrix doesn't normalize volume per se, but if you downmix multichannel audio to stereo, it will help ensure that no channel is no louder or softer than the others when they were merge into 2 channels. Unless of course you like cases such as where the center channel is too soft compared to the the others. Matrix normalization is quite important if you do things like downmixing.