What is the file size limit in taglib?

Scott Wheeler wheeler at kde.org
Sun Mar 5 23:01:36 CET 2006

On Saturday 04 March 2006 10:03, Simon Raaf wrote:
> Question: What is the file size limit in taglib?
> I do want to traverse my file-system, dvd's, shares etc. getting all kind
> of info (md5, 'tag' info using taglib, etc.), and do have files >16Gb
> (captured videos and music).
> When looking for example in mpeg\mpegfile, I see things like:
> long MPEG::File::findID3v1()
> {
>   if(isValid()) {
>     seek(-128, End);
>     long p = tell();
>     if(readBlock(3) == ID3v1::Tag::fileIdentifier())
>       return p;
>   }
>   return -1;
> }
> another place (same file):
> int offset = d->hasID3v1 ? -128 : 0;)
> I'm just new to c++ but on HP-UX (true Unix) and also Windows signed long
> and int are 4 bytes and by that limited to a range of 2Gb.

Video isn't support by TagLib, which leaves FLAC as the lowest compression 
ratio format.  Working with FLAC a 2 GB limit would mean files about 36 hours 

Now, let's take the 16 GB example and think of writing a tag to that.  Most of 
the time tags are in the front of the file, and let's say you've got a really 
fast hard drive -- that it write 10 MB/s sustained even when it's reading 
from a different place on the same drive (note, in the real world I'd expect 
half to a quarter of this rate), writing a tag would take half an hour.

I consider 36 hour music files to be, well, kind of a bit out of scope.


I mean, if 10 years from now, when you are doing something quick and dirty, 
you suddenly visualize that I am looking over your shoulders and say to 
yourself, "Dijkstra would not have liked this", well that would be enough 
immortality for me.
-E. W. Dijkstra

More information about the taglib-devel mailing list