I like to be able to compare mp3’s programmatically. The problem I don’t know by what. Header? Histogram? channels? Does anyone have experience with this subject?
It looks like Chromaprint would do what you're looking for. It transforms PCM data in audio fingerprints which you can then use to compare.
They have a C API library (it's actually written in C++, though), a python front end, and also some utilities to convert the results in JSON which means you could use another language to manipulate the data. I don't think that they provide the compare function itself, though.
Also if you're using a Linux system, it's likely that you will find a package for it.