1

I am trying to hash some mp3 files and store that hash value in the mp3's metadata. Is there a way that I can add a custom key/tag in the metadata other than the traditional tags of ['author', 'album', 'date']?

Bob
  • 741
  • 2
  • 9
  • 18

1 Answers1

0

As mentioned in the comments, eyeD3 can do this. Custom key/tag works the same the other predefined key/tags. Choose a key/tag name, reference and assign it to your value.

import eyed3

audiofile = eyed3.load('audio_file.mp3')
# add your hash key/tag/value

audiofile.tag.hash = u"ec457d0a974c48d5685a7efa03d137dc8bbde7e3" # example value
print audiofile.tag.hash # ec457d0a974c48d5685a7efa03d137dc8bbde7e3

Confirm other metadata is intact:

print audiofile.tag.artist # e.g. Henry Reed

Hope this helps.