PDA

View Full Version : Batch tagging question...



Bassfiend
05-20-2015, 01:43 AM
I have a large library of music of various sample rates, bit depths and formats which I need to clean up and sanitise and I would like to try to make easier to navigate by retrospectively retagging the files adding information relating to bit depth, sample rate and (ideally) file type information to the album name tag...

e.g. Tango In The Night [24 Bit 192kHz FLAC]

Is it possible with Batch Converter to pull this information out of the files and retag them accordingly?

Phil

BrodyBoy
05-22-2015, 03:37 AM
I have a large library of music of various sample rates, bit depths and formats which I need to clean up and sanitise and I would like to try to make easier to navigate by retrospectively retagging the files adding information relating to bit depth, sample rate and (ideally) file type information to the album name tag...

e.g. Tango In The Night [24 Bit 192kHz FLAC]

Is it possible with Batch Converter to pull this information out of the files and retag them accordingly?

Phil
It would certainly be easy enough to construct that ALBUM tag.....IF you had other tags containing those pieces of data. Unfortunately, they aren't created by default and I don't think there's a DSP that can extract that info and write it to metadata. I don't personally know of another program that can batch process a library and write that data for you, so I'll be curious to see if anyone chimes in with a solution.

garym
05-22-2015, 06:50 AM
Install mp3tag from here:
http://download.mp3tag.de/mp3tagv270setup.exe

Then right click the column headings, choose customize columns, then NEW, then give it the name, Frequency, and value of:

%_samplerate% Hz

leave field and sort by blank. Now you have a column that shows the frequency of the files (44.1, 48, 96, 192, etc.)

Load up all your files then filter/sort on Frequency. Then you can do a batch with something like: CONVERT > tag to tag, then use mapping of:
FIELD: ALBUM
Format String: %album% (%_samplerate%)

This would produce new ALBUM tags that have the old album name plus the freq in parentheses, e.g., Abbey Road (96000)

You can probably use some sort of string tools within mp3tag to only pull out the 96 part of the 96000 but I haven't played around with that.
EDIT: note, you can do the "convert tag to tag" above without creating the new column heading. But it might be useful for you to have a column heading that shows the HZ of the files.

Bassfiend
05-22-2015, 08:14 AM
Haven't taken a look at whether that solution works yet but huge manhugs for taking the time and effort to reply - very much appreciated!

I'll let you know whether it works...

Phil

Bassfiend
05-22-2015, 11:38 AM
Looks good apart from mp3tag doesn't support pulling out the sample depth information (i.e. 16 or 24 bit) but I'll see how far along it gets me ...

Cheers

Phil

BrodyBoy
05-22-2015, 12:45 PM
Brilliant, garym!

I just took a look at creating a macro (called "Actions" in mp3tag) to simplify this process. You're right, Bassfiend....I can't see a way to extract the bit depth info either. But aside from that, it's easy enough to run a quick macro that renames with codec and frequency.

The one I made saves the original album name (as "ORIG_ALBUM," a hidden tag), and then adds the frequency & codec info to the album name, in parentheses. Square brackets are programmatic elements in some cases, and can't be directly written, so I used parentheses. They can be changed, but probably better to avoid square brackets unless you really need that.

If you'd like to try it, let me know and I can show you how to add it to your mp3tag Actions.

garym
05-22-2015, 03:21 PM
Brilliant, garym!

I just took a look at creating a macro (called "Actions" in mp3tag) to simplify this process. You're right, Bassfiend....I can't see a way to extract the bit depth info either. But aside from that, it's easy enough to run a quick macro that renames with codec and frequency.

The one I made saves the original album name (as "ORIG_ALBUM," a hidden tag), and then adds the frequency & codec info to the album name, in parentheses. Square brackets are programmatic elements in some cases, and can't be directly written, so I used parentheses. They can be changed, but probably better to avoid square brackets unless you really need that.

If you'd like to try it, let me know and I can show you how to add it to your mp3tag Actions.

Nice job BrodyBoy. An action makes this very useable. Regarding the not reporting 16 vs 24, I'm wondering how critical this is. I'm no hi-res expert, but in my few hundred hi-res files, anything that is 96 or 192 is ALWAYS 24 bit. And of course all my CD rips are 16/44.1. I do have some odd ball mp3s here and there that are 16/48 or 24/48. So I'd guess that as long as your freq is showing 96 or 192 you can safely assume 24 bit. 44.1 you can probably safely assume 16 bit. With 48, who knows.

Bassfiend
05-27-2015, 06:38 AM
Brilliant, garym!

