lltag - Automatic command-line mp3/ogg/flac file tagger and renamer

lltag is a frontend to tag (and rename) mp3/ogg/flac files automagically. It uses mp3info, vorbiscomment and metaflac to do so.

Summary

Description

lltag takes a list of music files on the command line and tries to automatically understand their filenames and guess their associated tags. It uses an internal format database to do so. For each file, it will try each format until one matches the current filename, extract the corresponding fields from the filename and set the music tags.

lltag also allows to pass one or several format strings like "%a - %A/%n. - %t", so that the user may help the program when the filenames are too strange, complex or damaged.

It is also possible to set some fields by hand or edit some. And finally, lltag may use these fields to rename the file according to a user-given filename format.

TrackType.org

lltag also provides a interface to access an online CDDB (TrackType.org) and retrieve tags from there. It makes it possible to tag/rename a file from scratch.

Example

This command line will ask lltag to process all files in the music/ subdirectory, with two formats (which discards the first directory name using the %i opcode) and force the genre to Rock. lltag starts with the understanding of the user-passed format strings. It then processes each file and tries each format until one matches.

mycomputer:~/% lltag -F "%i/%n. %a - %t" -F "%i/%a - %t" -g Rock music/*
Generating parser for format '%i/%n. %a - %t'...
Generating parser for format '%i/%a - %t'...

Processing file "music/01. Snow Patrol - Run.mp3"...
  Trying to parse filename with user-provided formats...
    '%i/%n. %a - %t' matches this file...
    Current tag values are:
      ARTIST  : Snow Patrol
      TITLE   : Run
      NUMBER  : 01
      GENRE   : Rock
  Tagging.

Processing file "music/Grandaddy - Revolution.ogg"...
  Trying to parse filename with user-provided formats...
    '%i/%n. %a - %t' does not match.
    '%i/%a - %t' matches this file...
    Current tag values are:
      ARTIST  : Grandaddy
      TITLE   : Revolution
      GENRE   : Rock
  Tagging.

This command will make lltag try one user-defined format and then try to guess. It additionally removes the path during matching, replaces _ with spaces in tags, and accepts multiples spaces instead of one. Moreover, tagging is done recursively in all subdirectories.

mycomputer:~/% lltag --format "%n=%a=%t" -G -R * --nopath --sep _ --spaces 
Generating parser for format '%n=%a=%t'...

Processing file "dir1/dir2/dir3/ blop  Grandaddy  -Revolution.ogg"...
  Trying to parse filename with user-provided formats...
    '%n=%a=%t' does not match.
  Trying to parse filename with internal formats...
    '%a - %t' matches this file...
    Current tag values are:
      ARTIST  : blop  Grandaddy
      TITLE   : Revolution
  Tagging.

Processing file "dir1/dir2/dir3/01. Run.mp3"...
  Trying to parse filename with user-provided formats...
    '%n=%a=%t' does not match.
  Trying to parse filename with internal formats...
    '%n[.)] %t' matches this file...
      NUMBER  : 01
      TITLE   : Run
  Tagging.

Processing file "dir1/dir2/dir3/Garbage - Why_Do_You_Love_Me.mp3"...
  Trying to parse filename with user-provided formats...
    '%n=%a=%t' does not match.
  Trying to parse filename with internal formats...
    '%a - %t' matches this file...
      ARTIST  : Garbage
      TITLE   : Why Do You Love Me
  Tagging.

This command makes lltag only guess (no user-specified formats) and never ask for confirmation before tagging.

mycomputer:~/% lltag -G */*/*/* --yes 
Processing file "music/Grandaddy/Grandaddy - First Album/Grandaddy - Revolution.ogg"...
  Trying to parse filename with internal formats...
    '%a/%a - %A/%a - %t' matches this file...
      ARTIST  : Grandaddy
      ALBUM   : First Album
      TITLE   : Revolution
  Tagging.

The following example uses lltag to retrieve tags from CDDB with the interactive interface, tags the file, and renames it according a user-provided format. The output has been truncated for sake of concision (the usage should actually appear with first occurence of each menu, and there may be more CDDB results).

mycomputer:~/% lltag --cddb myfile.mp3

Processing file "myfile.mp3"...
  Enter CDDB query [<query>q] (no default, h for help) ? prout
      Sending CDDB request...
    1: Le Petit monde de Mademoiselle Prout / Le Petit monde de Mademoiselle Prout (cat=rock, id=5308b61b)
    2: Le Petit monde de Mademoiselle Prout / Le Petit monde de Mademoiselle Prout 2 (cat=misc, id=530bd51a)
    3: Les Prout / Des Prout qui chantent (cat=misc, id=52091717)
  Enter CD index [<index>vkq] (no default, h for help) ? 3
      Sending CDDB request...
    ID: 52091717
    ARTIST: Les Prout
    CAT: misc
    TRACKS: 6
    ALBUM: Des Prout qui chantent
    Track 01: Ben ben ma fire (6:09)
    Track 02: Stance au z'hareng (1:41)
    Track 03: Marie Chantal (1) (1:23)
    Track 04: Le travail des femmes (1:15)
    Track 05: Marie Chantal (2) (0:56)
    Track 06: Les Rameaux (2:22)
  Enter track index [<index>Evckq] (default is Track 1, h for help) ? 6
    Current tag values are:
      ARTIST  : Les Prout
      TITLE   : Les Rameaux
      ALBUM   : Des Prout qui chantent
      NUMBER  : 6
  Tagging.
  Renaming with format '%a - %t'...
    New filename is 'Les Prout - Les Rameaux.ogg'
    Renaming.

Download

The lltag project homepage gives access to most resources. Many thanks to Gna! for all these.

Bugs

Please report any bug or wish on the project homepage or by mail to lltag-users AT gna.org (for spam reasons, you must subscribe before being able to post on this list).

Contribute to lltag?

The main contributor of lltag is Brice Goglin. If you want to help, feel free to contact lltag devel' mailing list (for spam reasons, you must subscribe before being able to post on this list).


Valid XHTML 1.1! Valid CSS! Loulous Compliant TrackType.org

Contact the lltag users' mailing list (for spam reasons, you must subscribe before being able to post on this list).
$Id: index.html,v 1.30 2006/10/29 17:04:41 bgoglin Exp $