Very long time of parsing of tags (mp3, mp4, ...)

Vladimir Skuzovatkin skzvlad at
Sat Mar 5 13:01:43 CET 2011


Please forget about this problem ("Very long time of parsing of tags").
After some changes I can not reproduce it.
Sorry for the trouble.

I have another question about the attached image.
I found that the file size does not decrease after removal of the picture.
For example,
    mp3 file without picture have size: 2 078 346 bytes,
    size of jpg file to attach: 314 225 bytes,
    size of this mp3 file after attaching the picture: 2 390 164 bytes,
    and size of this mp3 file after deleting of all attached pictures: 2 390
164 bytes.

Why file size does not decrease after removal of the picture?

For example, I use the next code to delete all pictures from mp3 file:

        TagLib::MPEG::File* pFile = ...;
        TagLib::ID3v2::Tag* pID3v2Tag = pFile->ID3v2Tag();
        if (pID3v2Tag)
            TagLib::ID3v2::FrameList frameList=
                if (!frameList.isEmpty())
                    std::list<TagLib::ID3v2::Frame*>::const_iterator it =
                    while (it != frameList.end())
nextIt = it;
                        pID3v2Tag->removeFrame(*it, true);
                        it = nextIt;

After performing of this code all pictures are detached, but size of file is
not decreased.
Probably, I did not correctly use the library?

2011/3/5 Lukáš Lalinský <lalinsky at>

> On Sat, Mar 5, 2011 at 8:53 AM, Vladimir Skuzovatkin <skzvlad at>
> wrote:
> > Hi!
> > I try to write "tag editor" with using "TagLib" library.
> > OS: Windows, library version number: TagLib 1.6.3.
> > I found next problem.
> > The file (mp3, mp4, ...) is opened for a long time (>30 sec) after
> writing
> > to it a image (attached picture, coverArt).
> > For example:
> > 1) Small (~10Kb) PNG image was written into media file. Time of opening
> file
> > (after writing of image) is equal to ~4 milliseconds.
> > 2) Small PNG image was deleted from media file and big (~400Kb) PNG image
> > was written into media file. Time of opening file is equal to ~30
> seconds.
> > Why the time to open (to parse tags) is very big?
> > Can you reproduce this error?
> It would be best if you could send me the files to lalinsky at,
> so that I can see the difference on the same files. I'm not aware of
> anything that would cause such slowdowns.
> Lukas
> _______________________________________________
> taglib-devel mailing list
> taglib-devel at

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the taglib-devel mailing list