PHPackages                             mrfeathers/php-fpcalc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mrfeathers/php-fpcalc

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mrfeathers/php-fpcalc
=====================

PHP wrapper for command-line fingerprint generator - fpcalc

1.0.1(8y ago)83.8k7[2 issues](https://github.com/mrfeathers/php-fpcalc/issues)MITPHPPHP &gt;=7.1

Since Jan 28Pushed 8y ago2 watchersCompare

[ Source](https://github.com/mrfeathers/php-fpcalc)[ Packagist](https://packagist.org/packages/mrfeathers/php-fpcalc)[ RSS](/packages/mrfeathers-php-fpcalc/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

PHP-fpcalc
==========

[](#php-fpcalc)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/b35ddcbdbab00f9bb451b2ca35b2bcdb2d3536c8c0da65dce1c4f4c0457ab688/68747470733a2f2f7472617669732d63692e6f72672f6d7266656174686572732f7068702d667063616c632e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mrfeathers/php-fpcalc)

This package is a wrapper for the [fpcalc command-line tool](https://acoustid.org/chromaprint).

Installation
------------

[](#installation)

First you need to get installed `fpcalc` on your system.

**OS X**

```
brew install chromaprint
```

**Ubuntu**

```
apt-get install libchromaprint-tools
```

**Arch Linux**

```
pacman -Sy chromaprint
```

Or you can get the latest version from [AcoustId site](https://acoustid.org/chromaprint)

Than you just need to require this package via [Composer](https://getcomposer.org/)

```
$ composer require mrfeathers/php-fpcalc
```

Usage
-----

[](#usage)

Usage is pretty simple. First you create a `FpcalcProcess` using factory class.

```
$factory = new FpcalcFactory();
$fpcalcProcess = $factory->create();
```

Than just call `generateFingerPrint` with array of file paths (or web stream uri - [more info](https://oxygene.sk/2016/12/chromaprint-1-4-released/))

```
$result = $fpcalcProcess->generateFingerPrint(['myfile.mp3']);

//or you can generate fingerprints for more than one file
$result = $fpcalcProcess->generateFingerPrint(['myfile.mp3', 'mysecondfile.mp3']);

//using online stream radio
$result = $fpcalcProcess->generateFingerPrint(['http://icecast2.play.cz/radio1.mp3']);
```

As a result you'll get output string with generated fingerprint or fingerprints.

You're able to set some options:

- `format` - input format name
- `algorithm` - algorithm method (default 2). Available since fpcalc version 1.4.3
- `rate` - sample rate of the input
- `channels` - number of channels in the input audio
- `length` - restricts the duration of the processed input audio (default 120, in seconds)
- `chunk` - splits the input audio into chunks of given duration (in seconds)
- `overlap` - overlap the chunks slightly to make sure audio on the edge id fingeprinted
- `ts` - output UNIX timestamps for chunked results, useful when fingerprinting real-time audio stream
- `raw` - output fingerprints in the uncompressed format
- `outputFormat` - format of result output. Available: json, text, plain

> Sometimes fingerprint generation can be a long process, sou you can set the process timeout using `setTimeout` method (default is 60 seconds).

**Feel free to [open an issue](https://github.com/mrfeathers/php-fpcalc/issues/new) in case of bugs or improvement requests!**

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3032d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bb267a69bf86562da9b3c347e61a4480284b8b9cc6adf402dd19a9fff48c4f77?d=identicon)[MrFeathers](/maintainers/MrFeathers)

---

Top Contributors

[![mrfeathers](https://avatars.githubusercontent.com/u/1404970?v=4)](https://github.com/mrfeathers "mrfeathers (12 commits)")

---

Tags

acoustidaudio-fingerprintingchromaprintfingerprintfpcalcphplibrarymusicFingerprintacoustidchromaprintfpcalc

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mrfeathers-php-fpcalc/health.svg)

```
[![Health](https://phpackages.com/badges/mrfeathers-php-fpcalc/health.svg)](https://phpackages.com/packages/mrfeathers-php-fpcalc)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
