Help - Search - Members - Calendar
Full Version: Decoding mp3s -> wav
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
Olliex2
Can't quite get my head round this one. Now obviously there's a massive difference in quality of ENcoding wav ->mp3. But how about DEcoding mp3-> wav?

Do some programs decode the data more accurately than others?

Or is it equivalent to decompression - i.e either it's decompressed (decoded) or else it's not?

I'd expect it to be the latter (i.e. all programs would decode an mp3 -> wav identically - but at the back of my mind I know that sound quality from different mp3 decoder plugins for Winamp varies (NB I know that is another issue entirely from straight mp3 -> wav decoding but it makes me think maybe there are multiple results possible from decoding the same mp3, depending on what you use to perfrom the decoding?

I'm intending to decode some mp3s to wav for editing etc and was wondering what the 'best' mp3 -> wav decoder is. I have Wavelab; I'm wondering of there are any proggies 'better' at the job. Thanks!!
outscape
wavelab is fine for this.
teleguise
For all intense and purpose decoding is identical. There were issues way back
with the Winamp 'Nitrane' decoder see here :http://mp3decoders.mp3-tech.org/faq.html

As you know (transcoding) (re-encoding) or however you like to term it, is more of
a detriment than anything. So the mere fact your take a lossy format, editing it
and then I assume re-encoding is going to 'lose' more than any mp3 decoder would.

Its always best when possible to leave files in a lossless format to edit so that
you can always start with the 'original' source.
Olliex2
QUOTE (teleguise @ Jan 27 2005, 10:31 PM)
For all intense and purpose decoding is identical

Thanks, that's cool.

Thinking with a view to decoding mp3s to wavs (using whatever program you think best for no quality loss - then burning wavs to audio CD using Feurio - I assume decoding to wavs first is a good idea?
teleguise
I'm not sure I follow you.. are we simply talking about creating/burning a standard audio disc from files you currently have stored in mp3 format?

If so, decoding ahead of time before burn serves no purpose now-a-days if your burner
is NOT (Old Skool) and a newer gen with some type of safe-burn,secure-link,burn-proof)
technology, since even if it couldnt keep up theres no worries about buffer underrun.

Though its been a bit since playing with Feurio I believe if like its parent 'Nero' or
most software depending on the drive/settings etc. it will either cache & or decode on
the fly. So its really up to you as it makes no Quality difference either way.

Nero/EAC/CDex etc.. all use plugins in which then you can have good ole LAME do
your decoding.
Olliex2
QUOTE (teleguise @ Jan 29 2005, 05:19 PM)
Nero/EAC/CDex etc.. all use plugins in which then you can have good ole LAME do
your decoding.
*

Yup, my question is largely how to best and most accurately decode an mp3 file to a wav file (for any subsequent purpose).

I see here http://www.hydrogenaudio.org/forums/index....showtopic=30820 that some guys have discussed using lame and foobar to decode mp3 files to wav files. It seems that there is some difference in the resulting wav file depending on what combination of codec/frontend you use for the decoding. So Nero/EAC/CDex etc. as you mention might be expected to produce subtly different wav files depending on options checked and on the ver of lame they use?

Anyone care to throw in their 5 cents on what might be the optimal combination?
Oge_user
QUOTE
It seems that there is some difference in the resulting wav file depending on what combination of codec/frontend you use for the decoding. So Nero/EAC/CDex etc. as you mention might be expected to produce subtly different wav files depending on options checked and on the ver of lame they use?

Yes, they produce (very) subtle differences* depending on options checked (e.g., gapless), on the version/revision and on how they handle decoding errors.

*So subtle that ears usually wouldn't notice any difference between a MP3 decoded with Nero (Fraunhofer) and the same MP3 decoded with Lame, MAD or Winamp.

QUOTE
Anyone care to throw in their 5 cents on what might be the optimal combination?

In my opinion Winamp decoder bring best results
dingave
I have been struggling with this ? for the past couple of days. I just recently got into MP3s and the like and am trying to find the best way to convert those to CD.

