Flac 24bit

And for my next question, Is there a way to make a tag for a flac or lossless file only if it is 24bit?

I haven’t tried this, but judging by https://picard.musicbrainz.org/docs/tags/ you should be able to use the _bits_per_sample variable. As per your last post, conditions are useful too, so try using a condition with that variable.

When experimenting with all this, I find it useful to always keep https://picard.musicbrainz.org/docs/scripting/ and https://picard.musicbrainz.org/docs/tags/ open. :blush: Good luck!


@ZoeB has the right tag. And I have seen something like that asked before…

Try some of this: Filerenaming/Scripting help

There are some superb script examples scattered around the forum. Just take a bit of searching out.

Edit: Just spotted your username. Hello @cyberdoggy Sorry if I scared you the other week when I piled in and cleaned up some of those confused releases you added. I did try and leave some notes, but notes can be hard to spot. MB is a weird place with weird guidelines that take a while to understand. ANY help you need - just ask. I actually had quite a bit of fun untangling your work so I would be happy to explain the fixes I did. It also made a bad day into a good day for me. :smiley:


It’s ok IvanDobsky, I stopped adding releases and am sticking to just trying to get my tagger script the way I want it.I am also having fun seeing the way the new script is making my directory’s look, while organizing my music. Still have a couple things left in my script but I am browsing the forums here and picking up what I can in bits and pieces. Glad to hear I got your mind off of things and turned your day around :wink:

1 Like

If you are finding releases that are not in the database then don’t let that first experience put you off.

The joke is that a few days after clearing up after the mess the discogs script was causing for you - I also used that same script and made an even bigger mess on a release myself. :rofl: Script is stupid in many ways… just needs taming with careful application of a large stick…


I have a request similar to cyberdoggy. How to get a tag in filenames but only for 24bit FLAC files?

For 16bit files I would like to get such a structure (only FLAC added):
Max Richter - Recomposed by Max Richter- Vivaldi – The Four Seasons [2012] [Album] FLAC

and for 24bit (media type FLAC, bits per sample and two digit sample rate):
Max Richter - Recomposed by Max Richter- Vivaldi – The Four Seasons [2012] [Album] FLAC 24bit 96kHz

I know how to do it for all files (%_extension% %_bits_per_sample%bit %_sample_rate%kHz) but I have no idea that it would work only with 24bit files.

I figured it out:

$if($gt(%_bits_per_sample%,17), %_bits_per_sample%bit,)

$if($gt(%_sample_rate%,44100), $div(%_sample_rate%,1000)kHz,)

Would you mind sharing how did you make this work, more specifically where did you insert the above? I tested it with mine, but couldn’t get it to work.

In Picard’s preferences > file naming > name files like this, you can specify (using appropriate variables) the exact format you’d like to use for your filenames. The above snippet will output the strings “24bit”, “48kHz” etc as appropriate, so you can insert it into the exact point in the filename text you want those strings to appear.

1 Like

@esdee I just use this…

$if($eq($left(%_bitrate%,5),$right(%_bitrate%,5)),CBR $left(%_bitrate%,3),VBR$if(%_bits_per_sample%, %_bits_per_sample%,))

1 Like

Remove ` beetwen lines and will be work:

$if($gt(%_bits_per_sample%,17), %_bits_per_sample%bit,)

$if($gt(%_sample_rate%,44100), $div(%_sample_rate%,1000)kHz,)
1 Like

Try this
($div(%_sample_rate%,1000)$if($ne($mod(%_sample_rate%,1000),0),.$left($mod(%_sample_rate%,1000),1)) kHz,%_bits_per_sample% bit)