HydrogenAudio

Lossy Audio Compression => MP3 => MP3 - Tech => Topic started by: Jedinhopy on 2017-07-16 12:28:16

Title: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: Jedinhopy on 2017-07-16 12:28:16
Which mp3 editor (windows xp) application software program can replace every other mp3 frame with the mp3 frame that comes very tightly before it?

I don't mean to encode a wave file to a .mp3 file.
Nor don't mean to decode a mp3 file to a .wav file.

But what i want to accomplish is to directly edit the .mp3 file as if it was a file container where every file in this case is a (mp3 frame).

The input mp3 file should look like this:
01. mp3 frame 001
02. mp3 frame 002
03. mp3 frame 003
04. mp3 frame 004
05. mp3 frame 005
06. mp3 frame 006
07. mp3 frame 007
08. mp3 frame 008

And the output mp3 file should look like this:
01. mp3 frame 001
02. mp3 frame 001
03. mp3 frame 003
04. mp3 frame 003
05. mp3 frame 005
06. mp3 frame 005
07. mp3 frame 007
08. mp3 frame 007
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: pdq on 2017-07-16 14:16:21
The frames are linked together by the bit reservoir. What you are asking for would probably result in lots of noise.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: Jedinhopy on 2017-07-16 18:44:30
The frames are linked together by the bit reservoir. What you are asking for would probably result in lots of noise.
I thought the mp3 frames was static snapshots of the full spectrum.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: saratoga on 2017-07-16 19:40:57
I thought the mp3 frames was static snapshots of the full spectrum.

They are, but to decode them you need data in previous frames, so you can't just reorder them.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: Jedinhopy on 2017-07-16 20:13:54
I thought the mp3 frames was static snapshots of the full spectrum.

They are, but to decode them you need data in previous frames, so you can't just reorder them.
Replaced mp3 frames should work like what this image demonstrates visually:
(http://fs5.directupload.net/images/170716/sz4rma4y.png)
, when replacing X numbers of horizontal frames with X numbers of snapshots, and each one lasting X numbers of frames until it gets updated by a newly taken snapshot at regular intervals.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: saratoga on 2017-07-16 20:30:09
Yo could try that, but you will have audio corruption at the frame boundaries.

Why not just use wav instead?
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: Jedinhopy on 2017-07-16 20:44:13
but you will have audio corruption at the frame boundaries.
If not interpolating the mp3 frame boundaries against each other in both horizontal directions simultaneous.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: Porcus on 2017-07-16 21:19:26
I have no idea whether there is anything that can do this, but if the maximum bitrate is not too high, then mp3packer could reduce the need for a bit reservoir?

(I also have no idea why anyone would want to do this other than to see if it can be done, but heck ...)
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: Jedinhopy on 2017-07-16 22:02:42
interpolating the mp3 frame boundaries against each other in both horizontal directions simultaneous.
Maybe smoothing or overlapping like what i try to demonstrate with this image:
(http://fs5.directupload.net/images/170716/pauvtu9q.png)
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: saratoga on 2017-07-17 01:54:06
but you will have audio corruption at the frame boundaries.
If not interpolating the mp3 frame boundaries against each other in both horizontal directions simultaneous.

Provided you aren't using MP3, sure, you can do whatever you want.  If you're using MP3, no. 
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: Jedinhopy on 2017-07-17 14:23:23
but you will have audio corruption at the frame boundaries.
If not interpolating the mp3 frame boundaries against each other in both horizontal directions simultaneous.

Provided you aren't using MP3, sure, you can do whatever you want.  If you're using MP3, no. 
So if want the mp3 frames to update slower.
I have to do this workaround:
1. Pitch-Shift the wave sample up a few semitones or more, aka higher pitch = faster playback speed.
2. Convert/encode wave to mp3.
3. Convert/decode mp3 to wave.
4. Pitch-Shift the wave sample down to the original pitch, aka lower pitch = slower playback speed.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: Sunhillow on 2017-07-19 12:26:35
IIRC there has been a multi-threaded MP3 project which could not use the bit reservoir.
And for sure with MP2 it is possible to re-order the frames without producing too much additional noise  ;)
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: 2Bdecided on 2017-07-19 12:35:54
Why do you need mp3 for this? Whatever you're trying to achieve is more easily done with the original audio.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: pdq on 2017-07-19 12:39:05
If the objective is to have the audio play back more slowly but not alter the pitch, there is software that will do this.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: Sunhillow on 2017-07-19 12:44:38
He wanted to repeat every second frame and cut out the other ones - playback would not slow down.
However, I wonder what would be the purpose of this?
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: pdq on 2017-07-19 13:24:14
Exactly, we are all trying to guess at what the OP wants to accomplish instead of him asking directly.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: john33 on 2017-07-19 17:36:16
There is an encoding option exposed in alpha/debug versions '--nores' that essentially makes frames independent, but with quality loss. This make the OP's idea doable, at least, but for what real purpose, who knows?

This option is not exposed in release versions.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: halb27 on 2017-07-19 20:14:52
Even if the bit reservoir can be switched off there may be a problem because AFAIK the windowing function is overlapping frames.
And even if this should be acceptable there is still the problem that nobody has shown up a tool to arrange the frames the way the OP wants them to be.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: Jedinhopy on 2017-07-19 22:25:16
IIRC there has been a multi-threaded MP3 project which could not use the bit reservoir.
And for sure with MP2 it is possible to re-order the frames without producing too much additional noise  ;)
There is an encoding option exposed in alpha/debug versions '--nores' that essentially makes frames independent, but with quality loss. This make the OP's idea doable, at least, but for what real purpose, who knows?

This option is not exposed in release versions.


repeat every second frame and cut out the other ones - playback would not slow down.
Thanks for answering.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: pdq on 2017-07-19 22:31:34
It might be more interesting to only store every other frame (halving the bitrate), and then have the player fill in each missing frame with the frame before it before decoding.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: Jedinhopy on 2017-07-19 22:51:22
(halving the bitrate)
That means lowering the low pass filter cutoff too, because of a lower sample rate. Thus removing the HF content that only higher bitrates can have.

The most stable bitrate is CBR.
Title: Re: Which mp3 software can replace every other mp3 frame with the frame before it?
Post by: pdq on 2017-07-20 11:46:16
That means lowering the low pass filter cutoff too, because of a lower sample rate. Thus removing the HF content that only higher bitrates can have.
Wrong! Every frame has exactly the same frequency content that it originally had.

The only reason that there is a relationship between bitrate and low pass is that encoders are smart and only preserve high frequencies when there is enough bitrate to warrant it.