Padding for tag

I request, mp3tag to let assign the "padding size" under settings.

  1. Retain existing padding after new field added or existing pad removed. Meaning, final file size must not expand or contract with changes in tag.

  2. If the padding is not sufficient for the new field, then it must add value (a large value) given in the setting.

This way, files are not re-written only the small bytes are made in the songs.

I have a large collection of songs. mp3tag crashes all the time.

I have started to mutagen in python. They have this feature.

'''
from mutagen.mp3 import MP3

def retainpadding(info):
if info.padding < 0: # in case there is no padding left after write add lots
return 50000 # bytes
else: # if there is some left, just use it
return info.padding

f.save(padding=retainpadding)
'''

This way the music files have sufficient breathing space to add and remove tags after the first save.

This has been a topic since 2005:

I would also want Mp3tag to not make the tag or the padding a specific fixed size, but make the resulting file size an integer multiple of common file system cluster sizes.

1 Like

I recently noticed: if i delete a cover from the MP3 file, there will be no unnecessary empty space, Mp3tag delete it. This is new. It would also be good for FLAC.

...adjustable (4 KB, 64 KB...)