question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FourCC contains invalid characters: 00 00 00 00

See original GitHub issue

Bug description On some iTunes purchased movies (m4v), I get FourCC contains invalid characters: 00 00 00 00

I can patch/fix this by return " "; (4x spaces) instead throwing an Error in https://github.com/Borewit/music-metadata/blob/e0725b95494e9107f8498e9642f85fff3f84a501/lib/common/FourCC.ts#L16

But how to fix this really, I don’t know

Expected behavior I dont’ know, whether it’s possible to parse drm protected tracks, but I think at least the tags and the duration should work.

Audio file demonstrating the problem Not possible due copyright

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Borewitcommented, Feb 18, 2020

Fixed in v6.3.4

0reactions
Borewitcommented, Feb 19, 2020

I still get the same error with v6.3.4

UnhandledPromiseRejectionWarning: Error: FourCC contains invalid characters: 00 00 00 00
    at Object.get (node_modules/music-metadata/lib/common/FourCC.js:14:19)
    at SampleDescriptionTable.get (node_modules/music-metadata/lib/mp4/AtomToken.js:220:46)
    at StsdAtom.get (node_modules/music-metadata/lib/mp4/AtomToken.js:241:57)
    at FileTokenizer.readToken (node_modules/strtok3/lib/AbstractTokenizer.js:27:22)
    at async MP4Parser.parseAtom_stsd (node_modules/music-metadata/lib/mp4/MP4Parser.js:380:22)
    at async Function.readAtom (node_modules/music-metadata/lib/mp4/Atom.js:25:9)
    at async Atom.readAtoms (node_modules/music-metadata/lib/mp4/Atom.js:36:30)
    at async Function.readAtom (node_modules/music-metadata/lib/mp4/Atom.js:25:9)
    at async Atom.readAtoms (node_modules/music-metadata/lib/mp4/Atom.js:36:30)
    at async Function.readAtom (node_modules/music-metadata/lib/mp4/Atom.js:25:9)

which corresponds with: https://github.com/Borewit/music-metadata/blob/45a0b090622afc5c21e50a2da9438cee0ce1f0e9/lib/mp4/AtomToken.ts#L495

That is in the Sample Description Atom (‘stsd’), in the dataFormat field, or misread of that field:

Important: When parsing sample descriptions in the ‘stsd’ atom, be aware of the sample description size value in order to read each table entry correctly. Some sample descriptions terminate with four zero bytes that are not otherwise indicated.

That file would be of great value @ozelot379, can you reach out in chat?

Read more comments on GitHub >

github_iconTop Results From Across the Web

a m4a file return error "FourCC contains invalid characters ...
The original issue repored by @yimity would throw the following error: Error: FourCC contains invalid characters: 00 00 00 00.
Read more >
FourCC contains invalid characters - Bountysource
Bug description. On some iTunes purchased movies (m4v), I get FourCC contains invalid characters: 00 00 00 00.
Read more >
FourCC contains invalid characters (#169) · Issues - GitLab
No tasks are currently assigned. Use tasks to break down this issue into smaller parts. Linked items. 0.
Read more >
MMS 0.0.5: Metadata parsing error and others - MediaMonkey
0 files has been read from SQL DB in 26 milliseconds Scanning of ... Music metadata parsing error: Error: FourCC contains invalid characters...
Read more >
media/libstagefright/MPEG4Extractor.cpp - Google Git
#include "include/MPEG4Extractor.h" ... for (size_t i = 0; i < 16; ++i) {. if (i == 8) {. printf(" ");. } ... static...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found