I searched but couldn't really find anything directly related. If something similar has been discussed already, I have missed it.
The idea started from this thread. I was so puzzled by how much lame VBR bitrate may jump if only a few null-samples are added to the wav files. So I started to experiment a little.
It turns out that in certain situations this behaviour may be useful to detect if a given wav file has been uncompressed from mp3.
I know we have Tau Analyzer,aucdtect and all that, but this here looks rather intriguing.
Here is how I did it to produce the graphs:
* Take a 10 seconds wav clip from original CDDA.
* Encode it into several mp3s using diffent settings (128kbps, APS, 320kbps API).
* Uncompress these mp3s back to wavs, so we have original wav clip and mp3-sourced wavs
(We are going to try to determine which is which.)
* Encode every wav again to mp3 (at this stage I encoded all with "-V2 --vbr-new")
Now here is the trick: try different sample offsets!
* Encode not only the wav as it is, but also encode the wavs which are produced from the initial wav by some sample offset.
* Here I did it very simply: took the wav and appended a number of null-samples in the beginning, so I get a new wav with offset.
(obviously, these wavs with appended offset will be a little longer than initial wav, but I hope it doesn't influence the results)
* for every mp3 encoded from these "wavs with offset" - take its average bitrate
* Now plot the graphs: average_bitrate vs wav_sample_offset
In my case, there will be four graphs: one for the original cdda clip, one for the 128kbps-decoded-wav, one for APS-decoded and one for 320kbps-decoded.
And this is what it looks like (here is the same figure in higher resolution):

Curiously, the bitrate of VBR mp3 re-encoded from an mp3 may drop significantly in case of zero offset or if offset is a multiple of (1/2)*576.
IIRC 576 is related to mp3 frame size.
Here are the links to the zoomed parts of the above graph (all png in hi-res, sorry):
around N = 0, zero offset
around N = 0.5 x 576 sample offset
N = 1 x 576
N = 1 x 576 more zoom
N = 1.5 x 576
N = 2 x 576
N = 2.5 x 576
N = 3 x 576
The "x576" bitrate drops are particulary obvious for the 128kbps-mp3 source.
They are quite pronouneced also for the APS-source (especially N = 0, 1x576, 2x576 etc).
The bitrates produced from the 320kbps-API-source are not so different from the original-cdda-source, so it may be impossible to tell these two apart (in this case). Though I would say there are more of zig-zags in the 320kbps-curves around the x576-offsets, so maybe one could derive a measure of such "zig-zaginess".
As a side note, in that other thread there was 320kbps mp3 too and there the bitrate drop was huge.
Also I checked what aucdtect says about it. Aucdtct guessed the above clip correctly (even the 320kbps mp3 too).
However, I didn't look hard at all to find another sample where Aucdtect was wrong: an old 128kbps mp3 - aucdtct thinks it is 100% cdda.
Here is the part of the graph for this sample - obvious bitrate drops, the "x576 effect".
So, in conclusion:
The idea to detect mp3-decoded wavs using LAME encoder is wild and crazy, but it may actually work. It did at least for some of those clips which I tried. Of course, good understanding of the effect and its limitations is neccessary before any positive conclusion could be made.
This "x576" effect of the bitrate drop is quite curious, I think.
576 is related to the frame size, So perhaps it may be understandable. Someone with the deeper knowledge of mp3 care to try digging up an explanation to all this?
Maybe it has somethgin to do with the "blockyness" of the quantized mp3 spectra?
Also I wonder is it somehow maybe indirectly used in the algorithm of aucdtect.
All in all, more questions than answers.
EDIT: Almost forgot very important thing: I didn't assess the quality of any of these mp3s by listening tests. One can assume that because the mp3 are encoded using the same VBR preset the resulting mp3s are of "equal" quality, even though the average bitrate for the same music material can rise or drop due to varying sample offset.



_small.png)
_small.png)
_bitr_small.png)
_fluct_small.png)
_small.png)
_small.png)




_small.png)