简体   繁体   中英

Is MP3 mixing possible?

For 2 mp3 streams, is it possible to mix two streams of same bitrate with different mixdown values without uncompressing and recompressing it?

For example, if we have two songs that are already encoded in mp3 192 kbit, and we want to create crossfade of length 5 seconds, we should mix last several frames from one song with same number of frames from the second song, with mix rates increasing from 0 to 100 for entering song and from 100 to 0 for closing one.

From what I know, the mp3-compression goes VERY ROUGHLY something like this:

  1. takes a frame of samples
  2. converts them to frequency range
  3. drops frequencies which are below a certain threshold (which is the compression)

So if you only have the mp3-data, you should have chunks/frames of frequencies (with index). To mix the streams you'd have to take the corresponding frames from each stream and construct a new frame that eg consist of f(idx) = fA(idx) + fB(idx) /2. Be aware that the frames have different lengths, because not all indices (idx) are present, which is because some frequencies are drop for the compression. I hope that helps for the beginning. I'm aware that this is not a full on solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM