Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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

share|improve this answer
up vote 0 down vote accepted

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

share|improve this answer

For finding duplicates, and organizing your library in general, MusicBrainz ( is a great database and has a great set of tools built around it. 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:

And a detailed explanation of how chromaprint works specifically can be found here:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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