Help - Search - Members - Calendar
Full Version: Mp3 Recoder?
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
pieroxy
I just wished to know if there existed an MP3 recoder. I explain: To encode a 320kbps MP3 to 160kbps, you have to decode it to WAV, then re-encode the WAV to MP3. This decodnig/recoding is ending up eating a bunch of quality.

It is my understanding that the first thing an MP3 encoder does is transforming the WAVE ni the spectral domain. Then it does a bunch of stuff and end up stornig a spectral representation of the sound. Why couldn't we use directly this spectral representation to re-encode an MP3 file?

I am not expert on MP3 compression, so please enlighten me blink.gif
Lyx
Technically not possible with the mp3-format and the variety of encoders.
Supernaut
QUOTE(pieroxy @ Feb 16 2005, 04:40 PM)
Why couldn't we use directly this spectral representation to re-encode an MP3 file?
*

Because mp3 isn't just transforming a wave into the spectral domain. This post by analogy helped lighten up things for me a while back...
kotrtim
this was once Ogg Vorbis proposal...IIRC
reducing bitrate without converting to wave then back to a smaller file
quite cool if Vorbis have this feature
pieroxy
Thanks Supernaut, but the post you link to actually assert my point further. MP3 converts waveform to the spectral domain (blocks of frequencies at regular intervals), do some stuff on it and store it.

Lyx, why? I mean, an MP3 file is a spectral representation of the music. An encoder needs a spectral representation of the music to encode sound. Why couldn't it use the already existing spectral data and "decimate it" by removing more frequencies and store it back to a smaller file?

I understand that there is one issue: long and short blocks (or is it frames?). Where a lower bitrate would have commended a long block, an incoming file might very well have a short block. But this is merely an annoyance, not a road block.

kotrtim, IIRC, it was slightly different in that the goal was to be able to encode a file in two stream: A basic stream and a fine stream. The basic stream would contain low bitrate data and the fine stream would contain additional data to render the original stream higher quality. So it was at the encoding level that you specified if you wanted bitrate peeling or not.
Lyx
QUOTE(pieroxy @ Feb 16 2005, 06:07 PM)
Lyx, why? I mean, an MP3 file is a spectral representation of the music. An encoder needs a spectral representation of the music to encode sound.


No, it is more than that. MP3-Encoders, especially LAME, use all kinds of tricks to get the most out of the MP3-Format. For example, additional methods are used depending on the target-quality/bitrate - whats good for V0 may be less optimal for V5. Or in a non-technical way said: mp3 encoders throw different kinds of information away depending on the target-quality of the first encode.

An additional problem - as explained in the linked post of an earlier reply - is that mp3-encoders intruduce quantization-noise. Or more simply said - artifacts. Those artifacts are INCLUDED in the "spectral representation". So, when you recode/reencode, you treat those artifacts as part of the music and try to represent them. The result is that with every reencode the existing artifacts get amplified and new ones added. The only way to circumvent this would be to know what parts in the representation are unwanted artifacts, and which ones aren't. But for this to work, you would need to know the exact encoder and settings used for the previous encode... getting that to work with all the variety of encoders out there is a lost case.

So, when you asume that one could just take the existing representation of a MP3 - and then try to strip additional information from it to fit into a small file - thats exactly what re-encoding does - you know the results.
pieroxy
Ok, so let me ask you a question: I backup all my files as 320kbps MP3s. Now I want a lower bitrate for my car/portable player, because of obvious reasons.

Is recoding a 320kbps mp3 with --preset medium going to give me a much worse quality than encoding the original WAV file?
Lyx
depends on the quality of the encoder which was used for 320kbit..... old versions of XING for example do a horrible job even at 320kbit smile.gif

Asuming that you did use LAME and something like --preset braindead/insane to create the 320kbit mp3s, it will probably not sound much worse - but slightly worse. Probably not noticable by the majority of people - unless the tracks are gapless - then re-encoding may be the tip of the iceberg which introduces clicks at seamless-trackchanges. I know this from first-hand experience that this is not uncommon with seamless-trackchanges.

- Lyx
pieroxy
QUOTE(Lyx @ Feb 16 2005, 06:27 PM)
depends on the quality of the encoder which was used for 320kbit..... old versions of XING for example do a horrible job even at 320kbit smile.gif

Asuming that you did use LAME and something like --preset braindead/insane to create the 320kbit mp3s, it will probably not sound much worse - but slightly worse. Probably not noticable by the majority of people - unless the tracks are gapless - then re-encoding may be the tip of the iceberg which introduces clicks at seamless-trackchanges. I know this from first-hand experience that this is not uncommon with seamless-trackchanges.

- Lyx
*



Thanks Lyx, I use LAME to backup,
* CBR 320
* -q 0
* lowpass at 21KHz

I hope these params are not too bad... I just finished my CD collection, I would hate to have to do it again crying.gif
Gabriel
note: some peeling is possible with mp3.
pieroxy
QUOTE(Gabriel @ Feb 16 2005, 06:54 PM)
note: some peeling is possible with mp3.
*


... and you don't know of any soft that does it, right? sad.gif
odious malefactor
QUOTE(pieroxy @ Feb 16 2005, 08:32 AM)
...I use LAME to backup,
* CBR 320
* -q 0
* lowpass at 21KHz

Please note, certain problems reported with -q 0.
Just use --alt-preset insane (320 kbit/s CBR, highest possible quality).
Gabriel
QUOTE
... and you don't know of any soft that does it, right?

Right, I do not know any software implementing peeling on mp3 yet.
Of course mp3 is not easily peelable, but up to some extent it is.
pieroxy
QUOTE(Gabriel @ Feb 16 2005, 11:16 PM)
QUOTE
... and you don't know of any soft that does it, right?

Right, I do not know any software implementing peeling on mp3 yet.
Of course mp3 is not easily peelable, but up to some extent it is.
*



Thanks guys, I have all the infos I need now. biggrin.gif Very good forums!
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.