MP2 or AC3 clipping problem

Locked
User avatar
kmv
Joined: Mon Mar 03, 2003 8:31 am
Location: Another day, another city
Org Profile

MP2 or AC3 clipping problem

Post by kmv » Fri Oct 06, 2006 4:36 pm

Hi all,

I have a WAV that sounds fine, but after I encode it to MP2 or AC3 it distorts badly in few places. I can see in the source that where it is distorting it is clipped – but as I said the WAV doesn’t sound too bad.

I am using BeSweet and BeLight. For the MP2 encode I have tried both TooLame and MP2Enc at a number of bit rates all the way up to 320, and I am using “Stereo” as the source is standard stereo (although I have also tried Joint and Dual to see if it would make a difference).

I have tried turning all gain processing off.

As you can probably guess from the formats this is for a DVD encode.

Has anyone seen this before?

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

Post by Scintilla » Fri Oct 06, 2006 6:20 pm

What if you normalize the WAV before encoding it, does that fix it?

Though it's unlikely, it's possible that the WAV is at a higher bit depth than MP2/AC3 can support and has some parts that don't clip at, say, 24 bits but do at 16.
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

User avatar
kmv
Joined: Mon Mar 03, 2003 8:31 am
Location: Another day, another city
Org Profile

Post by kmv » Sat Oct 07, 2006 5:30 pm

Thanks for the reply Scintilla.
Scintilla wrote:What if you normalize the WAV before encoding it, does that fix it?
Actually I tried that too, and it didn’t.

Scintilla wrote:Though it's unlikely, it's possible that the WAV is at a higher bit depth than MP2/AC3 can support and has some parts that don't clip at, say, 24 bits but do at 16.
That would be a good theory were it not for the fact that the file is already 16 bit PCM.

The original track in question started life with a sample rate of 32k (it is a vocal track), but became 44k after export from Premiere. In addition to doing the encode with the 44k file, I have also upsampled it to 48k (since that is what DVD is normally at) and tried that too. All have had no effect.

The PCM WAV sounds fine at both 44k and 48k, it is only after the MP2 or AC3 encode that the clipped areas start distorting.

[sigh]


If you think it would help, I could post a portion of the file at 48k WAV and a corresponding MP2.

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

Post by Scintilla » Sat Oct 07, 2006 6:37 pm

It would probably help, yes. I'm wondering if normalizing to something less than the usual 0 dB would help...
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

User avatar
kmv
Joined: Mon Mar 03, 2003 8:31 am
Location: Another day, another city
Org Profile

Post by kmv » Mon Oct 09, 2006 6:45 pm

Scintilla wrote:It would probably help, yes. I'm wondering if normalizing to something less than the usual 0 dB would help...
Here is a zip file (1.7Mb) containing a WAV, AC3, and an MP2 of the problem I am referring to.

However, in putting this together I refreshed my copy of BeSweet, and now the MP2 encode seems fine. Additionally, now that I think about it I think this happened once before (where it was OK for a brief period and then reverted to the problem state). I am starting to wonder if part of my problem may be another codec on my machine.

In any case the AC3 is still just as bad as it ever was. Have a listen to both, can you hear the problem?

If MP2 encode is working then I have a work around, but I would still like to know how to fix this kind of problem in general.

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

Post by Scintilla » Mon Oct 09, 2006 7:01 pm

Huh. Yeah, I can definitely hear the AC3 problem; however, I just tried encoding the WAV to AC3 (384kbps) with BeSweet now, and the resulting file played fine (albeit quieter than the WAV and MP2, but so was the AC3 you included in the ZIP archive). If it helps, I used Motorola endians instead of Intel. Maybe your AC3 encoder is just in need of an update?

Also, Adobe Audition is showing some possible clipping in the .WAV file, so the file probably should be hard limited or normalized anyway.
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

User avatar
kmv
Joined: Mon Mar 03, 2003 8:31 am
Location: Another day, another city
Org Profile

Post by kmv » Mon Oct 09, 2006 7:13 pm

Scintilla wrote:I just tried encoding the WAV to AC3 (384kbps) with BeSweet now, <snip> I used Motorola endians instead of Intel. Maybe your AC3 encoder is just in need of an update?
This is weird - I used BeSweet too (at 384kb and with Motorola endians). I will go on a DLL hunt; perhaps I have another copy of ac3enc.dll somewhere.
Scintilla wrote:Also, Adobe Audition is showing some possible clipping in the .WAV file, so the file probably should be hard limited or normalized anyway.
Yes, it is defiantly clipped - I can see it clearly in Audacity. My problem has been dealing the resultant distortion after encoding, and thus far I haven’t found normalisation any help, it still distorts - but quieter.

User avatar
kmv
Joined: Mon Mar 03, 2003 8:31 am
Location: Another day, another city
Org Profile

Post by kmv » Mon Oct 09, 2006 7:15 pm

gah! Definitely.

Locked

Return to “Video & Audio Help”