4

Lame doesn't have a command line option to record the ID3 metadata of the "Album Artist". How to do it?

2
  • Are you dependent on lame?
    – A.B.
    May 11, 2015 at 5:19
  • @A.B.: I want to do it during the encoding process. I don't want an extra step just to fix the metadata.
    – neves
    May 11, 2015 at 17:12

2 Answers 2

6

Lame does have ID tags in commandline form. Use them when you are encoding with lame. To tag existing files you may be better served using another method. Refer to the man page by running man lame or even lame -? provides good info.

lame -?

  ID3 tag options:
--tt <title>    audio/song title (max 30 chars for version 1 tag)
--ta <artist>   audio/song artist (max 30 chars for version 1 tag)
--tl <album>    audio/song album (max 30 chars for version 1 tag)
--ty <year>     audio/song year of issue (1 to 9999)
--tc <comment>  user-defined text (max 30 chars for v1 tag, 28 for v1.1)
--tn <track[/total]>   audio/song track number and (optionally) the total
                       number of tracks on the original recording. (track
                       and total each 1 to 255. just the track number
                       creates v1.1 tag, providing a total forces v2.0).
--tg <genre>    audio/song genre (name or number in list)
--ti <file>     audio/song albumArt (jpeg/png/gif file, v2.3 tag)
--tv <id=value> user-defined frame specified by id and value (v2.3 tag)
--add-id3v2     force addition of version 2 tag
--id3v1-only    add only a version 1 tag
--id3v2-only    add only a version 2 tag
--id3v2-utf16   add following options in unicode text encoding
--id3v2-latin1  add following options in latin-1 text encoding
--space-id3v1   pad version 1 tag with spaces instead of nulls
--pad-id3v2     same as '--pad-id3v2-size 128'
--pad-id3v2-size <value> adds version 2 tag, pad with extra <value> bytes
--genre-list    print alphabetically sorted ID3 genre list and exit
--ignore-tag-errors  ignore errors in values passed for tags

Note: A version 2 tag will NOT be added unless one of the input fields
won't fit in a version 1 tag (e.g. the title string is longer than 30
characters), or the '--add-id3v2' or '--id3v2-only' options are used,
or output is redirected to stdout.

Use it like this from a script I run:

        lame  --vbr-new --preset standard --tt "${tt}" --ta "${ta}" --tl "${tl}" --ty "${ty}" --tn "${tn}" --tg "${tg}" --add-id3v2 infile.wav outfile.mp3
1
  • 1
    That's an interesting caveat, @John Mehorter: To tag existing files you may be better served using another method. I'm finding that to be true, specifically because Lame re-encodes the entire file merely to add a tag. So, while lame may be ideal for tagging while encoding, a tool like mid3v2 ( unix.stackexchange.com/a/131660 ) is much better suited to tagging existing files. Apr 19, 2019 at 13:59
3

Album artist is a non standardized ID3 tag. A lot of popular music players, like iTunes and Windows Media Player, understand the the TPE2 as the album artist.

So you must use something like:

--tv TPE2=%albumartist% 
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .