parshap / node-fpcalc

Calculate AcoustID audio fingerprint
69 stars 13 forks source link

fpcalc returning { } #1

Closed caioketo closed 10 years ago

caioketo commented 10 years ago

I tried with several files, and all returned empty object, and null err. Don't know what I'm doing wrong here.

fpcalc(file, function(err, result) { console.log(err); console.log(result); });

parshap commented 10 years ago

This is probably the cause of parshap/node-acoustid#1.

What are the files you've tried? Can you share one? Do they play in a player?

What happens if you run npm test in the node_modules/fpcalc project directory?

What happens if you use the fpcalc command-line tool on the file directly?

parshap commented 10 years ago

And what versions of node and fpcalc do you have installed?

caioketo commented 10 years ago

That file is a mp3 file that I get from mp4 file (ffmpeg) from a video from youtube (music video) if you want, i can pass you one. When I run npm test it says: "> fpcalc@1.0.5 test /home/pi/node_modules/fpcalc

node test/test.js

module.js:340 throw err; ^ Error: Cannot find module 'tape' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/pi/node_modules/fpcalc/test/test.js:5:9) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) npm ERR! weird error 8 npm ERR! not ok code 0"

When I try fpcalc command-line it says: " [mp3 @ 0xd091a0] Header missing ERROR: couldn't find stream information in the file ERROR: unable to calculate fingerprint for file stone.mp3, skipping"

parshap commented 10 years ago

When I run npm test it says:

Run npm install first.

When I try fpcalc command-line it says:

It looks like something is wrong with the input file. This node fpcalc module just wraps the fpcalc command line tool, so if the tool failed to calculate the fingerprint something is wrong with either the input or the tool. I have not had any issues calculating fingerprints on a very large collection of audio files.

That said, you should still be getting an error object in the callback. I just pushed a new version of the module (1.0.6) with a few more sanity checks, can you update and try again?

caioketo commented 10 years ago

The problem is in the file, mp3, got missing headers.