Help - Search - Members - Calendar
Full Version: -ec option in lame?
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
marteataca
hi,

could u guys explain what the -ec switch (?) does in lame? :confused:

one guy told me that he uses this 'switch' and "it improves quality bla bla bla" but he could not explain exactly what it does rolleyes.gif

I read the lame documentation, search the net and couldnt find nothing about it!

I made a test using a command line with -ec and encoded the same source sample without -ec.

Then, I decoded both .mp3 to .wav and compared them with EACīs Compare WAVs tool. No differences found.
Compared the same wavs (with and without -ec) with the Audiograbberīs Compare WAVs tool. It found differences! :eek:

Then, I decided to check the Winampīs file info to mp3s with -ec and without -ec. They had the same info, except one: the Emphasis in with -ec (the same if I check in encspot). What CITT j.17 mean ? :confused:

MPEG INFO WITH -EC
Size: 219140 bytes
Header found at: 0 bytes
Length: 13 seconds
MPEG 1.0 layer 3
134kbit (VBR), 520 frames
44100Hz Joint Stereo
CRCs: No
Copyrighted: No
Original: Yes
Emphasis: CITT j.17 <--

MPEG INFO WITHOUT -EC
Size: 219140 bytes
Header found at: 0 bytes
Length: 13 seconds
MPEG 1.0 layer 3
134kbit (VBR), 520 frames
44100Hz Joint Stereo
CRCs: No
Copyrighted: No
Original: Yes
Emphasis: None

Is -ec a flag? could it affect something in quality? why its not documented? why EAC didnt find differences? :confused:

any help would be appreciated wink.gif
Gecko
"Emphasis" is a predfined filter which modifies the frequency response (like an EQ) of a signal. This is used in the recording process. On playback you have to DEemphasize the signal to regain a linear frequency response. The mp3 specs allow for a flag which indicates the used method of emphasis. This flag is set by the -ec switch. A correctly implemented decoder should apply deemphasis when the mp3 carries this flag. (Makes a regular CD encoded to mp3 sound like crap.)

Today this process is basically obsolete. It is used for example when producing a record. The highs are boosted and the bass is lowered. This makes it easier for the needle to follow the groove and improves playback quality.

It boils down to this: -ec does not improve encoding quality; if you decode the files (the one with -ec and the one without) with a decoder that doesn't have deemphasis implemented you should get identical resulting wav files.
Gabriel
As explained upper, I'd also suggest you to not use this flag


btw if you look at the html documentation, it is documented.
marteataca
thanks for clarify this to me biggrin.gif

nice to hear (read) from a lame developer that -ec is not recommended ohmy.gif

ow cool.gif I was blind! (Im stupid, I used Ctrl+F in IE and couldnt find exactly "-ec" rolleyes.gif )
now I can see it in the documentation!

but, someone could explain this:
QUOTE
I decoded both .mp3 to .wav and compared them with EACīs Compare WAVs tool. No differences found. 
Compared the same wavs (with and without -ec) with the Audiograbberīs Compare WAVs tool. It found differences!
:confused: :confused:
rjamorim
Which decoder are you using?
marteataca
Beleza Roberto?! smile.gif
===
ooops
sorry guys, wrong info. this isnt true
QUOTE

I decoded both .mp3 to .wav and compared them with EACīs Compare WAVs tool. No differences found. 
Compared the same wavs (with and without -ec) with the Audiograbberīs Compare WAVs tool. It found differences! 
retested the samples and now audiograbber couldnt find differences ohmy.gif

just to guarantee, now I tested with 3 decoders: NULLSOFT MPEG AUDIO DECODER 2.79Q, MAD 0.14.2B and THOMSON MP3PRO DECODER 1.0 (Blargh ) no differences found by the WAV comparers...

do u guys know a decoder that have deemphasis implemented?
rjamorim
QUOTE
Originally posted by marteataca
Beleza Roberto?! smile.gif

Beleza Tiago!

QUOTE
[b]do u guys know a decoder that have deemphasis implemented?


Never heard of one. (Maybe l3dec?). Besides, I don't think it's worth using. As well as applying emphasis. The decoders most people use (mad, mpg123, Winamp, AE (:-P)) don't apply de-emphasis.

Regards;

Roberto.
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-2009 Invision Power Services, Inc.