MP2 or AC3 clipping problem
- kmv
- Joined: Mon Mar 03, 2003 8:31 am
- Location: Another day, another city
MP2 or AC3 clipping problem
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?
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?
- Scintilla
- (for EXTREME)
- Joined: Mon Mar 31, 2003 8:47 pm
- Status: Quo
- Location: New Jersey
- Contact:
- kmv
- Joined: Mon Mar 03, 2003 8:31 am
- Location: Another day, another city
Thanks for the reply Scintilla.
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.
Actually I tried that too, and it didn’t.Scintilla wrote:What if you normalize the WAV before encoding it, does that fix it?
That would be a good theory were it not for the fact that the file is already 16 bit PCM.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.
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.
- Scintilla
- (for EXTREME)
- Joined: Mon Mar 31, 2003 8:47 pm
- Status: Quo
- Location: New Jersey
- Contact:
- kmv
- Joined: Mon Mar 03, 2003 8:31 am
- Location: Another day, another city
Here is a zip file (1.7Mb) containing a WAV, AC3, and an MP2 of the problem I am referring to.Scintilla wrote:It would probably help, yes. I'm wondering if normalizing to something less than the usual 0 dB would help...
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.
- Scintilla
- (for EXTREME)
- Joined: Mon Mar 31, 2003 8:47 pm
- Status: Quo
- Location: New Jersey
- Contact:
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.
Also, Adobe Audition is showing some possible clipping in the .WAV file, so the file probably should be hard limited or normalized anyway.
- kmv
- Joined: Mon Mar 03, 2003 8:31 am
- Location: Another day, another city
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: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?
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.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.