HydrogenAudio

Lossy Audio Compression => MP3 => MP3 - General => Topic started by: carnivara on 2003-08-07 12:38:17

Title: Mp3 frames ripping
Post by: carnivara on 2003-08-07 12:38:17
To prevent "reinventing the weel" or spending time on "almost impossible to implement" task, I want to hear experienced people's opinion regarding the following issue:

- Is it possible to get to specific frame inside mp3 file ?
- Let's say the answer to previous question is 'yes', so if I 'collected' frames in any data structure, is it possible to combine them in new mp3 file?

I'm new to audio compression/encoding/decoding techniques, but I'm learning everyday and I'll appriciate any clue, idea or just a direction I have to go.

Thank you very much in advance,
Title: Mp3 frames ripping
Post by: n68 on 2003-08-07 15:35:47
Gday...


every audio file.. have a timeline..
so in theory this can be done.
>frame counter<
maybe there is others.. but in "isobuster"..
you can extract: start/end MSF.

merge those files.. shouldn`t be a problem
>cut`n paste in a mp3 editor<
Title: Mp3 frames ripping
Post by: Sunhillow on 2003-08-07 15:41:56
With MP3 this is not so simple because audio information is weaved into neighbouring frames (--> bitreservoir)

So at least one frame will be invalid on each cut
Title: Mp3 frames ripping
Post by: carnivara on 2003-08-07 16:05:42
I'll try to explain myself more clear:

- I want to do the following programmatically:
Let's say you have library with mp3 files (all of them are encoded in same format, bitrate etc. - here you can help me to choose most simple codec for this task). Can I reach frame X1 in file Y1, put it aside, take frame X2 from file Y2, combine it with the previous one and so on... Which will lead to creation of new mp3 file.

Again, if you say, that some other format fits this task, I have no problem to use it.

Thank you for replies
Title: Mp3 frames ripping
Post by: Sunhillow on 2003-08-08 10:24:11
You may cut MP3 with MP3DirectCut (http://www.rz.uni-frankfurt.de/~pesch/), but as mentioned before, I think at least one frame at the cut point will be invalid. To be sure, just try it yourself.

In the early days of Musicam I made experiments with slow/fast playback by just sending each frame for n times to the decoder (which then was a DSP board) or sending only every n-th frame to the decoder. This worked as expected, with some fast stuttering, but not too much annoying.
If your task will fail with MP3 you might try MP2 which can also be edited with MP3DirectCut.
Musepack (MPC) is somehow related to MP2, but I do not know an editing tool for it.
Title: Mp3 frames ripping
Post by: carnivara on 2003-08-10 10:52:30
Thank you for information...

Still there is something I cannot understand and probably to ask you a right question:

I need to be able inside my code to do the following:

- Go to file "x.mp3", copy frame number 'x', put it aside.
- Go to file "y.mp3", copy frame number 'y', add it to frame 'x'.
Repeat ...
- When needed stop, generate new header according to frames' number, save it as "z.mp3".

Is it possible?

I'm still searching for no-matter-which codec API, which allow me to play with frames in such manner...