A primitive command-line ogg tag editor

I am still lacking for something that resembles an audio tag editor for the console, which may be my own oversight, or it may be that such an animal doesn’t exist.

In the mean time — the mean time until evolution produces one, or I discover that there has been one under my nose all this time — I have this exceedingly primitive substitute for editing the information in all the ogg files in a directory. I tried to squeeze it into one line, although I’m sure some of you professionals out there could condense it further.

for nam in *.ogg ; do vorbiscomment -l "$nam" -c "$nam".txt ; vim "$nam".txt ; vorbiscomment -w "$nam" -c "$nam".txt ; rm "$nam".txt ; done

You can substitute vim for whatever editor you prefer; the loop will skip through all the ogg files in a directory, allow you to edit their comment fields as you like, then write your changes back to the original file. The loop removes its text output, although you could trim that part in case you want to save it as a backup measure.

Next stop is to figure out how to read the fields and rename the file to a certain pattern. Hmm. … :|

About these ads

8 Responses to “A primitive command-line ogg tag editor”

  1. 1 Art 2010/02/15 at 12:23 AM

    I think orpheus can edit id3-tags:


    Don’t know about ogg though.


  2. 2 Simon 2010/02/15 at 5:52 AM

    I really like lltag, it has a simple design, can easily be scripted and has all the features you should need.

    I use this “script” to tag my music (after I encoded it with cdparanoia and oggenc). The music is stored in a directory named ‘Artist@Album@Year’.

    # Tag artist, album and disk number.
    lltag -F ‘%a@%A@%d/track%n%i’ –yes “$1″/*.ogg
    # Edit tags to add song titles (and other things if necessary).
    lltag -E “$1″/*.ogg
    # Rename the files.
    lltag –no-tagging –rename ‘%a/%A/%n %t’ –yes “$1″/*.ogg

  3. 3 Inquisitive Independent 2010/02/15 at 6:16 AM

    Hi, my WordPress dashboard tells me that you linked to me ( http://digitalresistance.wordpress.com ) but I can’t figure out why. Any idea?


  4. 4 Mick 2010/02/15 at 7:25 AM

    I’ve been working on such a command-line tagger:

    It’s definitely alpha-quality but it gets the job done. If you run “braaainz tag –edit/-e *.ogg”, your text editor will open to edit each file’s tags. Otherwise, the “-s/–set” option can be used multiple times to modify tags un-interactively.

    Note that braaainz can be used without musicbrainz but still requires the python-musicbrainz2 library for now.

    I’ve actually been working on a such a renamer too:

    I don’t even have a readme written for it yet but for your purposes, you’d use something similar to “nomen rename ‘{audio[tracknumber]}. {audio[title]}’ *.ogg –preview”.

    Please let me know if you have any questions or ideas!

  1. 1 Links 15/2/2010: Mobile World Congress: | Boycott Novell Trackback on 2010/02/16 at 8:53 AM
  2. 2 A console goodie grab bag « Motho ke motho ka botho Trackback on 2010/10/03 at 8:15 AM
  3. 3 Still searching for … « Motho ke motho ka botho Trackback on 2010/12/17 at 11:07 AM
  4. 4 Is this a dagger which I see before me? « Motho ke motho ka botho Trackback on 2011/01/22 at 11:04 PM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Visit the Wiki!

Some recent desktops

May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF

May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games

Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers


This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,959,647 hits



Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: