tillt / CleanID3

Parses ID3V2 tags from the supplied file, removes occurrences of forbidden words from text frames, updates the file if needed.
Apache License 2.0
1 stars 0 forks source link

Can this be used to remove these tags #3

Open bonelifer opened 3 months ago

bonelifer commented 3 months ago

Need to remove these, so I can reapply replaygain.

replaygain_album_gain replaygain_album_peak replaygain_reference_loudness replaygain_track_gain replaygain_track_peak rgain:album rgain:track MP3GAIN_ALBUM_MINMAX MP3GAIN_MINMAX MP3GAIN_UNDO

tillt commented 3 months ago

Shouldn't be too hard - lemme look into that tonight....

tillt commented 3 months ago

...added such functionality. There is a new command flag you can use for enabling that feature; ungain.

@bonelifer give it a shot!

./cleanid3 -clean=false -ungain=true test.mp3

Removing frame TXXX:replaygain_reference_loudness
Removing frame TXXX:replaygain_track_gain
Removing frame TXXX:replaygain_track_peak
Removing frame TXXX:MP3GAIN_MINMAX
bonelifer commented 3 months ago

Missing, these but otherwise works: rgain:album rgain:track

It would be helpful to have forbidden-id3.txt to make some tags easier to remove. For instance, one of the tags has 512 right now. However, another tag might contain those numbers. By specifying the ID3 tag to remove, accidental deletions can be avoided.

tillt commented 3 months ago

Good idea to have them in a configuration file indeed. About the tags rgain:album & rgain:track that's cause I did not check the specs before implementing; those are part of ID3v2.4, controlled by RVA2 tags and not as currently implemented as TXXX tags.

So in other words, your desired configuration file for unwanted tags would be something like this:

RVA2:rgain:album
RVA2:rgain:track
TXXX:replaygain_album_gain
TXXX:replaygain_album_peak
TXXX:replaygain_reference_loudness
TXXX:replaygain_track_gain
TXXX:replaygain_track_peak
TXXX:MP3GAIN_MINMAX
TXXX:MP3GAIN_UNDO

I'll look into this...

tillt commented 3 months ago

Dangit - seems the underlying ID3 lib (https://github.com/n10v/id3v2) does not support the ID3 version 2.4 RVA2 tag. Adding it to the library is certainly possible but not entirely trivial. I have opened an issue there but am not too hopeful anyone will tackle that soon; https://github.com/n10v/id3v2/issues/90.