3 ms·
I worked with the FLAC format and it also recommends padding to make it easier to edit metadata. I think libflac reserves 4 KB by default. > PADDING: This bloc
by nayuki 5y ago
I worked with the FLAC format and it also recommends padding to make it easier to edit metadata. I think libflac reserves 4 KB by default.
> PADDING: This block allows for an arbitrary amount of padding. The contents of a PADDING block have no meaning. This block is useful when it is known that metadata will be edited after encoding; the user can instruct the encoder to reserve a PADDING block of sufficient size so that when metadata is added, it will simply overwrite the padding (which is relatively quick) instead of having to insert it into the right place in the existing file (which would normally require rewriting the entire file).
-- https://xiph.org/flac/format.html#format_overview https://xiph.org/flac/format.html#format_overview
- hbn 5y agoThe article mentions this. It's just half a megabyte seems like a lot for metadata, especially since it's been doing this for so many years, when storage was more expensive
- nayuki 5y agoThe article explained the reason for the AAC file padding. I'm pointing out that other formats like FLAC (not mentioned in the article) also adopt this strategy.
- throwntoday 5y agoDepends if the space is utilized for album art which can easily exceed 0.5MB
- kadoban 5y agoIf it's album art then it doesn't seem big _enough_. Either way it's a bit odd of a size. Maybe it was for album art back when resolutions were lower and it was enough.
- iggldiggl 5y ago> If it's album art then it doesn't seem big _enough_. Doesn't it? Unless you're embedding print-quality artwork or more than just the front cover, I would have thought that 0.5 MB was plenty…
- kzrdude 5y agoKnowing apple with their retina-everything resources, of course it should be print quality album art.
- bscphil 5y agoThe standard method for including album art (outside of iTunes world, I don't know what things are like there) has always been folder.jpg or folder.png in the folder. (And several other common names.) It can be as big as you like. Software should always copy the art, and of course dragging and dropping the album in your file manager makes this happen automatically. It's absurd to spend the same 0.5MB or more on the same piece of art over and over on every tiny lossy-encoded track. Even with FLAC it's pretty questionable. Better to include a tiny 100x100 jpg or nothing at all. I actually recently encountered a bug with a music encoding tool where it failed to resize my album art when creating Opus files. I ended up with an Opus-encoded album that was bigger than the FLAC version because every single song had a 30 MB high res scan of the vinyl album art embedded in it.
- Dylan16807 5y agoHonestly 0.5MB of blank space is never a good tradeoff. If you're adding album art that's a significant fraction of a megabyte, then just rewrite the file. > which can easily exceed 0.5MB If that happens then you were better off never reserving space at all.
- bscphil 5y agoYeah this is the correct take on all this. It's simply not reasonable to add more than 10% to the size of a file on the off chance you need to perform a tiny manipulation to the file's metadata later.