This package is abandoned and no longer maintained. The author suggests using the afsardo/getid3 package instead.

3.0.1 2016-07-08 10:07 UTC


Build Status

This release of GetId3 library updates to PSR-0 CS and makes it Symfony2 installable by deps or composer mechanisms.


For license info please read Resources/doc/license.txt

For commercial license read Resources/doc/license.commercial.txt


(You can choose deps or composer install mechanisms)


Step 1: Download GetId3

Add following lines to your deps file:


Now, run the vendors script to download the library:

$ php bin/vendors install
Step 2: Configure the Autoloader

Add the GetId3 namespace to your autoloader:

// app/autoload.php

    // ...
        'GetId3_' => __DIR__.'/../vendor/phansys/getid3/GetId3',

[composer] (

Step 1: Edit composer.json

Add following lines to your composer.json "require" definitions:

"phansys/getid3": "master"
Step 2: Run composer

Now, run the composer script to download the library:

$ php composer.phar install

Quick use example reading audio properties

namespace My\Project;

use \GetId3_GetId3 as GetId3;

class MyClass
    // ...
    private function MyMethod()
        $getId3 = new GetId3();
        $getId3->option_md5_data        = true;
        $getId3->option_md5_data_source = true;
        $getId3->encoding               = 'UTF-8';		
        $mp3File = '/path/to/my/mp3file.mp3';	
        $audio = $getId3->analyze($mp3File);	
        if (isset($audio['error'])) 
            throw new \RuntimeException('Error at reading audio properties with GetId3 : ' . $mp3File);
        $this->setLength(isset($audio['playtime_seconds']) ? $audio['playtime_seconds'] : '');
        // var_dump($audio);