Skip to content
New issue

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

Unable to parse mp4 metadata #2338

Closed
2 tasks done
jcalfee opened this issue Jan 23, 2025 · 1 comment · Fixed by #2340
Closed
2 tasks done

Unable to parse mp4 metadata #2338

jcalfee opened this issue Jan 23, 2025 · 1 comment · Fixed by #2340
Labels
bug Bug, will addressed with high priority

Comments

@jcalfee
Copy link

jcalfee commented Jan 23, 2025

Is there an existing issue for this?

  • I have searched the existing issues

music-metadata version

10.7.0

Current Behavior

Something about this file causes an error: https://nickdesaulniers.github.io/netfix/demo/frag_bunny.mp4

node v20

 ERROR  Offset is outside the bounds of the DataView                                                                                                                                                                    8:14:44 AM

    at DataView.getInt16 (<anonymous>)
    at Object.get (node_modules/.pnpm/[email protected]/node_modules/token-types/lib/index.js:122:26)
    at Object.get (node_modules/.pnpm/[email protected]/node_modules/music-metadata/lib/mp4/AtomToken.js:263:37)
    at MP4Parser.parseSoundSampleDescription (node_modules/.pnpm/[email protected]/node_modules/music-metadata/lib/mp4/MP4Parser.js:445:65)
    at node_modules/.pnpm/[email protected]/node_modules/music-metadata/lib/mp4/MP4Parser.js:171:90
    at Array.map (<anonymous>)
    at Object.stsd (node_modules/.pnpm/[email protected]/node_modules/music-metadata/lib/mp4/MP4Parser.js:171:70)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Atom.readAtom (node_modules/.pnpm/[email protected]/node_modules/music-metadata/lib/mp4/Atom.js:18:9)
    at async Atom.readAtoms (node_modules/.pnpm/[email protected]/node_modules/music-metadata/lib/mp4/Atom.js:36:30) 

Both local and stream parsing produce the same stack trace:

const metadata = await parseFile(file)

and

const response = await fetch(url)
const stream = Readable.fromWeb(response.body)
const metadata = await parseStream(
  stream,
  response.headers.get('content-type')
)

Expected Behavior

{
  "format": {
    "tagTypes": [
      ...
    ],
    "trackInfo": [
      {
        "codecName": "<avc1>",
        "type": 2,
        ...

Attached audio sample?

  • I have provided sufficient information to reproduce the issue
@jcalfee jcalfee added the bug Bug, will addressed with high priority label Jan 23, 2025
@Borewit
Copy link
Owner

Borewit commented Jan 24, 2025

That was a perfectly valid issue @jcalfee, thanks for raising this issue. Has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, will addressed with high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants