Old 20th March 2002, 07:20   #1
fufo
Junior Member
 
Join Date: Mar 2002
Location: ZhuHai,China
Posts: 7
how to calculate the VBR bitrate mp3 file playback time ?

how to calculate the VBR bitrate mp3 file playback time ?
fufo is offline   Reply With Quote
Old 20th March 2002, 09:50   #2
Twilightseer
Frenchoderator
 
Join Date: May 2000
Location: Lavabo, fond du couloir, 3è porte à droite
Posts: 6,311
VBR changes the bitrate and thus the size of a file, not the song length.
Twilightseer is offline   Reply With Quote
Old 20th March 2002, 11:46   #3
. - .... .- -. ....
Backpacking
Moderator
 
. - .... .- -. ....'s Avatar
 
Join Date: Nov 2000
Location: საქართველო (Georgia)
Posts: 10,104
Send a message via ICQ to . - .... .- -. .... Send a message via Yahoo to . - .... .- -. ....
Assuming your file contains MPEG audio, there are three ways to calculate the
total playing time:

1. If the file has a constant bitrate, you can divide the file size by the
bitrate.

2. If the file has a variable bitrate and a Xing VBR header, you can multiply
the playing time of one frame (calculated from the layer and sample rate)
by the number of frames (obtained from the VBR header).

3. In any case, you can sum the playing time of every frame by scanning the
frame headers of the entire file.

At the very least you will have to decode the bitrate, layer, and/or sample
rate from at least one frame header.

Like my photography? Buy some here....
. - .... .- -. .... is offline   Reply With Quote
Old 21st March 2002, 03:33   #4
fufo
Junior Member
 
Join Date: Mar 2002
Location: ZhuHai,China
Posts: 7
where can i find the Xing TAG format?

where can i find the Xing TAG format?
fufo is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump