Skip to main content

Topic: Mp3 frames ripping (Read 4438 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • carnivara
  • [*]
Mp3 frames ripping
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,

  • n68
  • [*][*][*][*][*]
  • Banned
Mp3 frames ripping
Reply #1
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<

  • Sunhillow
  • [*][*][*][*]
  • Members (Donating)
Mp3 frames ripping
Reply #2
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

  • carnivara
  • [*]
Mp3 frames ripping
Reply #3
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

  • Sunhillow
  • [*][*][*][*]
  • Members (Donating)
Mp3 frames ripping
Reply #4
You may cut MP3 with MP3DirectCut, 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.

  • carnivara
  • [*]
Mp3 frames ripping
Reply #5
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...