PHPackages                             wikimedia/getid3 - 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. [Image &amp; Media](/categories/media)
4. /
5. wikimedia/getid3

ActiveLibrary[Image &amp; Media](/categories/media)

wikimedia/getid3
================

PHP script that extracts useful information from popular multimedia file formats

v1.9.22.2(2y ago)024[1 PRs](https://github.com/wikimedia/getID3/pulls)GPL-1.0-or-laterPHPPHP &gt;=5.3.0

Since May 12Pushed 3mo agoCompare

[ Source](https://github.com/wikimedia/getID3)[ Packagist](https://packagist.org/packages/wikimedia/getid3)[ Docs](https://www.getid3.org/)[ RSS](/packages/wikimedia-getid3/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (33)Used By (0)

getID3() by James Heinrich ()
==============================================

[](#getid3-by-james-heinrich-infogetid3org)

**Available at  or **

getID3() is released under multiple licenses. You may choose from the following licenses, and use getID3 according to the terms of the license most suitable to your project.

**GNU GPL:**

- [v3](https://gnu.org/licenses/gpl.html)
- [v2](https://gnu.org/licenses/old-licenses/gpl-2.0.html)
- [v1](https://gnu.org/licenses/old-licenses/gpl-1.0.html)

**GNU LGPL:**

- [v3](https://gnu.org/licenses/lgpl.html)

**Mozilla MPL:**

- [v2](https://www.mozilla.org/MPL/2.0/)

**getID3 Commercial License:**

- [gCL](https://www.getid3.org/#gCL) (no longer available, existing licenses remain valid)

---

Copies of each of the above licenses are included in the `licenses/`directory of the getID3 distribution.

If you want to donate, there is a link on  for PayPal donations.

Quick Start
===========

[](#quick-start)

**Q:** How can I check that getID3() works on my server/files?

**A:** Unzip getID3() to a directory, then access `/demos/demo.browse.php`

Support
=======

[](#support)

**Q:** I have a question, or I found a bug. What do I do?

**A:** The preferred method of support requests and/or bug reports is the forum at

Sourceforge Notification
========================

[](#sourceforge-notification)

It's highly recommended that you sign up for notification from Sourceforge for when new versions are released. Please visit: [http://sourceforge.net/project/showfiles.php?group\_id=55859](http://sourceforge.net/project/showfiles.php?group_id=55859)and click the little "monitor package" icon/link. If you're previously signed up for the mailing list, be aware that it has been discontinued, only the automated Sourceforge notification will be used from now on.

What does getID3() do?
======================

[](#what-does-getid3-do)

Reads &amp; parses (to varying degrees):

- tags:

    - APE (v1 and v2)
    - ID3v1 (&amp; ID3v1.1)
    - ID3v2 (v2.4, v2.3, v2.2)
    - Lyrics3 (v1 &amp; v2)
- audio-lossy:

    - MP3/MP2/MP1
    - MPC / Musepack
    - Ogg (Vorbis, OggFLAC, Speex, Opus)
    - AAC / MP4
    - AC3
    - DTS
    - RealAudio
    - Speex
    - DSS
    - VQF
- audio-lossless:

    - AIFF
    - AU
    - Bonk
    - CD-audio (\*.cda)
    - FLAC
    - LA (Lossless Audio)
    - LiteWave
    - LPAC
    - MIDI
    - Monkey's Audio
    - OptimFROG
    - RKAU
    - Shorten
    - Tom's lossless Audio Kompressor (TAK)
    - TTA
    - VOC
    - WAV (RIFF)
    - WavPack
- audio-video:

    - ASF: ASF, Windows Media Audio (WMA), Windows Media Video (WMV)
    - AVI (RIFF)
    - Flash
    - Matroska (MKV)
    - MPEG-1 / MPEG-2
    - NSV (Nullsoft Streaming Video)
    - Quicktime (including MP4)
    - RealVideo
- still image:

    - BMP
    - GIF
    - JPEG
    - PNG
    - TIFF
    - SWF (Flash)
    - PhotoCD
- data:

    - ISO-9660 CD-ROM image (directory structure)
    - SZIP (limited support)
    - ZIP (directory structure)
    - TAR
    - CUE
- Writes:

    - ID3v1 (&amp; ID3v1.1)
    - ID3v2 (v2.3 &amp; v2.4)
    - VorbisComment on OggVorbis
    - VorbisComment on FLAC (not OggFLAC)
    - APE v2
    - Lyrics3 (delete only)

Requirements
============

[](#requirements)

- PHP 4.2.0 up to 5.2.x for getID3() 1.7.x (and earlier)
- PHP 5.0.5 (or higher) for getID3() 1.8.x (and up)
- PHP 5.0.5 (or higher) for getID3() 2.0.x (and up)
- at least 4MB memory for PHP. 8MB or more is highly recommended. 12MB is required with all modules loaded.

Installation
============

[](#installation)

The preferred method is via [composer](https://getcomposer.org/). Follow the installation [instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have composer installed.

Once composer is installed, execute the following command in your project root to install this library:

```
composer require james-heinrich/getid3

```

Usage
=====

[](#usage)

See /demos/demo.basic.php for a very basic use of getID3() with no fancy output, just scanning one file.

See structure.txt for the returned data structure.

**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

To analyze remote files over HTTP or FTP you need to copy the file locally first before running getID3(). Your code would look something like this:

```
