benrr101 / node-taglib-sharp

A node.js port of mono/taglib-sharp
GNU Lesser General Public License v2.1
42 stars 11 forks source link

wrong duration of `.mp3` and `.wav` #95

Closed jerry7536 closed 10 months ago

jerry7536 commented 11 months ago

samples.zip there are two audio files, the duration are all 3 seconds. but file.properties.durationMilliseconds is 6110 for .mp3 and 6000 for .wav

but in https://audio-tag-analyzer.netlify.app/ they are correctly read

benrr101 commented 11 months ago

@jerry7536 Thanks for reporting this. Based on the investigation @subframe7536 did, it looks like this is caused by Xing headers being used in certain CBR files and using the Info identifier for the header rather than Xing. @subframe7536 has a PR out that fixes the issue, I think, though I want to run a couple more tests and consider tweaking how we report the description. (ie, if a Xing or VBR header are present, the file is marked as VBR, even if the Xing header is for a CBR. Small issue, but it'd be nice to address it.)

Once those tests are sorted out, I'll get a new build out.