Tagger# – command-line media tagger based on TagLib#


You are reading the old blog! This post has been moved to http://www.ohadsoft.com/2012/10/tagger-command-line-media-tagger-based-on-taglib/


Like I mentioned a couple of times, I like listening to and recording internet radio. Sometimes the radio shows I record are streamed in WMA format. Using Streamrecorder.NET, I’ve scheduled a weekly recording and so I have a folder filled with them. Now, the file names are timestamped, which means I can easily tell the date of each show. However, this radio station (and I suspect many others) has the nasty habit of changing the Title and Artist tags to the station’s name. This means that when I open this folder in my favorite audio player, all the files display as Some station – Some station which is pretty annoying. The solution appeared simple enough, just strip the WMA tag information from the file, right? Sure, but the only problem is that to the best of my knowledge, for around 10 years there hasn’t been a single windows command-line tool that is able to edit (or even display) WMA metadata. I haven’t seen anything for Linux and Mac as well, though I was less thorough in my search there. In any case, there is one now:


It’s basically a command-line wrapper over TagLib#, supporting most of its cross-format tagging options. To use it as a post processor in Streamrecorder.NET for the purpose I mentioned above, enter {in} -e in its arguments field. Check it out !



9 Responses to “Tagger# – command-line media tagger based on TagLib#”

  1. Jacob G Says:

    Is there a way of copying the value from on field to another using a variable? I would like to copy the album artist field to the artist field for several files at a time. Something like “taggersharp *.* -a %albumartist%


    • ohadsc Says:

      Hi Jacob,
      Just wanted to let you know I’ve released a new version of Tagger# that makes the feature you’ve requested trivial to implement in a batch file. For example, in your case:

      TaggerSharp.exe test.mp3 -r > temp.txt
      set /p VAR=<temp.txt
      TaggerSharp.exe test.mp3 -a="%VAR%"


  2. ohadsc Says:

    Hi Jacob. There is no way to do what you’re asking out of the box, but it shouldn’t be too hard to write a script that calls Tagger# twice – once to extract the metadata and once to set it.
    It is an interesting feature request though, I may add it in the future


  3. Dennis Says:

    I can’t get this to work – is it because I have 64 bit windows?

    Volume in drive C is WINDOWS
    Volume Serial Number is 08DC-E58D

    Directory of C:\duh

    09/15/2014 03:10 PM .
    09/15/2014 03:10 PM ..
    07/30/2014 04:03 PM 6,528,757 01 Owner Of A Lonely Heart.wma
    07/30/2014 04:03 PM 7,933,573 03 It Can Happen.wma
    07/30/2014 04:03 PM 9,159,437 04 Changes.wma
    07/30/2014 04:03 PM 6,126,067 06 Leave It.wma
    4 File(s) 29,747,834 bytes
    2 Dir(s) 710,935,601,152 bytes free

    C:\duh>taggersharp.exe *.wma
    Error opening file *.wma: System.ArgumentException: Illegal characters in path.
    at TagLib.File.Create(IFileAbstraction abstraction, String mimetype, ReadStyle propertiesStyle)
    at TagLib.File.Create(String path)
    at TaggerSharp.Program.ParseArgs(IList`1 args, IWriter consoleWriter)

    C:\duh>dir c:\windows\tagger*.*
    Volume in drive C is WINDOWS
    Volume Serial Number is 08DC-E58D

    Directory of c:\windows

    10/25/2013 06:50 PM 60,416 TaggerSharp.exe
    1 File(s) 60,416 bytes
    0 Dir(s) 710,935,400,448 bytes free

    C:\duh>dir c:\windows\system32\tag*.*
    Volume in drive C is WINDOWS
    Volume Serial Number is 08DC-E58D

    Directory of c:\windows\system32

    07/03/2012 07:41 PM 443,392 taglib-sharp.dll
    1 File(s) 443,392 bytes
    0 Dir(s) 710,935,400,448 bytes free


    Microsoft Windows [Version 6.1.7601]

    C:\duh>rem computer properties shows Windows 7 Professional Service Pack 1 64-bit

    I’m ultimately trying to come up with a batch file to list the Title, Filename and Directory of all the .wma files in a tree so I can sort and look for duplicates as well as producing lists of songs I have.


  4. Charles Says:

    Ohad, this is a very welcome program, as I have been converting my audiobooks to mp3 files, and the program I’m using does not transfer their tags. There are other tag editing programs out there, of course, but yours stands out because 1) it’s free , 2) it’s quick and easy, 3) it recognizes newer file formats, like m4a, and 4) it can easily be run from a batch file. One request, though, if you ever do another update would be the ability to extract / import APIC artwork (i.e., embedded album or book covers). There is an old program (metamp3) that will do this, but it won’t work with m4a’s. But even if you don’t add this, thanks for the great program!


    • ohadsc Says:

      Glad you liked it Charles!
      I’m currently tied up with a different project but I’ll put it on my list, I am indeed hoping to release another version in the future with some other requests I’ve gotten.


  5. TUMBA Says:

    Hello Mr Ohad.

    I won’t be intrusive but I find your profile via a Google seach.
    Can you help me about your wrapper “TaggerSharp” ? I’m about to create similar project but by using PHP to communicate with taglib DLL using COM class. I tried to register taglib.dll with regsrv32 but it display a warning about entry point. How can I access methods and functions provided in the taglib.dll via PHP.
    Thank you


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

%d bloggers like this: