Read Mpeg header in file without ID3v1

Marcelo Augusto at
Fri Sep 10 04:50:12 CEST 2010

Hello !
   I´m developing a cataloguer to put an order in my MP3 collection. I´m
using this code below to get the length of mp3 file as all other mpeg
QString Filename = "/mnt/cd/file01.mp3";

TagLib::MPEG::File MpegFile(FileName.toStdString().c_str());
TagLib::MPEG::Properties MpegProperties(&MpegFile,
QString MyLength = "length: " + QString("%1").arg(MpegProperties.length());

  This works fine with almost my files, just when the mp3 file don´t have
ID3v1 (have only ID3v2) this code return "length: 0". I make tests using
EasyTag and manipulating the files to remove the ID3v1 and let just the
ID3v2 this happen in 100% of the cases.

  I have found a bug ? I´m not usually a lucky guy, then i ask for anyone to
help me why this happen in my code.

Some details:
I tried without the ReadStyle Accurate and the same result.
I tried too with bitrate, channels and this methods return 0 too.
I´m using the version 1.3.6 of the Taglib.
I´m developing using Qt 4.5.3 on Ubuntu 9.10.
I´m from Brazil and my english is not the best

Tanks everybody to this help.

.:.::Marcelo Augusto::.:.
MSN: harkonmoseley at
SKYPE: harkonmoseley
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the taglib-devel mailing list