A server where you can send audio files, and you get back chromaprints.
Useful if you have a lot of audio to fingerprint and you want to split up the tasks over many servers
ffmpeg and libchromaprint
On debain you would run:
apt-get install ffmpeg libchromaprint0 libchromaprint-dev
( -dev is only needed if you are building )
ben@metropolis:/tmp$ curl -sv --data-binary @test.mp3 -H 'Content-Type: audio/mp3' 'localhost:6464/chromaprint?png=y' -o png.png
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 6464 (#0)
> POST /chromaprint?png=y HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:6464
> Accept: */*
> Content-Type: audio/mp3
> Content-Length: 1544192
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
} [data not shown]
< HTTP/1.1 200 OK
< Content-Type: image/png
< Date: Wed, 04 Jan 2017 21:30:04 GMT
< Content-Length: 1751
<
{ [data not shown]
* Connection #0 to host localhost left intact
Returns a PNG like so:
ben@metropolis:/tmp$ curl --data-binary @test.mp3 -H 'Content-Type: audio/mp3' 'localhost:6464/chromaprint'
AQAB8moUKYuSaMGlHGV-pOqPXoJ-XMd1HNof-Jj8I09ExErEoySxjzr848mJScdx5UQXwj4ehR98aOyPo46PrTt-iMdDB1aPOsel7Hh2NCe0Ey86
6lAl6UKZE33GHelR_3gyPNExZeTQs0BPcKmELVIW5Ghf6GMq_MhjPDVRO2iO39iRZwejG38DUXRE6FF4-EGPR0P4wx2PfMcOUWFhRtHRH3mUozzC
nMah3YU15UIfaDz-wye-wFWPF9bRQyfqHTLTY_fxw7KQ58end_B1hOonnCO0rCz6B_0VNCehHuVh0cN3fNByPBp6uNWF59CRKnjGo9mOXajUo1lu
jCei59DS8eh34fhROcGVHMelHd_RaDouHXdxKM-Fz0fDW6gkhKuOJg6PMjmRbsnA-Al41IedHJUSzUaXUwncd-hTXLvwHY8gjseFZ0QPkcdlPLi4
Dx6D_sIJTUWzHA93VDrE4zme5fCPL2h-HOV8GG0UGjWaF18SolFlhO_BTESYx1CoEkeYRiwmmTx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GaIAAAEAgBYswRwBijAHMCAIWAsAgoA6xhSAUCiGdOCUIEAFQA4QEyQAknDFPEEOIUIwAIgAABChmglABEAAEJMIIg
xgBwBACGgAMWEIIQcEoAAZQRQlBAiGNKIEEUUUgYwCxlgghgiGNFDIUoIMpQJCgAVQkAKFFCGICYEtwZAQI
If you already have data in the raw format ( signed 16 bit little ed ints, mono, 44100Hz ) you can skip the ffmpeg decoder:
ben@metropolis:/tmp$ curl --data-binary @test.raw 'localhost:6464/chromaprint?raw=y'