sempia / getid3
Stable, namespaced and PSR-4 compliant version of the library getID3, that extracts and writes useful information to/from popular multimedia file formats.
Requires
- php: >=5.4.0
Requires (Dev)
- php-parallel-lint/php-parallel-lint: ^1.0
- phpunit/phpunit: ^4.8 || ^5.0 || ^6.1 || ^7.5 || ^8.5 || ^9.6 || ^10.5
Suggests
- ext-SimpleXML: SimpleXML extension is required to analyze RIFF/WAV/BWF audio files (also requires `ext-libxml`).
- ext-com_dotnet: COM extension is required when loading files larger than 2GB on Windows.
- ext-ctype: ctype extension is required when loading files larger than 2GB on 32-bit PHP (also on 64-bit PHP on Windows) or executing `getid3_lib::CopyTagsToComments`.
- ext-dba: DBA extension is required to use the DBA database as a cache storage.
- ext-exif: EXIF extension is required for graphic modules.
- ext-iconv: iconv extension is required to work with different character sets (when `ext-mbstring` is not available).
- ext-json: JSON extension is required to analyze Apple Quicktime videos.
- ext-libxml: libxml extension is required to analyze RIFF/WAV/BWF audio files.
- ext-mbstring: mbstring extension is required to work with different character sets.
- ext-mysql: MySQL extension is required to use the MySQL database as a cache storage (deprecated in PHP 5.5, removed in PHP >= 7.0, use `ext-mysqli` instead).
- ext-mysqli: MySQLi extension is required to use the MySQL database as a cache storage.
- ext-rar: RAR extension is required for RAR archive module.
- ext-sqlite3: SQLite3 extension is required to use the SQLite3 database as a cache storage.
- ext-xml: XML extension is required for graphic modules to analyze the XML metadata.
- ext-zlib: Zlib extension is required for archive modules and compressed metadata.
Replaces
- james-heinrich/getid3: 2.0.0.0-p1.9.25
This package is auto-updated.
Last update: 2026-07-25 07:27:12 UTC
README
The aim of this fork is to maintain a stable, namespaced and PSR-4 compliant version of the library getID3 via periodic merges of the master branch (1.9) into the v2.0 branch, whose status is dev/beta since May 2019.
To use it, just use a standard require command, without need to change minimum stability:
$ composer require "sempia/getid3"
The namespace of the library is kept (JamesHeinrich\GetID3\), so you don't
need to change anything in the code. This package replaces james-heinrich/getid3
at the same version numbers, so it is a drop-in substitute for the upstream 2.0
betas. It is not compatible with the 1.9 api (global classes getID3 and getid3_lib).
The version numbering follows the upstream 2.0 branch: 2.0.x, where each release integrates the fixes merged from the upstream 1.9 branch.
Below is the official readme
getID3
A PHP library to extract and write useful information to/from popular multimedia file formats.
If you want to donate, there is a link on https://www.getid3.org for PayPal donations.
Installation
Using composer:
$ composer require "james-heinrich/getid3:^2.0-dev"
How can I check that getID3() works on my server/files?:
Unzip getID3() to a directory, then access /demos/demo.browse.php
Usage
See /demos/demo.basic.php for a very basic use of getID3() with no fancy output, just scanning one file.
For an example of a complete directory-browsing, file-scanning implementation of getID3(), please run /demos/demo.browse.php
See /demos/demo.mysql.php for a sample recursive scanning code that scans every file in a given directory, and all sub-directories, stores the results in a database and allows various analysis / maintenance operations.
See /demos/demo.write.php for how to write tags.