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

Error when parsing wav file #90

Closed
IrosTheBeggar opened this issue May 13, 2018 · 7 comments
Closed

Error when parsing wav file #90

IrosTheBeggar opened this issue May 13, 2018 · 7 comments
Assignees

Comments

@IrosTheBeggar
Copy link

Hey,

I've got a wav file that throws this error.

stdout: Error: expected file identifier 'ID3' not found
    at /Users/p/Documents/mStream/node_modules/music-metadata/lib/id3v2/ID3v2Parser.js:117:23
    at tryCatcher (/Users/p/Documents/mStream/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/p/Documents/mStream/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/p/Documents/mStream/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/p/Documents/mStream/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/p/Documents/mStream/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/Users/p/Documents/mStream/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/Users/p/Documents/mStream/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/Users/p/Documents/mStream/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)

I can send you the file if necessary.

@IrosTheBeggar
Copy link
Author

One more, from a different file

stdout: Error: FourCC contains invalid characters
    at Object.get (/Users/p/Documents/mStream/node_modules/music-metadata/lib/common/FourCC.js:14:23)
    at Object.get (/Users/p/Documents/mStream/node_modules/music-metadata/lib/riff/RiffChunk.js:13:43)
    at /Users/p/Documents/mStream/node_modules/strtok3/lib/AbstractTokenizer.js:15:26

@Borewit
Copy link
Owner

Borewit commented May 13, 2018

Hey Paul.
It is hard to cure the patient if she is not present.
Can you please provide the file?

@IrosTheBeggar
Copy link
Author

IrosTheBeggar commented May 13, 2018

First file:
got it

Second file:
got it

@Borewit
Copy link
Owner

Borewit commented May 14, 2018

The first file has a strange RIFF/EXIF tag 'GNR\u0001':

------[exif]------
{ IART: [ 'Shooting party' ],
  'GNR\u0001': [ '' ],
  INAM: [ 'Show me the way to your heart' ],
  ICRD: [ '1990' ] }

The '\u0001' is considered to be illegal (for good or bad reasons), causing the exception

The second file has an ID3 chunk defined, which is normally used for ID3v2 header. The header identifier is set to TAG instead usual ID3. I suspect one managed to squeeze an ID3v1 header in. ID3v1 header are typically the last 128 bytes of an audio file, I have never seen them in the middle of a file.

@Borewit Borewit self-assigned this May 14, 2018
@IrosTheBeggar
Copy link
Author

Thanks for looking into this!

@Borewit
Copy link
Owner

Borewit commented May 14, 2018

No problem Paul, I will close the issue.

@Borewit Borewit closed this as completed May 14, 2018
@Borewit
Copy link
Owner

Borewit commented May 17, 2018

Maybe useful to return an indication what is wrong: #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants