Support calculating approximate durationSee original GitHub issue
duration: true option makes all media files be fully scanned to calculate their accurate duration, but when a large number of files should be handled, it is enough to get approximate duration of songs; most clients to play them do not trust what the server gives anyway.
How about adding an option like
approximate: true to
duration: true for approximate duration? As I recall, an old version of
musicmetadata did that by assuming CBR when the first three frames have the same bit-rate; I ported that to
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
That could very well be the reason.
On a good quality (using a recent Lame encoder) MP3 encoded file, it will do the duration calculation on the VBR/Xing/Info header. That header specifies the number of frames.
I just removed a silly rounding from that calculation. It is pretty accurate only thing what is missing is subtracting the “empty” space in the very last frame.