Integrating With ExpressJS/MQ
ii64 opened this issue · 6 comments
Is there had chance to do this fingerprinting with ExpressJS or MQ so its run as standalone instead of executing cat music.mp3 | node src.js
? Just wonder how since this works only with stdin pipe
Oh! also, any chance to get more fingerprint (way more accurate)? Is this just play with the overlap?
Of course it's possible, just use the library codegen_landmark.js
in your project without the demo code that uses stdin.
To get more fingerprints, tune the parameters in codegen_landmark.js
. Comments are there to guide you.
I do not understand your question about the overlap.
Uh but in this case i need to identify the stdout of fingerprinter since it doesn't mention the computed source after fingerprinted.
Lets say i have
decoder.stdout.pipe(fingerprinter); // decoded -> fingerprinter stdin
fingerprinter.on('data', function(d){
for(var i=0;i<d.tcodes.length;i++){
/*
Here is just pass the hash and has no idea which audio is computed
because at the first time it just pass the raw audio and no meta data
*/
}
});
fingerprinter.on('end',()=>{ /* send ready signal here */ });
Is that possible to identify which one is already processed ?
Okay i found a way (not sure this one is the best)
So when the MQ client receives the request (in base64) it'll pass the base64 of raw audio to b64 decoder then the base64 decoder stout to ffmpeg stdin, ffmpeg stdout to fingerprinter stdin, and the data event do the db insert or matching process
Anyone had more nice way to pass the raw audio
? The stdin.write give EOF error because the raw audio character had EOF (idk why that base64 stdout can pass to ffmpeg stdin)
Is that possible to identify which one is already processed ?
You have data.tcodes[i]
in the results to know at which time index you are.
Anything wrong with transport issue or my pipe?
So when the MQ client receives the request (in base64)
Please submit such requests on Stack Overflow.
Closing this now.
It's solved, thank you. I used wrong encoding