Calculate Mp3 duration based on bitrate and file size
问题 I try to calculate mp3 duration by using bitrate and file size , after some search i found this formula: (mp3sizeInByte*0.008)/bitrate i am using mp3sizeInByte*0.008 to convert byte to Kbits. but its not so accurate , in result there is couple second different compare to actual mp3 duration. i want know this right formula ? 回答1: You can calculate the size using the following formula: x = length of song in seconds y = bitrate in kilobits per second (x * y) / 8 We divide by 8 to get the result