I did a test using Nero, Foobar and CDeX. I converted and burned, in one step, 192k MP3s to CD using NERO. For comparison, I then used Foobar to convert the same 192k MP3s to WAV. I then burned those WAV files to CD using the same NERO program.

I then did A/B testing of the two CDs on my stereo system(Rotel amp, Marantz Tjoeb modified cdp, Musical Fidelity X-Pre preamp and Magnepan MMG speakers).
Three out of Three tiems i picked the Foobar converted WAV cd over the NERO converted CD. The difference was rather obvious, too.
I then used CDeX to convert the same MP3s to WAV and compared that to the Foobar converted WAVs. THough it was much less discernable, i picked the CDeX disc over the Foobar disc 3 out of 3 times. It took me changing the discs out 3 times for each test to come to a judgement so , as i said, the differences were subtle.

Anyway, FWIW, that's the "objective" opinion of an anal retentive audio snob.
ArtMustHurt
QUOTE (dingave @ Feb 1 2005, 08:19 AM)
I have been struggling with this ? for the past couple of days. I just recently got into MP3s and the like and am trying to find the best way to convert those to CD.

I did a test using Nero, Foobar and CDeX. I converted and burned, in one step, 192k MP3s to CD using NERO. For comparison, I then used Foobar to convert the same 192k MP3s to WAV. I then burned those WAV files to CD using the same NERO program.

I then did A/B testing of the two CDs on my stereo system(Rotel amp, Marantz Tjoeb modified cdp, Musical Fidelity X-Pre preamp and Magnepan MMG speakers).
Three out of Three tiems i picked the Foobar converted WAV cd over the NERO converted CD. The difference was rather obvious, too.
I then used CDeX to convert the same MP3s to WAV and compared that to the Foobar converted WAVs. THough it was much less discernable, i picked the CDeX disc over the Foobar disc 3 out of 3 times. It took me changing the discs out 3 times for each test to come to a judgement so , as i said, the differences were subtle.

Anyway, FWIW, that's the "objective" opinion of an anal retentive audio snob.
*


thanks alot for your work...this answered some questions i had...keep up the good work smile.gif
Olliex2
QUOTE
In my opinion Winamp decoder bring best results

Thanks. Having read around, I've decided to go with the Winamp Disk-Writer plug-in for my mp3 -> wav decoding from now on as it seems to be the only one out there that doesn't add harmonic distortion (lame), or have people unsure of its reliability (lame again) - see this post here for details of a test on it too, with good results.

I think I found the answer to my initial question in this post over in the same thread:
QUOTE
Up to a point, MPEG decoding is indeed deterministic. If you simply follow the spec, all decoders should produce identical output. However, if I remember correctly the raw output of an MPEG audio decoder is a series of floating-point samples of high precision. They must be converted to 16-bit integers for storing in a WAV. Perhaps this explains why decoders might give slightly different results.
(thanks FCChandler!)

Unless I hear that there's a good reason to use something else -and please feel free to let me know if there is!- Winamp Disk-Writer it is for me!
timcupery
There are a couple of reasons I decode using Foobar's diskwriter instead of Winamp's. These won't necessarily matter for people's mp3 files...
1. Foobar reads LAME headers to do gapless decodes. Whereas Winamp will add 576 samples of basically silence, at the beginning, and whatever number of leftover samples at the end of the track. This only really matters with live music, or songs that are supposed to be gapless.
2. With foobar you can dither the output. This is useful if you have significantly lowered the volume of the mp3 files using replaygain - it's possible that you'll get a noise floor that's too low with the outputted wave files. And this doesn't matter for files that haven't had their volume lowered with replaygain, or have only been dropped a small bit.
Olliex2
QUOTE (timcupery @ Feb 13 2005, 04:58 AM)
Whereas Winamp will add 576 samples of basically silence, at the beginning

timcupery, that post was very interesting - for a start I didn't realise Wave-writer introduced empty samples at the start (almost like an encoder does!)

I notice there's an option in the Wave-Writer plugin to 'remove null samples at beginning', which I'm guessing might take care of that. But for gapless at the end, yup, I guess Wave-Writer has no answer for that!

