Help - Search - Members - Calendar
Full Version: How to calculate duration of ADTS AAC fast?
Hydrogenaudio Forums > Lossy Audio Compression > AAC > AAC - Tech
shaohao
Generally, I must count frame one by one to get the total number of frames.
But I found Winamp calculate the duration of a NET FILE (eg. http://tuner2.streamguys.com/ismp/51bpm-ap...rround_mix.aac) very fast?
How to implement the fast calculation?
Garf
Size/bitrate?
shaohao
QUOTE(Garf @ Nov 19 2006, 13:10) *

Size/bitrate?


How to get the bitrate?
Mangix
he's asking what the filesize is

the way to calculate the bitrate is <filesize> divided by <duration>
shaohao
Winamp does not download the whole NET file to calculate its duration.
The calculation has been done while the playback is starting.

I can get the NET file's length through the HTTP respond header.
CODE

HTTP 200 OK
...
Content-Length: 251121
...


But I don't know how to get the NET file's bitrate before the whole NET file is donwloaded as Winamp does.
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.