PHPackages                             debach/zend-mp3 - 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. debach/zend-mp3

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

debach/zend-mp3
===============

The best PHP library for Object-Oriented media file information reading and writing.

1.8.1(10y ago)538.7k↓43.5%91BSD-3-ClausePHP

Since Jan 4Pushed 7y ago4 watchersCompare

[ Source](https://github.com/debach/zend-mp3)[ Packagist](https://packagist.org/packages/debach/zend-mp3)[ Docs](https://code.google.com/p/php-reader/)[ RSS](/packages/debach-zend-mp3/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (1)

PHP Reader (Zend Mp3)
=====================

[](#php-reader-zend-mp3)

The PHP Reader is a library written in PHP to read and write media files and their information headers in an object-oriented manner. Currently supported formats are ASF (Windows Media Player files, i.e. WMA, WMV, etc), ID3, including both ID3v1 and ID3v2 (MPEG files, i.e. MP3), MPEG Audio Bit Stream (i.e. ABS, MP1, MP2, MP3), MPEG Program Stream (MPEG movies, and DVD and HD DVD video discs, i.e. MPG, MPEG, VOB, EVO), and ISO Base Media File Format (eg QuickTime, MPEG-4 and iTunes AAC files, i.e. QT, MOV, MP4, M4A, M4B, M4P, M4V, etc).

The library was written by Sven Vollbehr and is hosted originally at [Google Code](https://code.google.com/p/php-reader/). This Github fork just adds support for the PSR-0 autoloading standard for Composer.

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

[](#installation)

Install PHP Reader with [composer](https://getcomposer.org) via

```
composer require debach/zend-mp3:dev-master
composer install

```

How to use PHP Reader
---------------------

[](#how-to-use-php-reader)

PHP reader has a [nice documentation](https://code.google.com/p/php-reader/) both on its website and in the code. What follows are a couple of examples to give you a quick start. PHP reader can do a lot more than what is covered here.

### Reading the duration of an MP3 file

[](#reading-the-duration-of-an-mp3-file)

To retrieve the *estimated* duration in seconds from an MP3 file, proceed as follows:

```
$abs    = new Zend_Media_Mpeg_Abs('file.mp3');
$length = $abs->getLengthEstimate();

```

You can get the *exact* duration with `$abs->getLength()`, but it requires to read *every frame* of the MP3 file. Usually, the estimated duration is already very accurate and much faster.

### Reading ID3 tags

[](#reading-id3-tags)

Use the `Zend_Media_Id3v2` class to read or write ID3 information ([official documentation](https://code.google.com/p/php-reader/wiki/ID3v2)):

```
$id3   = new Zend_Media_Id3v2('file.mp3');

$frame = $id3->getFramesByIdentifier('TIT2'); // for song title; or TALB for album title; ..
$title = $frame[0]->getText();

$frame = $id3->getFramesByIdentifier('TALB');
$album = $frame[0]->getText();

```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Unknown

Total

1

Last Release

3787d ago

### Community

Maintainers

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

---

Top Contributors

[![debach](https://avatars.githubusercontent.com/u/454897?v=4)](https://github.com/debach "debach (7 commits)")

### Embed Badge

![Health badge](/badges/debach-zend-mp3/health.svg)

```
[![Health](https://phpackages.com/badges/debach-zend-mp3/health.svg)](https://phpackages.com/packages/debach-zend-mp3)
```

PHPackages © 2026

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