You are here: Home » Reply » Reply To: Song length detection in vbr mp3s

Reply To: Song length detection in vbr mp3s


A quick command line solution for now (I’m out of the house for most of the week, so I don’t have time for more right now), which parses all specified mp3 files in a folder, and adds or updates TLEN fields in existing ID3v2 tags.

trMP3Length *.mp3 /recursive /debugWould show actions that would be done on all mp3 files in the current folder and subfolders. Add /udpate to not only add TLEN where its missing, but also correct TLEN where it’s different from the Xing field. And if everything looks ok, use /write as well to actually have it write the changes, so once you’ve verified everything is correct, use:
trMP3Length *.mp3 /recursive /debug /update /write

Disclaimer: Trying this on a copy of a single folder first is recommended, just to make sure it doesn’t conflict with your style of tags. It won’t do anything if it doesn’t recognize the tag (e.g. it won’t deal with ID3v2.2, only with ID3v2.3 and ID3v2.4) and understands even unsynchronizing and unknown fields, but who knows, the ID3v2 standard has been interpreted in a lot of different ways by some.

Oh, and since Ron mentioned the nightlies already know even more methods to determine it, just regard this as “tag beautification”, not as something important, if you’re using a nightly 😉

If I find the time, I’ll probably see if I could implement the other ways as well if Xing tags are not present (like I just saw with iTunes-generated MP3 files), as well as VBRI frames.