FLAC File Size Problems with Embedded Artwork

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

seanbob
Posts: 2
Joined: Tue Feb 24, 2009 4:31 am

FLAC File Size Problems with Embedded Artwork

Post by seanbob »

I've begun embedding artwork in my FLAC files in Media Monkey and, as expected, the FLAC file size will grow to include the artwork's file size.

But what I didn't expect is that upon removing the embedded artwork from a FLAC file, the FLAC file size remains the same as it did when the artwork was embedded.

For example, a 25MB FLAC file has 1MB artwork added to it and becomes 26MB, but when the artwork is removed, the FLAC remains at 26MB and doesn't shrink back to its original 25MB. With large FLAC libraries, this could obviously become quite an issue.

Does anyone know why this problem is occurring and how it can be addressed?
Peke
Posts: 18181
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: FLAC File Size Problems with Embedded Artwork

Post by Peke »

Problem with FLAC Files is that by design Metadata info is forced on file begin. So to add 1MB Artwork MM need to rewrite whole file. That is OK when you want to do that single time but when you want to do that on 300MB 5.1/24/96 FLAC over WLAN twice in 10 seconds you are in trouble. So Flac Designer though about PADDING, where once 1MB artwork is deleted FLAC file contain PADDING (reserved empty space) for future updates of 1MB or less Metadata info where any app doing it correctly will use in-line edit to PADDING space instead of rewriting whole file.

To prove.
1. Add 1mb art to 25MB FLAC
2. Delete Art
3. Add 500KB art to flac
4. File will be still 26MB eg. 500KB Art and 500KB of Padding left
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
seanbob
Posts: 2
Joined: Tue Feb 24, 2009 4:31 am

Re: FLAC File Size Problems with Embedded Artwork

Post by seanbob »

Thanks for the explanation! :)

I didn't quite understand why someone would choose to implement tagging that potentially uses extra disk space, but it makes some sense now.

If others are looking for a way to remove the extra padding from their FLAC files' metadata -- after removing artwork from the file or after reducing the artwork's size, for example -- I did come across a functional and fairly elegant solution here: http://forums.mp3tag.de/index.php?s=&sh ... st&p=39707
Post Reply