An open API service indexing awesome lists of open source software.

https://github.com/gitmotion/audio-metadata-updater

Programmatically update meta data of audio files in a given directory and specified file type using python & mutagen.easyid3
https://github.com/gitmotion/audio-metadata-updater

Last synced: 7 months ago
JSON representation

Programmatically update meta data of audio files in a given directory and specified file type using python & mutagen.easyid3

Awesome Lists containing this project

README

          

# audio-metadata-updater
- Uses mutagen.easyid3
- Add songs files to a given directory
- Generate / create a .json file that contains all the metadata you want to update
- current supported metadata fields: title, artist, album, tracknumber, composer, albumartist, discnumber, copyright
- Comes with error handling and will list out files that failed to update at the end of the log

Note: File name will be used as the key in the metadata.json file and must be configured accordingly

- Certain special characters (?, >, <, etc) can't be added to file names and will need to be taken out of the .json file keys to account for this
- However you can still add them in the metadata info
- As long as the file name and the keys in the metadata.json match up you can essentially use any identifier

![specialcharacterexample](https://github.com/gitchrishan/audio-metadata-updater/assets/43588713/9533db9e-ca65-47f3-a808-02494734dfd5)


# Execution
Debugging:

![debugmodeexecution](https://github.com/gitchrishan/audio-metadata-updater/assets/43588713/44482a26-188e-401a-9982-776453dbc391)
- uncomment following lines and comment lines after

![debug_mode](https://github.com/gitchrishan/audio-metadata-updater/assets/43588713/d5bf55b1-ee0c-4835-b3d1-d06749708152)
- this will allow you to input the arguments

Terminal:
- ![terminalexecution](https://github.com/gitchrishan/audio-metadata-updater/assets/43588713/969a1c47-c934-4141-b5c2-7bd728d44fbf)
- uncomment following lines and comment lines before
- Using python, execute as such:


python path/to/amdu.py /path/to/song/directory .mp3 /path/to/metadata.json

Or

python .\amdu.py '.\AUDIO_FILE_DIRECTORY\' .mp3 '.\metadata.json' (powershell)

- you can use any audio file extensions supported by mutagen (see documentation)
- This will grab all *.mp3 files (or any other specified extensions) in the given directory and parse the metadata.json file and match them accordingly

# Demo & Results
Demo:

![amdu demo](https://github.com/gitchrishan/audio-metadata-updater/assets/43588713/5cc62b9a-4efd-4e51-8041-35fbb65f9760)

Before:

![before](https://github.com/gitchrishan/audio-metadata-updater/assets/43588713/4c919f56-dcd0-4f24-9209-359f4d24a701)

After:

![after](https://github.com/gitchrishan/audio-metadata-updater/assets/43588713/993da10c-ef44-4dd0-b36d-a03ce8536dc8)

View Log:

[amdu-demo-log.txt](https://github.com/gitchrishan/audio-metadata-updater/files/12614815/amdu-demo-log.txt)