I also found you've got to be careful to turn off the equalizer and anything else that might interfere with the signal between the input and output plugins on Winamp if using the Wave-Writer. Though it could be useful if you want to render, say, your eq settings to a file... but of course since there's no dithering, any such changes between the input and output plugins (eg equalizer) would to some degree be expected have a negative effect
timcupery
Well, they're not exactly null samples, and the command to remove null samles won't fully take care of the issue. Here's what's going on:
Mp3 files are in frames of 1152 samples each. CD-audio tracks are in "frames" (basically) of 588 samples (75 of these per second, for a total of 44100 samples per second).
Most mp3 encoders introduce a delay of some samples into the first frame before the actual info from the encoded wav begins. In LAME, this delay is 576 samples.
Also note that since mp3 files need to be an integer of frames (you can't really have half a frame, or if you can, your mp3 header information is messed up), there will be some null samples at the end.
LAME deals with this by writing info to the header on the number of samples of delay (at the start) and padding (at the end). So a file might say
enc_delay: 576
enc_padding: 1644
Foobar reads this information and does not play (or decode) the initial 576 samples, or the last 1644, thus providing true gapless playback. So you end up with a decoded file the exact length of the initial encoded wav file.
Winamp ignores this information, and thus plays (and decodes) the extra samples. And it's not always clean silence, sometimes with a very slight baseline noise, so you can't actually get rid of the initial 576 samples from a winamp decode by "removing null samples".

So the upshot: if decoding a live album that was encoded with LAME, use foobar.


One other note of interest: mp3gain sets the enc_delay to 0 when it processes an mp3 file. So it's not good to use mp3gain on songs that are supposed to be smoothly gapless, whether live albums or studio albums that have songs that flow together without a break between them.

[edit: I meant mp3trim, not mp3gain. sorry for the misstatement. mp3gain doesn't alter the file header information.]
gib
QUOTE (timcupery @ Feb 13 2005, 07:27 AM)
One other note of interest: mp3gain sets the enc_delay to 0 when it processes an mp3 file.
*

It doesn't seem to do that for me. I've run all of my mp3s through mp3gain (1.2.3) and have not seen that behavior. All gapless albums play as they should, and getting properties on any mp3 in foobar shows the enc_delay to be the correct 576.
ChiGung
QUOTE (timcupery @ Feb 13 2005, 04:58 AM)
2. With foobar you can dither the output. This is useful if you have significantly lowered the volume of the mp3 files using replaygain - it's possible that you'll get a noise floor that's too low with the outputted wave files. And this doesn't matter for files that haven't had their volume lowered with replaygain, or have only been dropped a small bit.
*

-curious. When is a noise floor too low? Is it that it can be a problem for some DACs or are you just referencing the hard to explain benefit of last stage dithering in general? Sorry its a tricky one. It would be interesting you could elaborate &eg. how might an undithered too low noise floor manifest itself auraly on susceptable equipment -an uncomfortable hiss maybe?.

On topic I find mp3s with non standard sample rates like 24,32k are reproduced to cda's sample rate 44.1 noticably better with foobars high quality resamplers than other players and its ideal for making cds from lo-fi source for this. Ive read these resamplers are higher quality than lames internal resamplers for encoding or decoding mp3.

-ArtMustHurt, were you able to hide the true identity of each cd from yourself while performing your test? If so I am particularly impressed*
ArtMustHurt
QUOTE (ChiGung @ Feb 13 2005, 06:01 PM)
-ArtMustHurt, were you able to hide the true identity of each cd from yourself while performing your test? If so I am particularly impressed*
*


i didnt perform any tests, dingave did...the one i quoted. tongue.gif
ChiGung
QUOTE (ArtMustHurt @ Feb 28 2005, 11:22 PM)
i didnt perform any tests, dingave did...the one i quoted.  tongue.gif
*

Well.. yeah, i do apologise, for everything.
Id like to say ill do better in future, but candidly I doubt it.
Oh well,

You dont happen to know what a too low noise floor sounds like?
Maybe i should go abx silence for while...
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.