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:

https://sourceforge.net/projects/taggersharp/

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 !

TaggerSharp

10 thoughts on “Tagger# – command-line media tagger based on TagLib#”

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

    1. 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. 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. I can’t get this to work – is it because I have 64 bit windows?

    C:duh>dir
    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:windowstagger*.*
    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:windowssystem32tag*.*
    Volume in drive C is WINDOWS
    Volume Serial Number is 08DC-E58D

    Directory of c:windowssystem32

    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

    C:duh>ver

    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.

    1. Hi Dennis,

      Tagger# does not support wildcards (*) but you should be able to get what you want rather easily with a batch file such as:
      for /r %%i in (*) do TaggerSharp.exe “%%~fi”

      Having said that, for display purposes you would probably be better served by a visual tool such as http://www.mp3tag.de/en/

      With regard to duplicates, there are tools for that too, for example: http://lifehacker.com/the-best-apps-for-automatically-cleaning-up-your-music-1561265062

      Best,
      Ohad

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *