13

Is there any command line tool that can write all three formats/containers? I've already searched but could not find anything that does the job.

So far I'm using vorbiscomment, metaflac and id3tool and I really would like to replace them by a single tool if possible.

If there is no tool than can write them all, is there at least any suggestion to replace id3tool with something that can write id3v2 (v2.4) tags at least?

I'm not looking for a tagger but for a tool that will allow me to write meta data by a script to the different audio files. My current status is that I have a script that uses the three tools (vorbiscomment, metaflac and id3tool) but then i realized that id3tool can not write id3v2 tags... I'm creating automatically these 3 audio formats from a wav master and need to be able to automate the meta data writing to these files.

floriank
  • 1,464

5 Answers5

12

Surprisingly I found a good solution after a month: FFmpeg.

ffmpeg -i out.mp3 -metadata title="The Title You Want" -metadata artist="" -metadata album="Name of the Album" -c:a copy out2.mp3

See the complete article here: How To: Create/Write ID3 tags using ffmpeg

It is even working with UTF8 data and foreign characters.

ckujau
  • 667
floriank
  • 1,464
3

libsndfile will do all that ffmpeg does and much more elegantly.

For example, when you run $ sndfile-metadata-set --help, you can see the usage:

  sndfile-metadata-set [options] <file>
  sndfile-metadata-set [options] <input file> <output file>

Where an option is made up of a pair of a field to set (one of
the 'bext' or metadata fields below) and a string. Fields are
as follows :

    --bext-description       Set the 'bext' description.
    --bext-originator        Set the 'bext' originator.
    --bext-orig-ref          Set the 'bext' originator reference.
    --bext-umid              Set the 'bext' UMID.
    --bext-orig-date         Set the 'bext' origination date.
    --bext-orig-time         Set the 'bext' origination time.
    --bext-coding-hist       Set the 'bext' coding history.
    --bext-time-raf          Set the 'bext' Time ref.

    --str-comment            Set the metadata comment.
    --str-title              Set the metadata title.
    --str-copyright          Set the metadata copyright.
    --str-artist             Set the metadata artist.
    --str-date               Set the metadata date.
    --str-album              Set the metadata album.
    --str-license            Set the metadata license.

There are also the following arguments which do not take a
parameter :

    --bext-auto-time-date    Set the 'bext' time and date to current time/date.
    --bext-auto-time         Set the 'bext' time to current time.
    --bext-auto-date         Set the 'bext' date to current date.
    --str-auto-date          Set the metadata date to current date.

Most of the above operations can be done in-place on an existing file. If any operation cannot be performed, the application will exit with an appropriate error message.

Using libsndfile-1.0.25.

Canadian Luke
  • 24,640
0

tagutil is a lightweight CLI-tool to read/write audio tags

Backends:
   libvorbis: Ogg/Vorbis files format
      TagLib: various file format but limited set of tags

example use in bash script:

#! /usr/bin/env bash
# tagutil demo: fix title
# license: public domain, no warranty

set -e

check dependencies

for dep in tagutil jq do command -v $dep || { echo please install $dep; exit 1; } done

dryrun=false if [[ "$1" == "-n" ]] then dryrun=true shift fi

for file in "$@" do

echo "file: $file"

read title

title=$(tagutil -F json print "$file" | jq -r ".[0].title") title1="$title" # copy echo "title 1: $title"

fix title

title=$(echo $title) # collapse multiple whitespaces title=$(echo "$title" | sed 's/ (original version)$//i') # remove suffix title=$(echo "$title" | sed 's/ (album version)$//i') # remove suffix title=$(echo "$title" | sed 's/ (official video)$//i') # remove suffix

if [[ "$title1" == "$title" ]] then echo no change continue fi

echo "title 2: $title"

drycmd=() $dryrun && drycmd=(printf "%q ")

make backup

#[ -e "$file.bak" ] || cp -v "$file" "$file.bak"

write title

${drycmd[@]} tagutil set:title="$title" "$file"

done

milahu
  • 297
0

omptagger provides a unified interface for tagging all three of your requested file formats.

mivk
  • 4,015
ephemient
  • 25,622
0

This works for me:

http://id3v2.sourceforge.net/

It's available in the Debian repo's, if that's relevant.

-- wait, is that an example of a 'tagger', which is what you're not looking for? I'm afraid I don't quite understand your question then..

rkv
  • 1