RSS Amplifier

hackitude

MP3 tag rename

0
Sign in to vote or save

hackitude

Bulk rename of media files according to tags. In addition to MP3, many other formats are supported.

Alternative to mp3rename – with confirmation mode, custom replacements, and a wide range of additionally supported formats by using mutagen as sole dependency.

For local-only installation, a Python virtual environment can be used:

python3 -m venv venv
./venv/bin/pip install --require-virtualenv -U -r requirements.txt
./venv/bin/python3 tagrename.py -h

Per default, given files are renamed automatically according to the extracted metadata. Virtually any tag can be referenced as pattern – if it does not exist (or is empty), the operation will be skipped. Format and additional “safety” flags are accepted as arguments:

usage: tagrename.py [-h] [--dry-run] [--interactive] [--no-clobber]
                    [--fmt TEMPLATE] [--replace [[REPL/]REGEX ...] --] FILE [FILE ...]
Bulk rename media files according to tags.
options:
  --dry-run                     do not actually rename (default: False)
  --interactive                 ask for confirmation (default: False)
  --no-clobber                  do not overwrite existing files (default: False)
  --fmt TEMPLATE                tag-based template for renaming (default: '${artist} - ${title}')
  --replace [[REPL/]REGEX ...]  post-processing substitutions, for example: '_/[/|]' or ' *\([^)]*\)$'

Source and destination filenames are shown for comparison. For example, renaming MP3 and M4A audio files while asking for confirmation on the result:

Console screenshot – Rename by tags

Read the original on hackitu.de

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.