How to get the real, actual duration of an MP3 file (VBR or CBR) server-side
- by Cummander Checkov
I used to calculate the duration of MP3 files server-side using ffmpeg - which seemed to work fine. Today i discovered that some of the calculations were wrong. Somehow, for some reason, ffmpeg will miscalculate the duration and it seems to happen with variable bit rate mp3 files only.
When testing this locally, i noticed that ffmpeg printed two…