The Rabbit
5th March 2004, 18:41
Hi,
I'm writing a media player to playback AVI files. Basically it plays AVI with CBR and normal VBR MP3 with no problems. Now I encountered some files with MP3 encoded with so-called Average Bitrate. My player suffers from some sync problems on these files.
My player treats the ABR file as a CBR file, so it calculates the time stamp for each audio chunk based on consumed bytes. It results in incorrect audio time stamps here and there, so video is syncing to an incorrect time.
Is there any way to calculate the time stamp for each audio chunk correctly?
Also, is it possible to distinguish ABR file from CBR file based on information in AVI's headers?
Any help is highly appreciated.
Thanks.
I'm writing a media player to playback AVI files. Basically it plays AVI with CBR and normal VBR MP3 with no problems. Now I encountered some files with MP3 encoded with so-called Average Bitrate. My player suffers from some sync problems on these files.
My player treats the ABR file as a CBR file, so it calculates the time stamp for each audio chunk based on consumed bytes. It results in incorrect audio time stamps here and there, so video is syncing to an incorrect time.
Is there any way to calculate the time stamp for each audio chunk correctly?
Also, is it possible to distinguish ABR file from CBR file based on information in AVI's headers?
Any help is highly appreciated.
Thanks.