I just took a look at creating a macro (called "Actions" in mp3tag) to simplify this process. You're right, Bassfiend....I can't see a way to extract the bit depth info either. But aside from that, it's easy enough to run a quick macro that renames with codec and frequency.

The one I made saves the original album name (as "ORIG_ALBUM," a hidden tag), and then adds the frequency & codec info to the album name, in parentheses. Square brackets are programmatic elements in some cases, and can't be directly written, so I used parentheses. They can be changed, but probably better to avoid square brackets unless you really need that.

If you'd like to try it, let me know and I can show you how to add it to your mp3tag Actions.

OK - If you're happy to share then how do you add that to your actions? I'm trying to work it out at the moment...

Phil

Bassfiend
05-27-2015, 07:41 AM
So far I have an action of:


%album% '[' $div(%_samplerate%,1000) kHz, %_codec% ']'

It's annoying that if you search through their forums on 'bitdepth' it's a function that seems to have been asked for for ages but the only reply has been a very bolshy "We're not going to implement that as we can see no legitimate reason to ask for it..." ... hmmm ... oddly I can think of no *ILLEGITIMATE* use for it! :D

Phil

garym
05-27-2015, 07:52 AM
So far I have an action of:

%album% '[' $div(%_samplerate%,1000) kHz, %_codec% ']'

It's annoying that if you search through their forums on 'bitdepth' it's a function that seems to have been asked for for ages but the only reply has been a very bolshy "We're not going to implement that as we can see no legitimate reason to ask for it..." ... hmmm ... oddly I can think of no *ILLEGITIMATE* use for it! :D

Phil

It is *free* software by the way (although I try to contribute every year or so). And as tagging goes, its the best program out there, and I've used many. It's not perfect of course, but nothing is.

BrodyBoy
05-27-2015, 09:43 PM
OK - If you're happy to share then how do you add that to your actions? I'm trying to work it out at the moment...

Phil
mp3tag's "Actions" are collected as .mta files in a subfolder in ProgramFiles (x86):


C:\Program Files (x86)\Mp3tag\data\actions (assuming your programs are on your C: drive)
This makes it easy to back them up (thank goodness!...since I have some Actions that took years to develop and refine!), transfer them to other installations, or share them with other users. You simply add the file to that folder and the new Action is in mp3tag next time you open it. Very slick!

BrodyBoy
05-27-2015, 10:24 PM
So far I have an action of:


%album% '[' $div(%_samplerate%,1000) kHz, %_codec% ']'

It's annoying that if you search through their forums on 'bitdepth' it's a function that seems to have been asked for for ages but the only reply has been a very bolshy "We're not going to implement that as we can see no legitimate reason to ask for it..." ... hmmm ... oddly I can think of no *ILLEGITIMATE* use for it! :D

Phil
I've seen that ridiculous "explanation" as well. Who decided that "frequency" or "bit rate," for example, are useful but that sample rate is not? It's especially annoying because it's info that's already available in the file....dBp's property handlers display it in the pop-up window when you mouse over in Windows Explorer.

Anyway, just to clarify: "Quick Actions" in mp3tag are those preconfigured operations it comes with....Format value, etc. "Actions" are macros where you write up a custom set of single operations performed in sequence, with one click...what the rest of the computer universe calls macros. ;) They are incredibly powerful tools for bringing consistency and thoroughness to your metadata. What you're doing can be accomplished with a single "format value" operation, as you're doing. I simply employed a macro to add a step that saves the original album tag. One difference is that I used $upper(%_extension%) rather than %codec%, so as to return, for example, "FLAC" rather than the long-form "Free Lossless Audio Codec."

mville
05-28-2015, 07:32 AM
mp3tag's "Actions" are collected as .mta files in a subfolder in ProgramFiles (x86):
C:\Program Files (x86)\Mp3tag\data\actions (assuming your programs are on your C: drive)

Interesting, my MP3Tag actions are saved here (Windows 8.1 64-bit):

%userprofile%\AppData\Roaming\Mp3tag\data\actions

garym
05-28-2015, 07:47 AM
Interesting, my MP3Tag actions are saved here (Windows 8.1 64-bit):

%userprofile%\AppData\Roaming\Mp3tag\data\actions

So are mine (windows 7 machine)

BrodyBoy
05-28-2015, 12:56 PM
So are mine (windows 7 machine)
My bad....you are right.

I was on a laptop with a "clean" mp3tag installation and just did a quick search for one of the standard mta files. But that's not where the subsequent, custom actions are saved....should've paid closer attention!