If you're just looking for a simple way to detect preset used from an end-user point of view:
LameTag by phwipIf you want the gory programming details, here they are:
http://gabriel.mp3-tech.org/mp3infotag.htmlLook at
bytes $B6-$B7The preset used is stored as an 11-bit number (0-2047). What that value represents varies by version of LAME. Note that the preset value is stored in the LAME tag only for LAME v3.93 onwards (and some later compiles of 3.90.3).
Preset values <= 320 represent "--[alt-]preset <bitrate>". For 3.90-3.92 these are CBR, for 3.93+ and 3.90.3 these are ABR.
LAME 3.93 and 3.90.3 use these preset values:
1000 = '--r3mix'
1001 = '--alt-preset standard'
1002 = '--alt-preset extreme'
1003 = '--alt-preset insane'
1004 = '--alt-preset fast standard'
1005 = '--alt-preset fast extreme'
1006 = '--alt-preset medium'
1007 = '--alt-preset fast medium'
LAME 3.94 (except early alpha compiles) changes the number stored to coincide with the presets equalling certain combinantions of -V -q switches, and are as follows:
430 = '--preset radio'
450 = '--preset portable'
460 = '--preset medium'
480 = '--preset standard'
500 = '--preset extreme'
Whether the preset is "fast" or not is determined now only by the vbr_method being equal to "4" (fast) or not.
For LAME before v3.93 (except recent 3.90.3) it's not possible to determine the preset used by the above method (because the value is not stored) but it may be possible to guess the preset used based on things like lowpass frequency, noise shaping method, stereo mode, etc.