Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Detecting Preset From Lame Tag? (Read 2257 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Detecting Preset From Lame Tag?

Can the preset used be detected from the lame tag?

Here's what I currently use to detect alt-preset standard, extreme, insane and not alt-preset:

  # Classify this mp3 based on the tag values.
  # Rules:
  #  noiseshaping is 2 in both aps and apx
  #  it is 1 in api
  #  quality is 78 in aps and apx
  #  58 in api
  #  nspytune is used as the PychcoAcousticModel in all three alt presets
  #  lowpass filter aps:19000 apx:19500 api:20500
  #  vbr mode in aps and apx is vbr-old/vbr-rh
  #  vbr mode in api is cbr
  #  that is, both aps and apx have for vbr mode: vbr-old/vbr-rh
  #  there are definite red flags though that an mp3 was not encoded with an alt preset
  #  This is a no-no: ath type 3, vbr method vbr-mtrh
  #  anything with either of those settings is not an alt preset file
  #  always joint stereo
  #  api is joint stereo as well
  #  API is jstereo.  If it wasnt, then the mp3 would be forced at 160kbps per channel all the time irregardless of the complexity of the music
  #  all three use -ns-safejoint

  def classify
    if ath_type == 3 || vbr_method == "vbr-mtrh"
      return "not alt-preset"
    end
    if stereo_mode == "joint" && safejoint
      if noise_shaping == 2 && vbr_quality == 78 && vbr_method == "vbr-old / vbr-rh"
   if lowpass_filter == 19000
     return "APS"
   elsif lowpass_filter == 19500
     return "APX"
   end
      elsif noise_shaping == 1 && vbr_quality == 58 &&
     vbr_method == "no vbr / cbr" && lowpass_filter == 20500
   return "API"
      end
    else
      "not alt-preset"
    end
  end

Could low-quality encoded mp3's slip through this logic? Any detailed info on the actual settings used for each preset?

Detecting Preset From Lame Tag?

Reply #1
sorry that the formatting was messed up. Don't know how to bypass the forum software...

Detecting Preset From Lame Tag?

Reply #2
I always thought ap fast used vbr-mtrh. But you mean it uses vbr-rh?

 

Detecting Preset From Lame Tag?

Reply #3
No, thats probably a problem with my rules here. the "fast" settings are detected as "not alt-presets".

Do you know someplace to get a complete list of the actual settings for each preset?