Comments and/or suggestions for plugin to calculate an albums LAME codec?
Problem
I created a plugin that exposes an album template field called albumquality. I used portions of library dnuos and converted the used pieces to Python 3.
Biggest feature of this plugin is that it will return the VBR quality between 0 and 9. If something goes awry, then Unknown will be returned.
I ran it over a few hundred albums in my library and it appears to have tagged everything properly.
I was wondering if anyone had any comments and/or suggestions?
Setup
- OS: Windows 10
- Python version: Python 3.6
- beets version: 1.4.3
Hi! This looks cool. I also notice that Mutagen itself added a feature to expose the LAME header: https://github.com/quodlibet/mutagen/issues/66
Maybe we should just use that directly instead of dnuos?
I had looked at that, but the authors comments seem to all go towards simply using the bitrate rather than exposing the VBR quality. This is why I opted to jank up dnuos for Python 3. I don't like using the average bitrate of a song because I find that using the target averages from here is often wrong when comparing to tools like foobar2000 or MediaInfo that seem to acurately determine if a song is VBR V0, or V2, etc.
How does it determine what quality level the album is? I can't figure out the source code.
mutagen 1.37 is out with https://mutagen.readthedocs.io/en/latest/api/mp3.html#mutagen.mp3.MPEGInfo.encoder_settings
I'm not sure how mutagen "guesses" but LAME puts the encoder settings in the header info. I'm curious if it's reading that or if its doing a bitrate check
See https://github.com/quodlibet/mutagen/blob/30f373fa6d56e1afa17d48a0c6f3e111267fbd32/mutagen/mp3/_util.py#L179