Closed bridgestrawdog closed 4 years ago
Hi! Have you seen https://github.com/beetbox/beets/issues/116, wherein there's an ongoing effort to detect LAME presets?
Hey @sampsyo , I had in fact seen that but not had time to look over it fully? Is there a plugin release for it yet?
If you can detect V0/V2/etc in Python, you should be able to at least rename folder / file paths to have V0 or whatever in the filename. Look at the inline plugin. https://beets.readthedocs.io/en/latest/plugins/inline.html
As for "tagging", as in "file tags", I don't know if you can. The beets database can store custom tags but I don't know about writing to file tags.
I use inline in my (now outdated) config, if you want to see it in action.
https://github.com/RollingStar/dial-beets/blob/master/config.yaml
edit: I found this online.
[$mybitrate]
album_fields:
mybitrate: |
total = 0
for item in items:
total += item.bitrate
abr = total / len(items) / 1000
if abr > 480:
return 'FLAC'
elif abr < 480 and abr >= 320:
return '320'
elif abr < 320 and abr >= 220:
return 'V0'
elif abr < 215 and abr >= 170 and abr != 192:
return 'V2'
elif abr == 192:
return '192'
elif abr < 170:
return abr
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is a solution I came up with for 1.6.0
item_fields:
vbr_preset: |
if format.lower() != 'mp3':
return
import os
from pymediainfo import MediaInfo
media_info = MediaInfo.parse(path.decode())
if media_info.tracks[1].bit_rate_mode == None:
return
if media_info.tracks[1].bit_rate_mode.lower() not in ['variable','vbr']:
return str(round(bitrate/1000)) + 'k'
es = media_info.tracks[1].encoding_settings
es_i = es.split().index('-V')+1
quality = es.split()[es_i]
return 'V' + str(quality)
It would be great it beets could tag my MP3 files as V0 (which is the format the majority of my music is in). Rather than 00-01 - Tallahassee (250kbps) I would love it if I could get 00-01 - Tallahassee (V0) instead.
My configuration (output of
beet config
) is:I have zero commented out otherwise I get the dreaded 'zero: cannot zero in "as-is" mode' error. I updated zero.py form the fix at # #2329 but it didn't seem to work. But obviously my first query is more important.
If anybody knows if this can be done, please let me know. I did a search on the matter but most things I found were from 2003/4 so I couldn't find anything useful.