2017 © Pedro Pelรกez
 

library id3

The package lays the basis for the simple manipulation of ID3 tags.You can define readers and writers to manipulate the metadata in read or write.

image

pyrex-fwi/id3

The package lays the basis for the simple manipulation of ID3 tags.You can define readers and writers to manipulate the metadata in read or write.

  • Wednesday, October 5, 2016
  • by Pyrex-FWI
  • Repository
  • 1 Watchers
  • 0 Stars
  • 614 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

id3 Package

Software License Build Status, (*1)

The package lays the basis for the simple ID3 tags manipulation., (*2)

You can define readers and writers to manipulate the metadata in read or write., (*3)

Bin readers Available Mp3 read Mp3 write Mp4 read Mp4 write Flac read Flac write
Mediainfo โœ“ โœ“ no โœ“ - โœ“ no
EyeD3 โœ“ โœ“ โœ“ - - - no
Id3v2 โœ“ โœ“ โœ“ - - - no
metaflac โœ“ no โœ“ - - - โœ“

Usages

Read Id3 Tags

<?php

class MyClass
{

    public function readId3()
    {
        $mp3OrFlacFile = '/path/to/file';

        /** @var Sapar\Id3\Metadata\Id3MetadataInterface */
        $id3Metadata = new Sapar\Metadata\Id3Metadata($mp3OrFlacFile);

        /** @var Sapar\Wrapper\BinWrapper\BinWrapperInterface */
        $mediaInfoWrapper = new Sapar\Wrapper\BinWrapper\MediainfoWrapper();
        $mediaInfoWrapper->setBin('/usr/local/bin/mediainfo');

        if ($mediaInfoWrapper->read($metaDataFile)) {
            $metaDataFile->getTitle();
            $metaDataFile->getArtist();
            $metaDataFile->getAlbum();
            $metaDataFile->getGenre();
            $metaDataFile->getYear();
            $metaDataFile->getBpm();
            $metaDataFile->getTimeDuration();
        }
    }

}

Write Id3 Tags

<?php

class MyClass
{

    public function writeId3()
    {
        $mp3OrFlacFile = '/path/to/file';

        /** @var Sapar\Id3\Metadata\Id3MetadataInterface */
        $id3Metadata = new Sapar\Metadata\Id3Metadata($mp3OrFlacFile);
        $id3Metadata->setAlbum('album');
        $id3Metadata->setTitle('title');
        $id3Metadata->setGenre('genre');
        $id3Metadata->setYear(2016);
        $id3Metadata->setComment('comment');
        $id3Metadata->setBpm(120);

        /** @var Sapar\Wrapper\BinWrapper\BinWrapperInterface */
        $id3v2wrapper = new Sapar\Wrapper\BinWrapper\Id3v2Wrapper();
        $id3v2wrapper->setBin('/usr/local/bin/id3v2');

        if ($mediaInfoReader->write($metaDataFile)) {
            //it's done!
        }
    }

Create custom Wrapper

<?php

class MyClass
{

}

Tests

Make sure you have mediainfo available at location /usr/bin/mediainfo., (*4)

Make sure you have eyeD3 available at location /usr/local/bin/eyeD3, (*5)

Bench: phpunit --group eyed3-read --repeat 100 phpunit --group mediainfo-read --repeat 100, (*6)

The Versions

05/10 2016

dev-master

9999999-dev

The package lays the basis for the simple manipulation of ID3 tags.You can define readers and writers to manipulate the metadata in read or write.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christophe Pyree

18/07 2016

v1.0.0

1.0.0.0

The package lays the basis for the simple manipulation of ID3 tags.You can define readers and writers to manipulate the metadata in read or write.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christophe Pyree

23/01 2016

v0.2.0

0.2.0.0

The package lays the basis for the simple manipulation of ID3 tags.You can define readers and writers to manipulate the metadata in read or write.

  Sources   Download

MIT

The Development Requires

by Christophe Pyree

22/01 2016

0.1.2

0.1.2.0

The package lays the basis for the simple manipulation of ID3 tags.You can define readers and writers to manipulate the metadata in read or write.

  Sources   Download

MIT

The Development Requires

by Christophe Pyree

21/01 2016

0.1.1

0.1.1.0

The package lays the basis for the simple manipulation of ID3 tags.You can define readers and writers to manipulate the metadata in read or write.

  Sources   Download

MIT

The Development Requires

by Christophe Pyree

21/01 2016

0.1.0

0.1.0.0

description_text

  Sources   Download

MIT

The Development Requires

by Christophe Pyree

09/01 2016

0.0.3

0.0.3.0

description_text

  Sources   Download

MIT

The Development Requires

by Christophe Pyree

09/01 2016

0.0.2

0.0.2.0

description_text

  Sources   Download

MIT

The Development Requires

by Christophe Pyree

19/12 2015

0.0.1

0.0.1.0

description_text

  Sources   Download

MIT

The Requires

 

by Christophe Pyree