Help - Search - Members - Calendar
Full Version: Why do I get different mp3 song duration?
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
yongwpi
I used directshow IMediaseeking::getduration and windows media format sdk to extract mp3 duration, but I got different results. Duration from IMediaSeeking is about 5 times longer than that from sdk. Thanks for any information about this problem.
Firon
One of them probably doesn't know how to read the time properly with VBR files.
yongwpi
QUOTE(Firon @ Mar 30 2006, 11:13 PM)
One of them probably doesn't know how to read the time properly with VBR files.
*


Thanks for your information. Yes, it is VBR file. So there is no way to extract duration correctly from VBR files, right?
Firon
Well, there's two kinds of VBR headers, the Xing header, and the VBRI header (and LAME if you wanna get technical). Some players don't support VBRI, Xing is typically more supported. LAME writes headers that are extensions of the Xing header, but are still compatible. They both provide ways to figure out the bitrate and length.
http://www.codeproject.com/audio/MPEGAudio....asp#XINGHeader
http://gabriel.mp3-tech.org/mp3infotag.html#versionstring
yongwpi
QUOTE(Firon @ Mar 31 2006, 08:56 PM)
Well, there's two kinds of VBR headers, the Xing header, and the VBRI header (and LAME if you wanna get technical). Some players don't support VBRI, Xing is typically more supported. LAME writes headers that are extensions of the Xing header, but are still compatible. They both provide ways to figure out the bitrate and length.
http://www.codeproject.com/audio/MPEGAudio....asp#XINGHeader
http://gabriel.mp3-tech.org/mp3infotag.html#versionstring
*


Thanks. They are really helpful!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.