Help - Search - Members - Calendar
Full Version: restoring audio data while decoding
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
neomoe
inspired by this thread, some weird idea came up to me.

would it be possible to let the decoder of an mp3 file guess how the source audio must have sounded?

I mean, if you had encoded CD-audio with LAME, for example, and let LAME decode the file, then would the LAME-decoder know, what the encoder has done to the file (which audio-data was dicarded during encoding) ?
and, provided the decoder knows, could it be possible to let the decoder alter the output this way, that it is identical to the original?

please, don't flame me, if this question is just stupid.... sad.gif
qwecom
As an audio enthusiast and programmer (not an expert), I would categorize this as "possible" with a big footnote. You'd most likely be improving fidelity rather than restoring, and you'd be working via some type of interpolation.

It's very similar to working with picture files. You can't really add resolution, though you can increase the image size, blur the edges and/or run a program plug-in "Fractal Designer" that utilizes algorithm generate synthesized resolution.

In either event, the results would be highly subjective with a variety of options.

For a good idea of what's possible, consider the DFX Plug-in for various players ( http://www.fxsound.com/dfx/index.php ). It can dramatically improve the sound of MP3's during playback, but there are tons of variables and possible settings.

Without the existence of a tool specifically designed to rip with improved fidelity, you might be able to move directly from theory to practice by playing a file back via WinAmp with DFX turned on. You could capture the improved audio stream and direct it to a Wave File, then you could rip the wav to an MP3.

I'd never thought of it until you mentioned it, but the idea seems to make sense.

I wonder if someone has or why someone (including FXSound) hasn't created a ripper/encoder/plugin to take advantage of this.

Perhaps most folks who care about audio quality either rerip from the source or use a own combination of plugins (like the dbpoweramp PowerPack) to make individual adjustments to EQ, Stereo Stretching, Smoothing, and such. They may have ways to achieve the same results by combining various effects.

Still, I think it would make sense for someone to "idiot-proof" the refinement process with some simple controls like DFX. It's an interesting idea. Maybe somebody is doing it. (?)
neomoe
but, isn't it possible, that the decoder just knows (nearly exactly) what has happened to the specific file? I mean, we have several information, like bitrate in a special frame, length, frequency, etc. ( I am not a pro) and, we know, what encoder was used and what our encoder has done (do we know?) to that file, that has that attributes...?
spoon
Generally speaking data that is lost while encoding is lost forever, anything that suggests otherwise I would take with a pinch of salt. Put it this way, the designers of mp3 would have already implemented such additions into mp3, or added it to the newer aac, there is no such magic restorer.

Mp3 works by removing frequencies that it thinks you cannot hear because of other frequencies that are playing. The other frequencies that are removed are gone, simply not there.

>It's very similar to working with picture files. You can't really add

I have seen those detective shows also, they have a 8x8 pixel image of a license plate and the resolution is increased to read the letters. Joking aside, images and audio are not the same.
Sunhillow
During the encoding process, the encoder knows which parts of the signal may be replaced by narrow-band quantisation noise.

When decoding the mp3, there are ~ 27 subbands, each approx. 690 Hz wide. The decoder knows the quantisation of each subband, but it can never know what once has been under the noise floor.

This part is probably rubbish: Maybe with oversampling and filtering each subband before composing the signal, the quantisation noise could be reduced. But there is still the problem of the unknown content that has been there before.

Now the tonal part of music is composed of several distinct frequencies and their harmonics, the atonal part can roughly simplified be regarded as noise (hiss). One of the negative effects of encoding is that higher frequencies are just discarded, so the content of the according frequency bands is simply set to zero.

A "natural" musical spectrum doesn't have a sharp cutoff, it is more a smooth roll-off. This is what "making-mp3s-better-than-cd-voodoo-magic tries to reestablish. It produces harmonics of the remaining signal and adds them. If it is done good, only harmonics above the cutoff frequency will be added. This may sound better, more crispy than the original mp3. But it is not a natural sound, like if you spice up a bad meal with artificial flavor.

... but not even the most creative laboratories can remove the quantisation noise (AKA encoding artifacts, if it is audible) from the decoded signal.
k.eight.a
I can't help myself qwecom troll? rolleyes.gif

Anyway laugh.gif laugh.gif laugh.gif

Edit: Excuse me, I've smoked weed and his post seemed to me very funny that's all, I'm sorry!
xmixahlx
i have NO idea what k.eight.a just said... but...

the best you are going to get with processing of decoding is some sort of enhanced equalizer.

...and this doesn't make much sense on formats (settings) aiming at transparency (since they would be mostly transparent anyways) - but more on restoring low quality encodings.

in other words... the key to decoding a file that isn't crap is the job of the ENcoder... not the DEcoder.


later
optimali
I thought about this a while back, but came to the conclusion that you couldn't put an .mp3 back the way it was by examination of the file.

I wonder how much a compressed text file that would be a log of what the encoder did would add to the file, but the whole point of .mp3's is to have a listenable audio file at a fraction of the original size, for putting on cd's or downloading over the Internet. Plus, a file carrying a log of what the encoder did would essentially be a lossless file in a weird way. It would be interesting if a compressed text representation of an audio file were smaller than an .mp3, but I doubt it would be because a text character is 8 bits.

I really think that if you need the original .wav quality, you should go for lossless compression, if it exists on the web. It would be nice.

Steve
Mike Giacomelli
QUOTE (neomoe @ Jun 14 2005, 10:34 AM)
inspired by this thread, some weird idea came up to me.

would it be possible to let the decoder of an mp3 file guess how the source audio must have sounded?

I mean, if you had encoded CD-audio with LAME, for example, and let LAME decode the file, then would the LAME-decoder know, what the encoder has done to the file (which audio-data was dicarded during encoding) ?
and, provided the decoder knows, could it be possible to let the decoder alter the output this way, that it is identical to the original?

please, don't flame me, if this question is just stupid....  sad.gif
*


The encoded file is a small fraction the size of the orginal file. This means that on average there would be many trillions of trillions of trillions of source files corrisponding to each and every encoded file. How should a decoder figure out which one to use? Afterall, they're all equally correct. Just maybe not the one you're expecting.
neomoe
well, thank you guys for the enlightenment!

what can I say - that would have been too cool!
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.