2

Supposing I wanted to see the Artist Name? Or add BPM information? What Python tools could I go about doing this?

Louis93
  • 3,843
  • 8
  • 48
  • 94

1 Answers1

3

There's a module called Python-ID3 that does exactly this. If you're on a Debian/Ubuntu box, its package name is python-id3 and there is example code on its website:

from ID3 import *
try:
    id3info = ID3('/some/file/moxy.mp3')
    print id3info
    id3info['TITLE'] = "Green Eggs and Ham"
    id3info['ARTIST'] = "Moxy Früvous"
    for k, v in id3info.items():
        print k, ":", v
except InvalidTagError, message:
    print "Invalid ID3 tag:", message
Ken Kinder
  • 12,654
  • 6
  • 50
  • 70