We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7.14.0
ECMAScript modules (ESM), music-medata ≥ version 8
Given the provided file, I never receive duration in the format output
duration
format
const fs = require('node:fs') const path = require('node:path') const mm = require('music-metadata') ;(async () => { const filePath = path.resolve(__dirname, 'test-123.mp3') const fileBuffer = fs.readFileSync(filePath) const attrs = { mimeType: 'audio/mpeg'} const options = { duration: true, skipCovers: true, skipPostHeaders: true } console.log((await mm.parseFile(filePath, attrs, options)).format) console.log((await mm.parseBuffer(fileBuffer, attrs, options)).format) })()
{ tagTypes: [], trackInfo: [], lossless: false, container: 'MPEG', codec: 'MPEG 2.5 Layer 1', sampleRate: 11025, numberOfChannels: 1, bitrate: 112000 } { tagTypes: [], trackInfo: [], lossless: false, container: 'ADTS/MPEG-4', codec: 'AAC', sampleRate: undefined, numberOfChannels: 2, bitrate: NaN }
I also note that it's odd that parseBuffer and parseFile return different outputs for the same file.
parseBuffer
parseFile
I expect metadata.format.duration to contain the duration of the audio
metadata.format.duration
test-123.zip
The text was updated successfully, but these errors were encountered:
MP3 file is corrupt, I cannot play it with foobar2000.
Sorry, something went wrong.
No branches or pull requests
Is there an existing issue for this?
music-metadata version
7.14.0
JavaScript module eco system
ECMAScript modules (ESM), music-medata ≥ version 8
Current Behavior
Given the provided file, I never receive
duration
in theformat
outputI also note that it's odd that
parseBuffer
andparseFile
return different outputs for the same file.Expected Behavior
I expect
metadata.format.duration
to contain the duration of the audioAttached audio sample?
test-123.zip
The text was updated successfully, but these errors were encountered: