Detemine BITRATE for name of folder

I often have several different versions of an album in my collection. These versions have the same album name, but often differ in the total number of tracks and, in most cases, in the encoding quality.

For this reason, I would like to include this information in the directory names.

Currently, my directories are structured as follows: ARTIST \ ORIGINALYEAR ALBUM

In future, this could look like this: ARTIST \ ORIGINALYEAR ALBUM TOTALTRACKS BITRATE

Determining the number of tracks is not a problem.

But deriving the (average?) bitrate for an album (valid for MP3, FLAC, OGG, WV, WAV, DCC audio) in a uniform manner is currently beyond my capabilities.

Does anyone have a solution for this task?

See e.g. here:

and here:

This is what I’m currently using.

'['$upper(%_extension%) -$if($eql(%_extension%,flac), [%_bitspersample%-$cutRight(%_Samplerate%,3)],$if($eql(%_extension%,mp3), [%_vbr%-%_bitrate%],))']'

The output will look like:

[FLAC - 16-44]

[FLAC - 24-96]

[MP3 - VBR-235]

[MP3 - CBR-320]

@Valik: Your above solution takes the %_bitspersample% and %_samplerate% from the first file only.
It does not calculate the average bitrate for an entire album. If the bitrate of your first file differs from that of the other files, the name of the new folder will not be accurate.**

AFAIK this is not easily possible as @dano wrote 13 year ago in the already linked topic:

** This is particularly relevant for MP3 VBR (with Variable BitRates) files, where one album can have many different bit rates for its tracks.

I think this circumstance can be ignored if you keep the purpose of the requested folder name in mind. Hardly anyone will rip an album with different quality levels for the individual tracks. Even with a purchased album, there probably won't be a different quality level.
Of course, with standard VBR encoding, the individual tracks differ in their bitrate. However, in my opinion, track 1 is generally sufficient for a comparative quality assessment, if we ignore exotic track 1s with almost silence or extremely little sound variation. While the folder name doesn't indicate the average bitrate of the album, it does give an approximate one, which, however, applies to all the same albums and is therefore comparable.

Perhaps the average bitrate of the entire album would be misleading for some album versions. In my experience, many versions of an album (Deluxe, Anniversary...) often have additional tracks that are limited in their frequency range (Home Demos...) and would deliver a lower bitrate when encoded, thus dragging down the average bitrate of an album.

Sure, as long as the user is aware that this will not display the average bitrate. :wink:

Example from my "catch of the day" album:
Sorted by track number  

       sorted by Bitrate

The sum of this 11 example VBR tracks is 2'037.
Divided by 11 tracks the average VBR is 185.
The first track shows 179.
The highest bitrate shows 212.
The lowest bitrate shows 142.

The new folder name with above example format string would be:
[MP3 - VBR-179]

+1 :+1:

And here is an example for a track that drags the album-average down. :wink:

I got it in this quality:
image

The song #15 of Wilco's "Summertheeth" is really only 23 seconds of nothing.
Resulting in a small 952.60 KB file encoded in 320 kbps CBR mp3 :wink:

SCNR. I know what you mean and I agree with you.

You could take a look at the python script I’ve written to accomplish this task for my folders since I found it to be impossible/impractical to do in Mp3tag itself. I’ve described how I use it as a tool in Mp3tag in this unfortunate thread.

WARNING:
You should only attempt to use it if you’re comfortable with the command line and have a basic understanding of python so you can glean what the script will do or ideally adjust it to fit your preferences/needs.

Many thanks to everyone who has contributed constructive suggestions here.

I will review them and am optimistic that a suitable solution will be found.

:smiley:

30.10.26: I’am still working on this, I will give feedback when I found my way.

Please let us know later which solution you have chosen for your collection.
It's always interesting to find out what solutions other collectors use and the reasons behind them.