Bits Per Sample / Sample Size (16-bit, 24-bit) Tag??


#1

FLAC. WAV. DSD. DFF. APE... :music:

Basically any lossless format has the ability to have sample sizes (or bits per sample) that are greater than 16 bits.

Is there any way to include this informational tag within MP3Tag? We've been teased by the "Bits" column with the default column value of %_BitsPerSample%, hoping that we can differentiate files using this tag, but it does not work. I am finding higher quality files at every turn (www.HDTracks.com is a good place to start), and I would love to rename files with this information included, but I can't rename them if they have the same samplerate (let's say 88.2Hz), but different samplesizes (16-bit vs. 24-bit) and are of the same format (FLAC)... they will essentially have the same filename when doing a "Tag > Filename" conversion.

Programs like WinAMP and VLC can detect this information, it would be absolutely wonderful if the same could be said of MP3Tag... can this please be included as a feature - if not for all or most lossless formats, at least for FLAC, because I believe that ultimately that you can re-encode most of the lossless formats to FLAC.


#2

You had a default column defined to show %_bitspersample%? Or is that something you tried, hoping it might work? I don't see it in the documentation.

But I agree 100%. I have never understood why this was omitted from Mp3tag.


#3

My apologizes, I remember seeing it in a post somewhere on the internet a LONG time ago, and I had created the column, but it does not work. It is not a default column.

I've spent a lot of time (since 2008) doing a lot of scripting for filename conversions over the years using this tool. This feature would make MP3Tag even MORE awesome than it already is!


#4

Can be do Mp3Tag program incorporated in both the number of Channels (1 or 2) and Bits per sample (16, 24, 32), so that it is visible in WinAmp view file info?


#5

Well, I've found a way to retrieve the "bits per sample" information using dbpoweramp's scripting functions. :music: BTW, dbPowerAmp is not free. I'm a proud owner of a registered copy, simply because I use the CLI as a tool within MP3Tag to convert other lossless files to FLAC, and convert FLAC files to 320kb MP3s bringing over all of the tags, including the album art. It's a tool that I can't live without... just like MP3Tag. :smiley: :music:

Here's a link to the dbPowerAmp scripting page, if anyone is interested:

http://dbpoweramp.com/developer-scripting-dmc.htm

There are some nice methods that you can use to pull information for audio files in various formats once a new "dMCScripting.Converter" object is created (which I've managed to do in PowerShell) .

.AudioProperties
.ReadIDTagElementValue

I'll post some information later that I've been able to pull from various audio files in multiple formats and settings to help me with testing and formatting a new filename string, which I've been able to convert from one of my custom "Tag > FileName" scripts in MP3Tag - into PowerShell.

Since it is external to MP3Tag, I'll have to try to finish coding a PowerShell script (mostly done) and configure it as a tool in MP3Tag (which I haven't attempted yet) to rename the file (leaving it in the current directory that MP3Tag has open), and then manually refresh the directory. I should then be able to see the renamed file in MP3Tag, and then rename (move) the file again to place it in the correct directory, so I can still see it in MP3Tag. For the most part, if the file is encoded in anything other than 16-bit @ 44.1kHz stereo - it will appear in the filename, among other things.

To get an idea of what it does, here is some pseudocode:

%track%_%bitrate% - %title% - [%samplebits%-%samplerate%_%channels% - %minutes%.%seconds%]

No - it's not pretty, but this could be a possible workaround until this gets into MP3Tag. Someday. :slight_smile:


#6

Like I promised, after parsing out the data from the output using dbPowerAmp, here are some of the AudioProperties from a FLAC file:

  1. TYPE: Free Lossless Audio Codec File [.flac]
  2. SIZE: 130.52 MB (37% Compressed)
  3. LENGTH: 6 minutes 15 seconds
  4. CHANNELS: 2 (stereo)
  5. SAMPLE RATE: 96 KHz
    6. SAMPLE SIZE: 24 bit
  6. BIT RATE: 4,608 kbps (DVD)
  7. AUDIO QUALITY: Perfect (Lossless)
  8. ENCODER: FLAC reference libFLAC 1.2.1 20070917
  9. CONTAINS: Album Art, CRC, ID Tag [Vorbis Comments]
  10. ARTIST:
  11. TITLE:
  12. ALBUM:
  13. TRACK: 01
  14. YEAR: 1982
  15. GENRE: R&B
  16. ALBUM ARTIST:
  17. COMPOSER:

Next is tag information from that same file:

  1. TITLE:
  2. ALBUM:
  3. ARTIST:
  4. GENRE:
  5. COMPOSER:
  6. YEAR: 1982
  7. TRACK: 01
  8. ALBUM ARTIST:

Ok - so I left out some of the actual data and tags... but you get the picture :slight_smile:

I've readied the PowerShell script and it runs perfectly using the following format in a 64-bit command prompt. It pulls the tags and information from the file, parses it and renames the file with a new file name according to the script in the same folder.

However, when I set it up as a tool in MP3Tag passing the complete filepath as an argument, I can see where the argument it passed to the script from a batch file, but the COM objects won't load. I'm thinking that this is a 64-bit vs 32-bit issue, where the 64-bit dbPowerAmp scripting dll won't register in a 32-bit command prompt.

Still trying to work out the kinks on this one, I'll let you guys know more details... when and if I can get this to work. All for the sake of including the Sample Size in a file name. :smiley: :w00t:

:music:


#7

Or you can just use foobar2000 to rename your files. It supports %__bitspersample%


#8

Thanks Dano, but I'd much rather do everything I can in one program. I've done so much scripting and formatting with MP3Tag, from getting album art, re-encoding files with dbPowerAmp, it only makes sense to build upon every customization I've built...

So now I can rename files with bits per sample in the filename with dbPowerAmp... Yes.. I've done it! :slight_smile: :w00t: :music: :smiley:

So in the end, I was able to compile an executable from the PowerShell script I wrote... (thanks to the kind folks at Quest for including the feature in PowerGUI, which is a free download...) and now it works as a "standalone" (you must have PowerShell installed) executable that accepts the full path to the audio file as a parameter!

Now I'll be creating multiple executables and configure them as a separate tool in MP3Tag for every different format I need.. there aren't that many, maybe 5 or 6 tops. Problem solved!!