Help - Search - Members - Calendar
Full Version: ID3v2 Commandline / Scriptfile Tagger
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
trainee
I've done a lot of searching but I can't find an ID3v2 tag utility that I can run from the commandline or execute with a script file. I know Case's TAG will run from the commandline, but I believe (please tell me if this isn't true) that it can only read ID3v2 tags, not write them. My Nomad Zen makes use of the ID3v2 tags, and I prefer to use genre's not supported by ID3v1. I have my own little utility/script that works on a bunch of files and then can spit them out to another program for tagging (hence the commandline/scriptfile). I would use Lame's built in tag function with --id3v2-only but it won't accept non-ID3v1 genres. Help! I'm almost totally automated except for this part. Thank you for any help.
phwip
Surprisingly enough you can actually do command-line tagging using foobar2000. For what you want to do you will need to make sure you have id3v2 support installed: I think that if you run the Special installer there is an option to include this but if not then you need Kode54's foo_id3v2 component. You also need to set it to write id3v2 tags by default by clicking on Preferences -> Playback -> Input -> Standard inputs and setting "Tag type to write" to either "ID3v2" or "ID3v2 and ID3v1", whichever suits your needs.

Please take note that it will strip other tag types from the file. So if you want ID3v2 tags and will also have mp3gained the files (which writes APEv2 tags) then it will strip the mp3gain tags. So this method will only work if you are happy to have only ID3 tags, or to add any other tags at a later stage.

Once this is all set up you can then tag from the command line, for example:
CODE
foobar2000.exe /tag:Title="My Song";Artist=Me;Genre="Acid Jazz" "test.mp3"


One side effect of running this command line is that as well as tagging the file it will also launch the foobar2000 GUI. However, if you open the GUI before you start and minimise it you can then tag from the command line as many times as you wish and the GUI will stay hidden.
trainee
@phwip: Thanks! the foobar2k setting was what I was missing. I seriously could not find it in the preferences so it just kept writing ID3v1 tags. You're a lifesaver. Showing the foobar2k gui is no problem as I already use foobar2k to album replaygain the tracks. Sometimes you look and look and look and just can't see a setting staring you in the face. You rock dood! <high five!><high five!>

biggrin.gif
M
You could also try id3 mass tagger, a command-line tool which supports both ID3 v1.1 and ID3 v2.3.0.

- M.
trainee
@M: thanks...actually this may be cleaner for me than using foobar2k. It looks good, and comes with source, so I may be able to directly integrate it with my C# utility. Cool.
Otto42
QUOTE(trainee @ Aug 24 2004, 04:20 PM)
@M: thanks...actually this may be cleaner for me than using foobar2k.  It looks good, and comes with source, so I may be able to directly integrate it with my C# utility.  Cool.
*


Well, if you want something to build right into a utility, I'd recommend id3lib: http://id3lib.sourceforge.net . It can be used as a DLL very easily, and supports just about everything there is to support regarding ID3. Might be nicer than using a command line type of program or rolling your own codebase.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.