Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: ReplayGain metadata formatting (Read 3383 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

ReplayGain metadata formatting

According to the wiki:
https://wiki.hydrogenaud.io/index.php?title=ReplayGain_1.0_specification

Quote
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:

    Positive gains with leading '+'
    More or fewer significant digits than specified in any field
    Leading zeros or spaces in integer fields
    Missing or malformed 'dB' suffix (e.g. no space between numeric digits and suffix, alternate capitalization)

    Alternate capitalization of keys
Which software do the things in bold when writing files? A quick check using a hex editor seems to show that foobar2000 only does the non-bold items.

Re: ReplayGain metadata formatting

Reply #1
I think your hex-editing is what was the problem. You can't just alter a string length with hex-editor unless you also fix the accompanying binary fields where lengths are stored.
I manually edited ReplayGain tags with MP3Tag and reloaded the information in foobar2000 after each edit to see what is supported and what is not. No mutilation caused the RG to go missing. Even nonsense like this is fully supported:
X

Re: ReplayGain metadata formatting

Reply #2
@Case , I asked this because I am planning to write a software (for myself) to parse RG metadata, therefore I want to find some software actually write odd looking RG metadata so that I can have some sample files to debug my software.

Because foobar2000 writes RG metadata pretty decently, so it is not a very good candidate for debugging my software.

Re: ReplayGain metadata formatting

Reply #3
being able to read broken RG metadata is of questionable usefulness, it is derived from audio itself so you could just drop and regenerate it.
unneeded software complexity also has a cost.
a fan of AutoEq + Meier Crossfeed

Re: ReplayGain metadata formatting

Reply #4
I asked this because I am planning to write a software (for myself) to parse RG metadata, therefore I want to find some software actually write odd looking RG metadata so that I can have some sample files to debug my software.
Sure, but the ID3 (or whatever) tag format has to be respected regardless – otherwise the file breaks, which is what you did by adding/deleting characters without updating the field pointers.  As mentioned above, you can alter the tag content to whatever you like using MP3Tag, and the field pointers will get updated appropriately for you.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: ReplayGain metadata formatting

Reply #5
which is what you did by adding/deleting characters without updating the field pointers.
No, for my purpose I need to keep the files read-only. In my first post I just used an hex editor to peek the files, I did not alter them.

I think I'd just use MP3Tag for debugging.

 

Re: ReplayGain metadata formatting

Reply #6
In my first post I just used an hex editor to peek the files, I did not alter them.
You must have had a means to generate that selection of malformed RG tags in order to see what worked and what didn't – or are you saying those malformations are all out there in the wild?
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: ReplayGain metadata formatting

Reply #7
You must have had a means to generate that selection of malformed RG tags in order to see what worked and what didn't
It's exactly why I made this thread - asked if someone knows some software writes strange RG tags. But now because MP3Tag seems to be a suitable tool so I would just use it. If I already have some malformed files to try out then I would not have started this thread.

For example, years ago I also made a tool to inspect MIDI data and I asked questions when I found some abnormal files:
https://hydrogenaud.io/index.php/topic,98907.msg946246.html#msg946246

Re: ReplayGain metadata formatting

Reply #8
The initial message is/was very misleading. foobar2000 writes ReplayGain perfectly by the specs. It doesn't do any mangling. Your initial post made it sound like foobar2000 can only read the two types of mangled tags. Now your clarifications make it sound like you claim that foobar2000 RG writing gets two points wrong.

Re: ReplayGain metadata formatting

Reply #9
I posted in the "General Audio" forum so it is pretty clear that it is not a foobar2000 bug report. It is also pretty clear to the moderators otherwise my posts would have been quickly moved to the foobar2000 forum if they misinterpreted my posts.

Re: ReplayGain metadata formatting

Reply #10
I posted in the "General Audio" forum so it is pretty clear that it is not a foobar2000 bug report. It is also pretty clear to the moderators otherwise my posts would have been quickly moved to the foobar2000 forum if they misinterpreted my posts.
No, sorry, unless there's a language issue here I'm not having that.  You're trying to wriggle out of your own mess instead of admitting "my bad".  Nobody is saying you posted a bug report, but you very much did say:
A quick check using a hex editor seems to show that foobar2000 only does the non-bold items.
...which was taken to mean you used a hex editor to create the listed malformations and ran them through FB2K.  That is what we found misleading, and the answers were therefore garbage in, garbage out.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: ReplayGain metadata formatting

Reply #11
A quick check using a hex editor seems to show that foobar2000 only does the non-bold items.
...which was taken to mean you used a hex editor to create the listed malformations and ran them through FB2K.  That is what we found misleading, and the answers were therefore garbage in, garbage out.
You trimmed my full sentence when quoting. It is originally...
Which software do the things in bold when writing files? A quick check using a hex editor seems to show that foobar2000 only does the non-bold items.
The trimmed part clearly means I did not want to create "simulated malformed files" by using a hex editor. What I originally asked for was something like an unpopular software player with a buggy RG tag scanner/writer.

Nobody is saying you posted a bug report
I am talking about the quote below:
Now your clarifications make it sound like you claim that foobar2000 RG writing gets two points wrong.

[edit]
Just another example that my post was being misunderstood as a uBlock Origin issue:
https://hydrogenaud.io/index.php/topic,120956.msg997287.html#msg997287
Fortunately someone clarified it for me.