Is there a way to extract actual audio frames from MP3? (Which means also the meta data tags gonna be cut off.)

An imaginery command line:

cat 1.mp3 | mpeg-frames-only > dump

cat 1.mp3 | mpeg-frames-only | md5

P.S. I don't think converting mpeg to wav is a good idea for my case.

P.P.S. It's better if there are few solutions to be able to test them against each other.

  • 2
    What is your end goal? – Jordan Uggla Aug 29 '12 at 22:09
  • I think by frames you mean "audio samples" which is about the same as "uncompressed audio" – Sergey Aug 29 '12 at 22:54
  • Both my goals are presented above - dump and md5. Under frames I mean compressed audio - those bytes actually being played by an audio player. – Pavel Vlasov Aug 30 '12 at 11:11
  • You haven't actually presented an end goal yet. Why do you want this dump? Why do you want this md5? What are you actually trying to accomplish? – Jordan Uggla Aug 31 '12 at 0:15
  • MD5's gonna be compared against each other to find unique and duplicated audio files. Dumps are useful while debugging. – Pavel Vlasov Aug 31 '12 at 10:47

One solution is found (some args could be unnecessary). Looking for an alternative way still.

mplayer 1.mp3 -vo null -dumpaudio -dumpfile dump.mp3


Library libmpg123 includes an example code extract_frames.c doing the job. I have compiled it and it works fine.


For finding duplicates, and organizing your library in general, MusicBrainz (http://musicbrainz.org/) is a great database and has a great set of tools built around it. Picard ( http://musicbrainz.org/doc/MusicBrainz_Picard ) is a GUI application designed to help you organize your music library which will probably be helpful in your goal of detecting duplicates.

If you want to try to script something yourself you can get the acoustic fingerprint of a file by installing libchromaprint-tools and running fpcalc /path/to/file.mp3. While I haven't found a definitive source saying so, I think there is a chance (though small) of two songs which are actually different having the same acoustic fingerprint, so you should manually check that two files are indeed duplicates before deleting one of them.

An overview of what acoustic fingerprinting is can be found here: http://en.wikipedia.org/wiki/Acoustic_fingerprint

And a detailed explanation of how chromaprint works specifically can be found here: http://oxygene.sk/lukas/2011/01/how-does-chromaprint-work/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.