Giter VIP home page Giter VIP logo

audio_tagger's Introduction

Audio Tagger

A productivity tool for automating the process of tagging audio files of an album, with the aim of making them properly recognized by media servers such as Emby, Kodi, and Plex.

Motivation

It is often difficult to acquire music that is properly tagged, even when dealing with trusted sources. Without proper tagging and files organized in a specific manner, media services often fail to properly recognize the media content, or present it as intended. I've found multi-disc albums especially problematic, since when improperly tagged, media servers often mix and match albums and tracks.

Manually tagging hundreds of albums can rapidly become burdensome to the degree that one gives up the good fight, and since I don't particularly enjoy menial work of this kind I sought a way to automate the process. I've tried different open-source solutions, but even the best I could find, the ever so lovely Kid3 couldn't fulfill my needs.

I was looking for something simple, but with the capability of fetching tag information from different online encyclopedias, and organizing my collection following a unified dir structure and file naming convention that makes finding particular recording a breeze, while further eases identification of the recordings. Moreover, I needed something modular, and flexible enough so that backend components can easily be added/switched out when needed.

Features

  • Edit all versions of ID3v2 tags, and parse all standard ID3v2.4 frames (thanks to Mutagen)
  • Fetch tag information and cover art dynamically from MisicBrainz (a release ID must be provided)
  • Restructure album content (the output format is not adjustable for the moment, if such a feature is required enthusiastic contributions are welcome - see guideline)

Usage

usage: __main__.py [-h] [-n ALBUM_NAME] [-a ARTIST] [-y YEAR] [-i ALBUM_ID] [-g GENRE] [-c COVER_ART] [-d DISC_NUMBER] [-s SUFFIX_FILTER]
                   [--comment COMMENT] [-o OUTPUT]
                   path

Tagging audio recordings.

positional arguments:
  path                  absolute path of the album directory

options:
  -h, --help            show this help message and exit
  -n ALBUM_NAME, --album-name ALBUM_NAME
                        the name of the album
  -a ARTIST, --album-artist ARTIST
                        the name of the album artist
  -y YEAR, --album-year-of-release YEAR
                        the release year of the album
  -i ALBUM_ID, --album-id ALBUM_ID
                        the MusicBrainz release ID
  -g GENRE, --genre GENRE
                        a single name or a colon-separated list of genres. If required, this must be given manually as genre info is not
                        fetched automatically by the tagger.
  -c COVER_ART, --cover-art COVER_ART
                        absolute path of the cover image to set
  -d DISC_NUMBER, --disc-number DISC_NUMBER
                        the disk number to use. Useful for sources where each disk of an album has been separated to different directories
                        of the same level rather than being grouped under the album dir.
  -s SUFFIX_FILTER, --suffix-filter SUFFIX_FILTER
                        only those audio files will be process which have a matching file extension.
  --comment COMMENT     a comment to add to all track metadata tags.
  -o OUTPUT, --output OUTPUT
                        the dir to which the tagged audio files are to be written

Example Invocation

python3.11 -m audio_tagger \
    "/path/to/album/dir" \
    -i="<MUSICBRAINZ_RELEASE_ID>" \
    -g="<COMMA_SEPARATED_LIST_OF_GENRES>" \
    -c="/path/to/album/cover.jpg"

Contribution Guidelines

TODO

audio_tagger's People

Contributors

ttimon7 avatar

Watchers

 avatar

audio_tagger's Issues

Automatically recognize cover/folder images

Seek out images labelled cover/folder.[jpg|png] in the album root - or in case its missing, the disc dirs -, and offer that as a viable cover art to be used for tagging.

In case its accepted use that, otherwise follow with downloading the cover art.

Handle incorrect inputs

Gracefully handle such occurrences, the CLI tool should not crash, nor should it report a strenuous error. Make it meaningful and informative.

Make sure tagging works without cover art

Guarantee, that in case cover art cannot be found locally/online, or read properly, the user is informed and the provided with the option to continue or terminate the tagging process.

If the use wants to continue, make sure tagging is performed without error, otherwise exit gracefully stating the reason for cancelling the operation.

Provide an option for listing tagging capabilities grouped by tagging lib

Add a --list option to the CLI for that purpose.

Provide output similar to:

Tagging capabilities of backends:

* music-tag
  * supported audio formats:
    * flac
    * mp3
  * supported tags:
    * album
    * artist
    * cover art (image/jpeg, image/png)
    * disc number
    * genre
    * release date
    * title
    * total discs
    * total tracks
    * track number
* eyed3
  * supported audio formats: ...
  * supported tags: ...
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.