PHPackages                             gravitymedia/metadata - 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. gravitymedia/metadata

AbandonedArchivedLibrary

gravitymedia/metadata
=====================

Metadata library for PHP

v0.1.0(11y ago)354[1 issues](https://github.com/GravityMedia/Metadata/issues)MITPHPPHP &gt;=5.4

Since Feb 20Pushed 9y ago2 watchersCompare

[ Source](https://github.com/GravityMedia/Metadata)[ Packagist](https://packagist.org/packages/gravitymedia/metadata)[ RSS](/packages/gravitymedia-metadata/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (3)Used By (0)

\#Metadata

Metadata library for PHP

[![Packagist](https://camo.githubusercontent.com/83e67b7390ba4094a0843f715fa27687b04626ddf0c9ba83d8c7068013f73487/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f677261766974796d656469612f6d657461646174612e737667)](https://packagist.org/packages/gravitymedia/metadata)[![Downloads](https://camo.githubusercontent.com/7f52b3ff28808b461f9e55570214b106f4975db31ac4b0be23d984ce0da1314d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f677261766974796d656469612f6d657461646174612e737667)](https://packagist.org/packages/gravitymedia/metadata)[![License](https://camo.githubusercontent.com/81481f4ea09899224603c0a838921edc9bf03af780fe4cf91dfa3b970fbb15f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f677261766974796d656469612f6d657461646174612e737667)](https://packagist.org/packages/gravitymedia/metadata)[![Build](https://camo.githubusercontent.com/0b9ff8e21461bfdb1a057d63aedfdff63d9d8168f08e10f6d5e6386ac53c6ffa/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f477261766974794d656469612f4d657461646174612e737667)](https://travis-ci.org/GravityMedia/Metadata)[![Code Quality](https://camo.githubusercontent.com/2ff6658a9a3033e179b7c4f87bdc6a1a18b6948394f4b80ff6dd9349c641377d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f477261766974794d656469612f4d657461646174612e737667)](https://scrutinizer-ci.com/g/GravityMedia/Metadata/?branch=master)[![Coverage](https://camo.githubusercontent.com/d01dca2971a4be8b59df095a2e5884f175abdca5b33d64bcafc3f4190574794b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f477261766974794d656469612f4d657461646174612e737667)](https://scrutinizer-ci.com/g/GravityMedia/Metadata/?branch=master)[![PHP Dependencies](https://camo.githubusercontent.com/2a0a267fe53b01ad20460affd10121c88845b95c8ee25ad530dadb3640cfcae9/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3534613663333964323762303134303035343030303034622f62616467652e737667)](https://www.versioneye.com/user/projects/54a6c39d27b014005400004b)

\##Requirements##

This library has the following requirements:

- PHP 5.4+

\##Installation##

Install composer in your project:

```
$ curl -s https://getcomposer.org/installer | php
```

Create a `composer.json` file in your project root:

```
{
    "require": {
        "gravitymedia/metadata": "dev-master"
    }
}
```

Install via composer:

```
$ php composer.phar install
```

\##Usage##

Currently reading and writing of ID3 (v1 and v2) metadata is supported. The support for more metadata formats will be available soon.

\###CLI###

This library contains a useful CLI script. You may export and import the metadata to/from YAML files. More export/import formats will be available soon.

\###ID3 v1###

```
require 'vendor/autoload.php';

use GravityMedia\Metadata\SplFileInfo;

// create new metadata aware file info object
$file = new SplFileInfo('/path/to/input/file.mp3');

// get ID3 v1 metadata
$metadata = $file->getMetadata();
$tag = $metadata->getId3v1Tag();

// dump tag info
var_dump($tag);

// update ID3 v1 metadata
$tag
    ->setTitle('New title')
    ->setArtist('An other artist')
    ->setAlbum('The album title')
    ->setYear(2014)
    ->setComment('This tag was written by metadata library')
    ->setTrack(1)
    ->save();

// dump updated tag info
var_dump($metadata->getId3v1Tag());

// remove ID3 v1 metadata
$tag->remove();
```

\###ID3 v2###

```
require 'vendor/autoload.php';

use GravityMedia\Metadata\SplFileInfo;

// create new metadata aware file info object
$file = new SplFileInfo('/path/to/input/file.mp3');

// get ID3 v2 metadata
$metadata = $file->getMetadata();
$tag = $metadata->getId3v2Tag();

// dump tag info
var_dump($tag);

// update ID3 v2 metadata
$tag
    ->setTitle('New title')
    ->setArtist('An other artist')
    ->setAlbum('The album title')
    ->setYear(2014)
    ->setComment('This tag was written by metadata library')
    ->setTrack(1)
    ->save();

// dump updated tag info
var_dump($metadata->getId3v2Tag());

// remove ID3 v2 metadata
$tag->remove();
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

4103d ago

### Community

Maintainers

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gravitymedia-metadata/health.svg)

```
[![Health](https://phpackages.com/badges/gravitymedia-metadata/health.svg)](https://phpackages.com/packages/gravitymedia-metadata)
```

###  Alternatives

[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

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