Help - Search - Members - Calendar
Full Version: Lossless frequency manipulation of an mp3
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
Surbuman
Hi,


Iīm looking for a method to manipulate an mp3 file in a certain way without reencoding the file. I know tools like mp3gain, musicutter, mp3DirectCut or mp3packer to trim, edit, split/merge, repack, fix, etc... mp3 files losslessly.

Does anyone know if it is possible to manipulate the frequencies of an mp3 (to equalize it) or to apply something like a lowpass filter to it without havig to reencode the file?


Usually the mp3 player or software equalizes the output if needed and itīs not necessarily a good idea to alter an mp3 like this.

In my specific case I have an old recording (mp3, 24 kbps cbr, lame 3.85) of a lecture and I tried to think of way to shift the pitch or to emphasize the lower frequencies (deemphasize the higher ones) in order to make the speakerīs voice sound more pleasant.
I donīt have to do this. I know I could reencode to higher quality using an appropiate dsp setting. But it would be more elegant to achieve this losslessly. Iīm just curious if something like this (selective ReplayGain?) might be technically possible or if anyone could think of another approach or workaround to do anything like this losslessly.

Thank you very much. Iīm looking forward to any comments, opinions and ideas :-)
SebastianG
QUOTE (Surbuman @ Aug 28 2008, 19:19) *
Does anyone know if it is possible to manipulate the frequencies of an mp3 (to equalize it) or to apply something like a lowpass filter to it without havig to reencode the file?


The short answer to this is: No.

Long answer: There's no tool out there I know of that does this kind of job. You could try to code one that messes with scale factors for equalizing or "simply" set some MDCT samples to zero. The downside however is that "aliasing cancellation" won't work anymore. The problem is that the filterbank is critically sampled. The same is actually true for volume fades that some tools offer (some temporal aliasing will stay).

Cheers,
SG
Tahnru
I think the idea of a pre-defined set of equalizer settings to apply at playback, stored in a tag like Replaygain values, is going to be the only way to accomplish this.

Now, do I know of such a program? Heck no.
greynol
I'm pretty sure iTunes can store EQ settings on a per-track basis.
Surbuman
Thank you all for the answers and thank you Sebastian for the technical insight.
The idea to write EQ information into something like a tag or into a track related configuration file probably would be very player specific - good thought anyway! But preferably it should be a player independent solution.

My kind of problem seems to be rare. I prefer a lossless way to do this, otherwise relatively large numbers of low quality files would have to be reencoded to high quality mp3 to avoid increasing artifacts (as far as possible) and to apply the desired dsp to the new file(s).
I would do that with a small single file and keep the source.


These questions will probably proof my lack of understanding the mp3 format and I am only thinking out loud:

1. Would it be easier (even possible) to manipulate the header informations about the mp3s duration? E.g. 60 seconds of audio data will be declared 70 seconds and a player tries to stretch the available audio data resulting in a overall pitch shift. Okay, even I can guess, that mp3 doesnīt work that way. VBR files can have time informations different from their actual length without causing effects like that - at least in my experience.
But still, would any manipulation of time be possible? Perhaps by adjusting the sample rate? (itīs fixed, I know...)


2. I donīt want to reencode to avoid increasing size and artifacts, but I thought about transcoding it to a lossless format, applying the dsp. My naive approach is my imagination of the lossless file containing the information of the 24 kbps audiodata and a very large amount of data that hasnīt been there before. I imagine that perhaps a conversion to wave only adds data and the added data is different from the original audio information and thus can be identified ... and perhaps deleted seperatly leaving only the old data? Again, Iīm pretty sure it doesnīt work that way.

But this idea led me to another: Is there anything like a container format to "repack" the audiodata into without reencoding it?



Again thank you all for your patience. Maybe someone can post one or two links or suggest literature about the technical aspects of mp3 to read for me. :-)
Tahnru
QUOTE (Surbuman @ Aug 29 2008, 10:17) *
Again thank you all for your patience. Maybe someone can post one or two links or suggest literature about the technical aspects of mp3 to read for me. :-)


Beginning reading on MP3:
http://en.wikipedia.org/wiki/Modified_disc...osine_transform
http://www.mp3-tech.org/programmer/docs/trev_283-popp.pdf [PDF WARNING]
http://en.wikipedia.org/wiki/Mp3#Encoding_audio
pdq
QUOTE (Surbuman @ Aug 29 2008, 11:17) *
1. Would it be easier (even possible) to manipulate the header informations about the mp3s duration? E.g. 60 seconds of audio data will be declared 70 seconds and a player tries to stretch the available audio data resulting in a overall pitch shift. Okay, even I can guess, that mp3 doesnīt work that way. VBR files can have time informations different from their actual length without causing effects like that - at least in my experience.
But still, would any manipulation of time be possible? Perhaps by adjusting the sample rate? (itīs fixed, I know...)

Each frame specifies the sample rate for that frame, so in theory it would be possible to change that specification in every frame. However, there are only a few defined sample rates so you are very limited as to how much you can speed up or slow down the playback speed.

I have often wondered what would be the effect of deleting, for example, every fifth frame to speed up playback, or duplicating every fifth frame to slow it down (mindful of the bit reservoir).
bhoar
Kind of on topic, maybe: just keep in mind that EQing of lossy-encoded material, depending on the psycho-acoustical models used, may sharply expose artifacts that would normally be hidden for most/all listeners in the flat-eq original.

-brendan
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.