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.


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.

  • 3
    You should also use an option such as -c:a copy before the output file is specified so that ffmpeg copies the stream rather than re-encoding it, otherwise you lose quality.
    – realgeek
    Jul 7 '16 at 15:09
  • This shrunk all my mp3s to 3 seconds.... ffmpeg gave an error "[mp3 @ 0x7f975a800000] Estimating duration from bitrate, this may be inaccurate" Oct 26 '20 at 13:07

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.

  • 2
    sndfile-metadata-set apparently does not support writing either Flac or Ogg files: "Error : Not able to open input file '01_The_Fox.ogg' : Error : This file format does not support read/write mode."
    – slinkp
    Apr 8 '14 at 15:40
  • In Ubuntu the package is now called "sndfile-programs" with the executable "sndfile-metadata-set". Aug 23 '20 at 7:42
  • "failed : File contains data in an unknown format." for mp3s... Oct 26 '20 at 13:09

This works for me:


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..

  • There a programs, "Taggers", that just rename files based on given data or just read the file name as string and write the data from there into the meta data of the file. My files are simply uuids without extensions and empty meta data. I need something that will just write meta data into the files. Going to check also this tool.
    – floriank
    Apr 11 '12 at 8:37
  • 1
    Like id3tag, which comes with id3lib, it seems to jumble up most non-ASCII characters though.
    – Lri
    Jul 14 '12 at 18:09
  • You might prefer mid3v2 to id3v2. On Debian-based systems it can be installed with apt install python-mutagen. But that is only for mp3 files, so not the multi-format solution the OP is looking for.
    – mivk
    Dec 29 '19 at 15:56

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

  • I'm not looking for a tagger. Refining my questions but thanks for making clear that there are taggers which I do not want. ;)
    – floriank
    Apr 11 '12 at 0:57
  • @burzum I'm not sure I understand the distinction? You can write individual tags with omptagger -s name=value file.
    – ephemient
    Apr 11 '12 at 1:00
  • Ok, the notes made me think this is not possible, I'll have to check this out tomorrow it's late here and I have linux just in a VM running. If there would be a windows binary it would be perfect because it is my primary development OS. I'm going to review this tool and mark your answer as correct if it works out for me.
    – floriank
    Apr 11 '12 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.