I compared the same song in both formats in Spek and it seems like mp3 has cutted highs but more bass?!
So, i just made some Screenshots to show you what it looks like. I used Foobar2000 to convert and i converted the original Flac to mp3 cbr 320kbps and to m4a (Nero AAC) vbr 400kbps. Then i put them into Spek and this is what they look like:
Original Flac:
(https://66.media.tumblr.com/6467171a69973d6b578cd6ef6e61b562/tumblr_pmzlm0Asq21u9ceseo3_1280.png)
Mp3:
(https://66.media.tumblr.com/e48e1b4c54e8f3f09ea2c80d7d0177a9/tumblr_pmzlm0Asq21u9ceseo2_1280.png)
M4a:
(https://66.media.tumblr.com/ac77cc79c7a4424c70ca6957f04fce98/tumblr_pmzlm0Asq21u9ceseo4_1280.png)
Then i opened the Flac and the mp3 in Audacity and inverted the mp3 to get the difference between both as result. I also did the same to the M4a.... What i got is 2 files with the informations that are gone in mp3 and m4a.
This is what got lost in mp3 cpmpared to Flac:
(https://66.media.tumblr.com/852fed0c8b09419ef868b2539f272670/tumblr_pmzlm0Asq21u9ceseo5_1280.png)
This is what got lost in M4a cpmpared to Flac:
(https://66.media.tumblr.com/b68191e6d436149960ca9e691ba3f652/tumblr_pmzlm0Asq21u9ceseo1_1280.png)
Because the last Screenshot (it shows information that is taken out in m4a) shows a lot more information in Bass, it seems like m4a would lack bass. Where does that come from? I also converted other Songs, and also tested Fdk AAC Codec with different bitrates, but the result always looks similar. I did this with Ogg Vorbis too, and it was also similar but not that extreme. Can it be possible that mp3 saves the most bass of them all??
The screenshots show essentially no change in bass frequency if I am reading the (extremely blurry) scale correctly.
Can you hear a difference?
This isn't a correct way to compare lossy codecs since their ultimate goal is to press as much bits as possible out of the song while keeping the necessary information to fool the ears&brain into not hearing any difference from the original under normal circumstances (like, not listening to isolated channel differences, some extreme EQ settings, etc).
They might use quite different methods to do this but this alone doesn't mean that one is better than the other.
Regrading the bass, if you pick a quality setting when the codec should be transparent, it follows that the bass is perceived the same.
mp3 cbr 320kbps should be transparent and it is already waste of space, there's no point using CBR 320 if you can use V0 or even V2 (V2 is transparent to most people AFAIK, and if it's not, it's probably a "killer sample" of some sort).
AAC at even higher bitrates is, in turn, even more silly.
If you can hear a difference with the source on any of these, it probably means you're doing something wrong with the conversion or playback... because in both cases it should normally be impossible to hear difference.
Don't be fooled subtraction!!!
The sound or the difference is NOT the same as the difference of the sound... As a simple example, if you add a few milliseconds of sound to the beginning of a file (to delay it) you have essentially no difference in sound but subtraction will give you a HUGE comb-filtered difference file (often with peaks higher than the original).
Or, if you record yourself saying "hello" twice, you'll find that you the subtracted difference sounds almost-identical (if not exactly-identical) to addition (regular mixing).
Of course, if subtraction gives you silence that DOES prove both files are identical.
The sound or the difference is NOT the same as the difference of the sound... As a simple example, if you add a few milliseconds of sound
of silence, you meant.
Inverting phase - or shifting volume - will give a diff that sounds like the original, just volume changed.
Which brings me to: might a lossy encoder tweak volume just a bit? If one does, and the user does not do volume matching when comparing, ...
It's more likely to tweak the phase of individual frequency bands, not fully replicating the original phase information, or at least the full temporal scale of the original frequency and phase changes.
AFAIK lossy encoders will apply a bit of negative gain when encoding very loud source files, to avoid intersample overs. So there could be a volume difference.
Comparing by subtraction is really not the way to determine audio quality. I have done this myself and found out it's just wrong.
I had a sample once, subtracted it with a very awful bitrate and almost no information seemed to be lost, but the compressed file sounded awful. Then a mp3 (IIRC) of a much higher bitrate sounded way better, but failed while subtracting, even after proper matching levels and position.
Subtraction just doesn't work with psychoacoustic codecs. I can be fun to play with though.
For codecs like Lossywav it can be fun to play with, you can hear the noisefloor that is subtracted by the codec, but also that is quite useless, because it's way below to normal levels of the music that is on the record. I still have to see someone that can really hear a difference between flac and lossyflac using standard settings.
AFAIK lossy encoders will apply a bit of negative gain when encoding very loud source files, to avoid intersample overs. So there could be a volume difference.
I've never experienced something like this. Yes, they may report overs (e.g. LAME does), but they only report - they don't change the audio and encode audio as-is (so with any overs that might occur). Unless, of course, you explicitly tell the encoder to do so (LAME: --scale or alternatively --gain if LAME 3.100).