Help - Search - Members - Calendar
Full Version: MP2 decoding broken with lame 3.96.1 ?
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
benc
I can't seem to get Lame 3.96.1 to decode or transcode any of my MP2 files. This is an example of what happens:

CODE
D:\tmp>lame --decode alter_ego.mp2
input:  alter_ego.mp2  (22.05 kHz, 2 channels, MPEG-2 Layer II)
output: alter_ego.mp2.wav  (16 bit, Microsoft WAVE)
skipping initial 241 samples (encoder+decoder delay)
big_values too large! 357
Blocktype == 0 and window-switching == 1 not allowed.
Blocktype == 0 and window-switching == 1 not allowed.
Can't step back 80!


Lame creates a 0 byte wav file and then hangs and I have to press Ctrl+C in order to get back to the command prompt. Here is what Winamp says about the MP2 file:

CODE
Size: 67864896 bytes
Header found at: 0 bytes
Length: 2827 seconds
MPEG 1.0 layer 2
192kbit, 117821 frames
48000Hz Stereo
CRCs: Yes
Copyrighted: No
Original: No
Emphasis: None


I've not had any problems decoding MP2 files with Lame 3.90.3, 3.93.1 and 3.97 alpha 3.
SebastianG
QUOTE(benc @ Nov 2 2004, 04:39 AM)
CODE
D:\tmp>lame --decode alter_ego.mp2
input:  alter_ego.mp2  (22.05 kHz, 2 channels, MPEG-2 Layer II)
output: alter_ego.mp2.wav  (16 bit, Microsoft WAVE)
skipping initial 241 samples (encoder+decoder delay)
big_values too large! 357
Blocktype == 0 and window-switching == 1 not allowed.
Blocktype == 0 and window-switching == 1 not allowed.
Can't step back 80!

CODE
Size: 67864896 bytes
Header found at: 0 bytes
Length: 2827 seconds
MPEG 1.0 layer 2
192kbit, 117821 frames
48000Hz Stereo
CRCs: Yes
Copyrighted: No
Original: No
Emphasis: None

*


Weird.... First, LAME reports "22.05 kHz, 2 channels, MPEG-2 Layer II" and then it generates warnings and errors as if it wer decoding an mp3 !

"big_values" / "blocktype" / "window-switching" / "can't step back xxx" (bit reservoir error) are all related to mp3 - not mp2.

Yes, it look's like a (or more than one) bug(s).


SebastianG
john33
Hmmm, 3.96 is also broken so far as mp2 is concerned, although 3.95.1 works fine. unsure.gif

Edit: I'ts also broken in 3.97alpha3.
benc
You're right, 3.97 alpha 3 is broken too, although the error message is different and it doesn't hang like 3.96.1. I must have got the binaries mixed up when I was testing.

CODE
D:\tmp>lame --decode alter_ego.mp2
Error reading headers in mp3 input file alter_ego.mp2.

D:\tmp>
john33
For anyone who is interested, I've uploaded a 'fixed' version of the CLI encoder, only, to Rarewares, that now decodes .mp2 correctly (I think!! tongue.gif ).

I've not researched this deeply, but the small changes made between 3.95.1 and 3.96 in 'get_audio.c' seem to be the offending changes. There are more extensive changes in the latest 3.97 alpha that I haven't looked at yet, and may leave to Gabriel (or another lame-dev) to look at. wink.gif
Enig123
John33,

Could you please upload the 'fixed' source file of 'get_audio.c' somewhere so I can compile a 'fixed' binary myself?
john33
I simply recompiled using the get_audio.c source from 3.95.1, having established what the changes were(!!). wink.gif If you need that, let me know and I'll post it for you.
benc
QUOTE(john33 @ Nov 4 2004, 12:05 PM)
For anyone who is interested, I've uploaded a 'fixed' version of the CLI encoder, only, to Rarewares, that now decodes .mp2 correctly (I think!! tongue.gif ).
*


It seems to work for me, thank you.


Another thing I have noticed recently with lame is that it if you decode an MP2 file with an .mpa extension, it assumes it is raw PCM and it isn't decoded correctly. This happens with all versions of lame I've tried.

I've seen .mpa used as the extension for MP2 audio by a number of programs (e.g. DGDecode/DVD2AVI) but I don't know how "correct" it is to do this. Obviously if this is taken too far then people might end up complaining because their MP2 files with .wtf extensions don't decode correctly. tongue.gif


P.S. The link to download lame 3.93.1 is missing on rarewares.
xmixahlx
...sounds like improvement over 3.90.3 for sure!
john33
QUOTE(benc @ Nov 4 2004, 05:05 PM)
Another thing I have noticed recently with lame is that it if you decode an MP2 file with an .mpa extension, it assumes it is raw PCM and it isn't decoded correctly. This happens with all versions of lame I've tried.

I've seen .mpa used as the extension for MP2 audio by a number of programs (e.g. DGDecode/DVD2AVI) but I don't know how "correct" it is to do this. Obviously if this is taken too far then people might end up complaining because their MP2 files with .wtf extensions don't decode correctly. tongue.gif


P.S. The link to download lame 3.93.1 is missing on rarewares.
*

It would not be difficult to add the .mpa extension to the list of recognised extensions, but it's also equally easy simply to change the extension to .mp2 before decoding!! wink.gif

I've fixed the link to 3.93.1, thanks. smile.gif
Gabriel
QUOTE
Another thing I have noticed recently with lame is that it if you decode an MP2 file with an .mpa extension, it assumes it is raw PCM and it isn't decoded correctly. This happens with all versions of lame I've tried.

Magical switch: --mp2input
john33
QUOTE(Gabriel @ Nov 5 2004, 09:03 AM)
Magical switch: --mp2input
*

This does not seem to help the decoding problem. unsure.gif
Gabriel
--mp2input is telling Lame to consider the input as beeing mp2. Of course, if mp2 decoding is not working, it will not make it working.
It just helps when decoding is working and you have a file with unusual extension (like .mpa)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.