From 13e520da79c92afa1048fded7010e32ea190d619 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 26 Jun 2014 13:53:16 +0200 Subject: [PATCH] composer update james-heinrich/getid3 and remove old getid3 folder --- autoload.php | 2 +- composer.lock | 61 +- composer/ClassLoader.php | 221 +- composer/autoload_classmap.php | 3 + composer/autoload_real.php | 21 +- composer/installed.json | 38 + getid3/module.audio-video.mpeg.php | 296 -- james-heinrich/getid3/.gitattributes | 22 + james-heinrich/getid3/.gitignore | 167 + james-heinrich/getid3/README.md | 607 ++++ james-heinrich/getid3/changelog.txt | 2794 +++++++++++++++++ james-heinrich/getid3/composer.json | 15 + james-heinrich/getid3/dependencies.txt | 25 + .../getid3/getid3}/extension.cache.dbm.php | 5 +- .../getid3/getid3}/extension.cache.mysql.php | 51 +- .../getid3}/extension.cache.sqlite3.php | 9 +- .../getid3/getid3}/getid3.lib.php | 77 +- .../getid3/getid3}/getid3.php | 113 +- .../getid3/getid3}/module.archive.gzip.php | 11 +- .../getid3/getid3}/module.archive.rar.php | 1 + .../getid3/getid3}/module.archive.szip.php | 1 + .../getid3/getid3}/module.archive.tar.php | 11 +- .../getid3/getid3}/module.archive.zip.php | 69 +- .../getid3/getid3}/module.audio-video.asf.php | 162 +- .../getid3}/module.audio-video.bink.php | 7 +- .../getid3/getid3}/module.audio-video.flv.php | 216 +- .../getid3}/module.audio-video.matroska.php | 72 +- .../getid3/getid3/module.audio-video.mpeg.php | 606 ++++ .../getid3/getid3}/module.audio-video.nsv.php | 15 +- .../getid3}/module.audio-video.quicktime.php | 693 ++-- .../getid3}/module.audio-video.real.php | 19 +- .../getid3}/module.audio-video.riff.php | 249 +- .../getid3/getid3}/module.audio-video.swf.php | 5 +- .../getid3/getid3}/module.audio-video.ts.php | 5 +- .../getid3/getid3}/module.audio.aa.php | 19 +- .../getid3/getid3}/module.audio.aac.php | 21 +- .../getid3/getid3}/module.audio.ac3.php | 1 + .../getid3/getid3/module.audio.amr.php | 97 + .../getid3/getid3}/module.audio.au.php | 7 +- .../getid3/getid3}/module.audio.avr.php | 5 +- .../getid3/getid3}/module.audio.bonk.php | 37 +- .../getid3/getid3}/module.audio.dss.php | 44 +- .../getid3/getid3}/module.audio.dts.php | 1 + .../getid3/getid3}/module.audio.flac.php | 1 + .../getid3/getid3}/module.audio.la.php | 11 +- .../getid3/getid3}/module.audio.lpac.php | 5 +- .../getid3/getid3}/module.audio.midi.php | 15 +- .../getid3/getid3}/module.audio.mod.php | 21 +- .../getid3/getid3}/module.audio.monkey.php | 7 +- .../getid3/getid3}/module.audio.mp3.php | 75 +- .../getid3/getid3}/module.audio.mpc.php | 23 +- .../getid3/getid3}/module.audio.ogg.php | 95 +- .../getid3/getid3}/module.audio.optimfrog.php | 41 +- .../getid3/getid3}/module.audio.rkau.php | 5 +- .../getid3/getid3}/module.audio.shorten.php | 15 +- .../getid3/getid3}/module.audio.tta.php | 5 +- .../getid3/getid3}/module.audio.voc.php | 29 +- .../getid3/getid3}/module.audio.vqf.php | 17 +- .../getid3/getid3}/module.audio.wavpack.php | 25 +- .../getid3/getid3}/module.graphic.bmp.php | 15 +- .../getid3/getid3}/module.graphic.efax.php | 5 +- .../getid3/getid3}/module.graphic.gif.php | 25 +- .../getid3/getid3}/module.graphic.jpg.php | 40 +- .../getid3/getid3}/module.graphic.pcd.php | 23 +- .../getid3/getid3}/module.graphic.png.php | 11 +- .../getid3/getid3}/module.graphic.svg.php | 5 +- .../getid3/getid3}/module.graphic.tiff.php | 29 +- .../getid3/getid3}/module.misc.cue.php | 3 +- .../getid3/getid3}/module.misc.exe.php | 5 +- .../getid3/getid3}/module.misc.iso.php | 17 +- .../getid3/getid3}/module.misc.msoffice.php | 7 +- .../getid3/getid3}/module.misc.par2.php | 1 + .../getid3/getid3}/module.misc.pdf.php | 1 + .../getid3/getid3}/module.tag.apetag.php | 23 +- .../getid3/getid3}/module.tag.id3v1.php | 7 +- .../getid3/getid3}/module.tag.id3v2.php | 37 +- .../getid3/getid3}/module.tag.lyrics3.php | 44 +- .../getid3/getid3}/module.tag.xmp.php | 3 +- .../getid3/getid3}/write.apetag.php | 15 +- .../getid3/getid3}/write.id3v1.php | 1 + .../getid3/getid3}/write.id3v2.php | 14 +- .../getid3/getid3}/write.lyrics3.php | 5 +- .../getid3/getid3}/write.metaflac.php | 3 +- .../getid3/getid3}/write.php | 13 +- .../getid3/getid3}/write.real.php | 11 +- .../getid3/getid3}/write.vorbiscomment.php | 3 +- james-heinrich/getid3/license.txt | 29 + .../getid3/licenses/licence.gpl-10.txt | 251 ++ .../getid3/licenses/licence.gpl-20.txt | 39 +- .../getid3/licenses/licence.gpl-30.txt | 674 ++++ .../getid3/licenses/licence.lgpl-30.txt | 165 + .../getid3/licenses/licence.mpl-20.txt | 373 +++ .../getid3/licenses/license.commercial.txt | 27 + james-heinrich/getid3/readme.txt | 604 ++++ james-heinrich/getid3/structure.txt | 2252 +++++++++++++ 95 files changed, 10598 insertions(+), 1473 deletions(-) delete mode 100644 getid3/module.audio-video.mpeg.php create mode 100644 james-heinrich/getid3/.gitattributes create mode 100644 james-heinrich/getid3/.gitignore create mode 100644 james-heinrich/getid3/README.md create mode 100644 james-heinrich/getid3/changelog.txt create mode 100644 james-heinrich/getid3/composer.json create mode 100644 james-heinrich/getid3/dependencies.txt rename {getid3 => james-heinrich/getid3/getid3}/extension.cache.dbm.php (97%) rename {getid3 => james-heinrich/getid3/getid3}/extension.cache.mysql.php (64%) rename {getid3 => james-heinrich/getid3/getid3}/extension.cache.sqlite3.php (97%) rename {getid3 => james-heinrich/getid3/getid3}/getid3.lib.php (94%) rename {getid3 => james-heinrich/getid3/getid3}/getid3.php (95%) rename {getid3 => james-heinrich/getid3/getid3}/module.archive.gzip.php (96%) rename {getid3 => james-heinrich/getid3/getid3}/module.archive.rar.php (96%) rename {getid3 => james-heinrich/getid3/getid3}/module.archive.szip.php (98%) rename {getid3 => james-heinrich/getid3/getid3}/module.archive.tar.php (96%) rename {getid3 => james-heinrich/getid3/getid3}/module.archive.zip.php (91%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio-video.asf.php (95%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio-video.bink.php (92%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio-video.flv.php (73%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio-video.matroska.php (97%) create mode 100644 james-heinrich/getid3/getid3/module.audio-video.mpeg.php rename {getid3 => james-heinrich/getid3/getid3}/module.audio-video.nsv.php (94%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio-video.quicktime.php (80%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio-video.real.php (97%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio-video.riff.php (92%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio-video.swf.php (95%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio-video.ts.php (97%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.aa.php (77%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.aac.php (96%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.ac3.php (99%) create mode 100644 james-heinrich/getid3/getid3/module.audio.amr.php rename {getid3 => james-heinrich/getid3/getid3}/module.audio.au.php (96%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.avr.php (98%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.bonk.php (89%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.dss.php (54%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.dts.php (99%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.flac.php (99%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.la.php (96%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.lpac.php (97%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.midi.php (96%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.mod.php (85%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.monkey.php (98%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.mp3.php (97%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.mpc.php (96%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.ogg.php (83%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.optimfrog.php (92%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.rkau.php (96%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.shorten.php (94%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.tta.php (97%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.voc.php (91%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.vqf.php (92%) rename {getid3 => james-heinrich/getid3/getid3}/module.audio.wavpack.php (95%) rename {getid3 => james-heinrich/getid3/getid3}/module.graphic.bmp.php (98%) rename {getid3 => james-heinrich/getid3/getid3}/module.graphic.efax.php (94%) rename {getid3 => james-heinrich/getid3/getid3}/module.graphic.gif.php (90%) rename {getid3 => james-heinrich/getid3/getid3}/module.graphic.jpg.php (90%) rename {getid3 => james-heinrich/getid3/getid3}/module.graphic.pcd.php (86%) rename {getid3 => james-heinrich/getid3/getid3}/module.graphic.png.php (98%) rename {getid3 => james-heinrich/getid3/getid3}/module.graphic.svg.php (96%) rename {getid3 => james-heinrich/getid3/getid3}/module.graphic.tiff.php (87%) rename {getid3 => james-heinrich/getid3/getid3}/module.misc.cue.php (98%) rename {getid3 => james-heinrich/getid3/getid3}/module.misc.exe.php (95%) rename {getid3 => james-heinrich/getid3/getid3}/module.misc.iso.php (97%) rename {getid3 => james-heinrich/getid3/getid3}/module.misc.msoffice.php (87%) rename {getid3 => james-heinrich/getid3/getid3}/module.misc.par2.php (94%) rename {getid3 => james-heinrich/getid3/getid3}/module.misc.pdf.php (94%) rename {getid3 => james-heinrich/getid3/getid3}/module.tag.apetag.php (94%) rename {getid3 => james-heinrich/getid3/getid3}/module.tag.id3v1.php (98%) rename {getid3 => james-heinrich/getid3/getid3}/module.tag.id3v2.php (98%) rename {getid3 => james-heinrich/getid3/getid3}/module.tag.lyrics3.php (87%) rename {getid3 => james-heinrich/getid3/getid3}/module.tag.xmp.php (99%) rename {getid3 => james-heinrich/getid3/getid3}/write.apetag.php (94%) rename {getid3 => james-heinrich/getid3/getid3}/write.id3v1.php (98%) rename {getid3 => james-heinrich/getid3/getid3}/write.id3v2.php (99%) rename {getid3 => james-heinrich/getid3/getid3}/write.lyrics3.php (92%) rename {getid3 => james-heinrich/getid3/getid3}/write.metaflac.php (97%) rename {getid3 => james-heinrich/getid3/getid3}/write.php (98%) rename {getid3 => james-heinrich/getid3/getid3}/write.real.php (97%) rename {getid3 => james-heinrich/getid3/getid3}/write.vorbiscomment.php (97%) create mode 100644 james-heinrich/getid3/license.txt create mode 100644 james-heinrich/getid3/licenses/licence.gpl-10.txt rename getid3/license.txt => james-heinrich/getid3/licenses/licence.gpl-20.txt (95%) create mode 100644 james-heinrich/getid3/licenses/licence.gpl-30.txt create mode 100644 james-heinrich/getid3/licenses/licence.lgpl-30.txt create mode 100644 james-heinrich/getid3/licenses/licence.mpl-20.txt create mode 100644 james-heinrich/getid3/licenses/license.commercial.txt create mode 100644 james-heinrich/getid3/readme.txt create mode 100644 james-heinrich/getid3/structure.txt diff --git a/autoload.php b/autoload.php index 29797f69..ebd381c2 100644 --- a/autoload.php +++ b/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInitb18385b43680fc8d1c27ddb96ee98f84::getLoader(); +return ComposerAutoloaderInit13b97aa84a057d92d3230cb06c2e80e4::getLoader(); diff --git a/composer.lock b/composer.lock index 85fb9599..296ea68e 100644 --- a/composer.lock +++ b/composer.lock @@ -1,9 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" ], - "hash": "f98ec4b3c8b4e10eeb08ac3402b3fe20", + "hash": "6a5a32286b2594a8eeda466dadea2e4e", "packages": [ { "name": "guzzle/common", @@ -237,6 +238,42 @@ "description": "Driver for work with MsSQL server", "time": "2014-02-12 08:38:02" }, + { + "name": "james-heinrich/getid3", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/JamesHeinrich/getID3.git", + "reference": "a99b19fdceb5c5d92648334757020445fb139b13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JamesHeinrich/getID3/zipball/a99b19fdceb5c5d92648334757020445fb139b13", + "reference": "a99b19fdceb5c5d92648334757020445fb139b13", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "getid3/getid3.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL" + ], + "description": "PHP script that extracts useful information from popular multimedia file formats", + "homepage": "http://www.getid3.org/", + "keywords": [ + "codecs", + "php", + "tags" + ], + "time": "2014-07-18 12:21:31" + }, { "name": "kriswallsmith/assetic", "version": "dev-master", @@ -319,7 +356,7 @@ "reference": "master" }, "type": "library", - "time": "2014-06-23 10:03:21" + "time": "2014-07-11 09:09:02" }, { "name": "phpmailer/phpmailer", @@ -758,22 +795,16 @@ "time": "2014-02-11 13:52:09" } ], - "packages-dev": [ - - ], - "aliases": [ - - ], + "packages-dev": [], + "aliases": [], "minimum-stability": "stable", "stability-flags": { "mcnetic/phpzipstreamer": 20, "kriswallsmith/assetic": 20, + "james-heinrich/getid3": 20, "isoft/mssql-bundle": 20 }, - "platform": [ - - ], - "platform-dev": [ - - ] + "prefer-stable": false, + "platform": [], + "platform-dev": [] } diff --git a/composer/ClassLoader.php b/composer/ClassLoader.php index 1db8d9a0..44336495 100644 --- a/composer/ClassLoader.php +++ b/composer/ClassLoader.php @@ -42,19 +42,36 @@ */ class ClassLoader { - private $prefixes = array(); - private $fallbackDirs = array(); + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + private $useIncludePath = false; private $classMap = array(); public function getPrefixes() { - return call_user_func_array('array_merge', $this->prefixes); + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; } public function getFallbackDirs() { - return $this->fallbackDirs; + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; } public function getClassMap() @@ -75,23 +92,24 @@ public function addClassMap(array $classMap) } /** - * Registers a set of classes, merging with any others previously set. + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. * - * @param string $prefix The classes prefix - * @param array|string $paths The location(s) of the classes - * @param bool $prepend Prepend the location(s) + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories */ public function add($prefix, $paths, $prepend = false) { if (!$prefix) { if ($prepend) { - $this->fallbackDirs = array_merge( + $this->fallbackDirsPsr0 = array_merge( (array) $paths, - $this->fallbackDirs + $this->fallbackDirsPsr0 ); } else { - $this->fallbackDirs = array_merge( - $this->fallbackDirs, + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, (array) $paths ); } @@ -100,38 +118,109 @@ public function add($prefix, $paths, $prepend = false) } $first = $prefix[0]; - if (!isset($this->prefixes[$first][$prefix])) { - $this->prefixes[$first][$prefix] = (array) $paths; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; return; } if ($prepend) { - $this->prefixes[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-0 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( (array) $paths, - $this->prefixes[$first][$prefix] + $this->prefixDirsPsr4[$prefix] ); } else { - $this->prefixes[$first][$prefix] = array_merge( - $this->prefixes[$first][$prefix], + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], (array) $paths ); } } /** - * Registers a set of classes, replacing any others previously set. + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. * - * @param string $prefix The classes prefix - * @param array|string $paths The location(s) of the classes + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories */ public function set($prefix, $paths) { if (!$prefix) { - $this->fallbackDirs = (array) $paths; + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } - return; + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; } - $this->prefixes[substr($prefix, 0, 1)][$prefix] = (array) $paths; } /** @@ -182,7 +271,7 @@ public function unregister() public function loadClass($class) { if ($file = $this->findFile($class)) { - include $file; + includeFile($file); return true; } @@ -202,45 +291,93 @@ public function findFile($class) $class = substr($class, 1); } + // class map lookup if (isset($this->classMap[$class])) { return $this->classMap[$class]; } + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if ($file === null && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if ($file === null) { + // Remember that this class does not exist. + return $this->classMap[$class] = false; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { + if (0 === strpos($class, $prefix)) { + foreach ($this->prefixDirsPsr4[$prefix] as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup if (false !== $pos = strrpos($class, '\\')) { // namespaced class name - $classPath = strtr(substr($class, 0, $pos), '\\', DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; - $className = substr($class, $pos + 1); + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); } else { // PEAR-like class name - $classPath = null; - $className = $class; + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; } - $classPath .= strtr($className, '_', DIRECTORY_SEPARATOR) . '.php'; - - $first = $class[0]; - if (isset($this->prefixes[$first])) { - foreach ($this->prefixes[$first] as $prefix => $dirs) { + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { if (0 === strpos($class, $prefix)) { foreach ($dirs as $dir) { - if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) { - return $dir . DIRECTORY_SEPARATOR . $classPath; + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; } } } } } - foreach ($this->fallbackDirs as $dir) { - if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) { - return $dir . DIRECTORY_SEPARATOR . $classPath; + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; } } - if ($this->useIncludePath && $file = stream_resolve_include_path($classPath)) { + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { return $file; } - - return $this->classMap[$class] = false; } } + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php index 44e52196..879964af 100644 --- a/composer/autoload_classmap.php +++ b/composer/autoload_classmap.php @@ -9,5 +9,8 @@ 'PHPMailer' => $vendorDir . '/phpmailer/phpmailer/class.phpmailer.php', 'POP3' => $vendorDir . '/phpmailer/phpmailer/class.pop3.php', 'SMTP' => $vendorDir . '/phpmailer/phpmailer/class.smtp.php', + 'getID3' => $vendorDir . '/james-heinrich/getid3/getid3/getid3.php', + 'getid3_exception' => $vendorDir . '/james-heinrich/getid3/getid3/getid3.php', + 'getid3_handler' => $vendorDir . '/james-heinrich/getid3/getid3/getid3.php', 'phpmailerException' => $vendorDir . '/phpmailer/phpmailer/class.phpmailer.php', ); diff --git a/composer/autoload_real.php b/composer/autoload_real.php index ae9bfd68..067338b3 100644 --- a/composer/autoload_real.php +++ b/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitb18385b43680fc8d1c27ddb96ee98f84 +class ComposerAutoloaderInit13b97aa84a057d92d3230cb06c2e80e4 { private static $loader; @@ -19,12 +19,9 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitb18385b43680fc8d1c27ddb96ee98f84', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit13b97aa84a057d92d3230cb06c2e80e4', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitb18385b43680fc8d1c27ddb96ee98f84', 'loadClassLoader')); - - $vendorDir = dirname(__DIR__); - $baseDir = $vendorDir; + spl_autoload_unregister(array('ComposerAutoloaderInit13b97aa84a057d92d3230cb06c2e80e4', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; array_push($includePaths, get_include_path()); @@ -35,6 +32,11 @@ public static function getLoader() $loader->set($namespace, $path); } + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { $loader->addClassMap($classMap); @@ -44,9 +46,14 @@ public static function getLoader() $includeFiles = require __DIR__ . '/autoload_files.php'; foreach ($includeFiles as $file) { - require $file; + composerRequire13b97aa84a057d92d3230cb06c2e80e4($file); } return $loader; } } + +function composerRequire13b97aa84a057d92d3230cb06c2e80e4($file) +{ + require $file; +} diff --git a/composer/installed.json b/composer/installed.json index 2ab98532..714a19ce 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -777,5 +777,43 @@ } ], "description": "Driver for work with MsSQL server" + }, + { + "name": "james-heinrich/getid3", + "version": "dev-master", + "version_normalized": "9999999-dev", + "source": { + "type": "git", + "url": "https://github.com/JamesHeinrich/getID3.git", + "reference": "a99b19fdceb5c5d92648334757020445fb139b13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JamesHeinrich/getID3/zipball/a99b19fdceb5c5d92648334757020445fb139b13", + "reference": "a99b19fdceb5c5d92648334757020445fb139b13", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2014-07-18 12:21:31", + "type": "library", + "installation-source": "source", + "autoload": { + "classmap": [ + "getid3/getid3.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL" + ], + "description": "PHP script that extracts useful information from popular multimedia file formats", + "homepage": "http://www.getid3.org/", + "keywords": [ + "codecs", + "php", + "tags" + ] } ] diff --git a/getid3/module.audio-video.mpeg.php b/getid3/module.audio-video.mpeg.php deleted file mode 100644 index 999c5d9a..00000000 --- a/getid3/module.audio-video.mpeg.php +++ /dev/null @@ -1,296 +0,0 @@ - // -// available at http://getid3.sourceforge.net // -// or http://www.getid3.org // -///////////////////////////////////////////////////////////////// -// See readme.txt for more details // -///////////////////////////////////////////////////////////////// -// // -// module.audio-video.mpeg.php // -// module for analyzing MPEG files // -// dependencies: module.audio.mp3.php // -// /// -///////////////////////////////////////////////////////////////// - -getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.mp3.php', __FILE__, true); - -define('GETID3_MPEG_VIDEO_PICTURE_START', "\x00\x00\x01\x00"); -define('GETID3_MPEG_VIDEO_USER_DATA_START', "\x00\x00\x01\xB2"); -define('GETID3_MPEG_VIDEO_SEQUENCE_HEADER', "\x00\x00\x01\xB3"); -define('GETID3_MPEG_VIDEO_SEQUENCE_ERROR', "\x00\x00\x01\xB4"); -define('GETID3_MPEG_VIDEO_EXTENSION_START', "\x00\x00\x01\xB5"); -define('GETID3_MPEG_VIDEO_SEQUENCE_END', "\x00\x00\x01\xB7"); -define('GETID3_MPEG_VIDEO_GROUP_START', "\x00\x00\x01\xB8"); -define('GETID3_MPEG_AUDIO_START', "\x00\x00\x01\xC0"); - - -class getid3_mpeg extends getid3_handler -{ - - public function Analyze() { - $info = &$this->getid3->info; - - if ($info['avdataend'] <= $info['avdataoffset']) { - $info['error'][] = '"avdataend" ('.$info['avdataend'].') is unexpectedly less-than-or-equal-to "avdataoffset" ('.$info['avdataoffset'].')'; - return false; - } - $info['fileformat'] = 'mpeg'; - fseek($this->getid3->fp, $info['avdataoffset'], SEEK_SET); - $MPEGstreamData = fread($this->getid3->fp, min(100000, $info['avdataend'] - $info['avdataoffset'])); - $MPEGstreamDataLength = strlen($MPEGstreamData); - - $foundVideo = true; - $VideoChunkOffset = 0; - while (substr($MPEGstreamData, $VideoChunkOffset++, 4) !== GETID3_MPEG_VIDEO_SEQUENCE_HEADER) { - if ($VideoChunkOffset >= $MPEGstreamDataLength) { - $foundVideo = false; - break; - } - } - if ($foundVideo) { - - // Start code 32 bits - // horizontal frame size 12 bits - // vertical frame size 12 bits - // pixel aspect ratio 4 bits - // frame rate 4 bits - // bitrate 18 bits - // marker bit 1 bit - // VBV buffer size 10 bits - // constrained parameter flag 1 bit - // intra quant. matrix flag 1 bit - // intra quant. matrix values 512 bits (present if matrix flag == 1) - // non-intra quant. matrix flag 1 bit - // non-intra quant. matrix values 512 bits (present if matrix flag == 1) - - $info['video']['dataformat'] = 'mpeg'; - - $VideoChunkOffset += (strlen(GETID3_MPEG_VIDEO_SEQUENCE_HEADER) - 1); - - $FrameSizeDWORD = getid3_lib::BigEndian2Int(substr($MPEGstreamData, $VideoChunkOffset, 3)); - $VideoChunkOffset += 3; - - $AspectRatioFrameRateDWORD = getid3_lib::BigEndian2Int(substr($MPEGstreamData, $VideoChunkOffset, 1)); - $VideoChunkOffset += 1; - - $assortedinformation = getid3_lib::BigEndian2Bin(substr($MPEGstreamData, $VideoChunkOffset, 4)); - $VideoChunkOffset += 4; - - $info['mpeg']['video']['raw']['framesize_horizontal'] = ($FrameSizeDWORD & 0xFFF000) >> 12; // 12 bits for horizontal frame size - $info['mpeg']['video']['raw']['framesize_vertical'] = ($FrameSizeDWORD & 0x000FFF); // 12 bits for vertical frame size - $info['mpeg']['video']['raw']['pixel_aspect_ratio'] = ($AspectRatioFrameRateDWORD & 0xF0) >> 4; - $info['mpeg']['video']['raw']['frame_rate'] = ($AspectRatioFrameRateDWORD & 0x0F); - - $info['mpeg']['video']['framesize_horizontal'] = $info['mpeg']['video']['raw']['framesize_horizontal']; - $info['mpeg']['video']['framesize_vertical'] = $info['mpeg']['video']['raw']['framesize_vertical']; - - $info['mpeg']['video']['pixel_aspect_ratio'] = $this->MPEGvideoAspectRatioLookup($info['mpeg']['video']['raw']['pixel_aspect_ratio']); - $info['mpeg']['video']['pixel_aspect_ratio_text'] = $this->MPEGvideoAspectRatioTextLookup($info['mpeg']['video']['raw']['pixel_aspect_ratio']); - $info['mpeg']['video']['frame_rate'] = $this->MPEGvideoFramerateLookup($info['mpeg']['video']['raw']['frame_rate']); - - $info['mpeg']['video']['raw']['bitrate'] = getid3_lib::Bin2Dec(substr($assortedinformation, 0, 18)); - $info['mpeg']['video']['raw']['marker_bit'] = (bool) getid3_lib::Bin2Dec(substr($assortedinformation, 18, 1)); - $info['mpeg']['video']['raw']['vbv_buffer_size'] = getid3_lib::Bin2Dec(substr($assortedinformation, 19, 10)); - $info['mpeg']['video']['raw']['constrained_param_flag'] = (bool) getid3_lib::Bin2Dec(substr($assortedinformation, 29, 1)); - $info['mpeg']['video']['raw']['intra_quant_flag'] = (bool) getid3_lib::Bin2Dec(substr($assortedinformation, 30, 1)); - if ($info['mpeg']['video']['raw']['intra_quant_flag']) { - - // read 512 bits - $info['mpeg']['video']['raw']['intra_quant'] = getid3_lib::BigEndian2Bin(substr($MPEGstreamData, $VideoChunkOffset, 64)); - $VideoChunkOffset += 64; - - $info['mpeg']['video']['raw']['non_intra_quant_flag'] = (bool) getid3_lib::Bin2Dec(substr($info['mpeg']['video']['raw']['intra_quant'], 511, 1)); - $info['mpeg']['video']['raw']['intra_quant'] = getid3_lib::Bin2Dec(substr($assortedinformation, 31, 1)).substr(getid3_lib::BigEndian2Bin(substr($MPEGstreamData, $VideoChunkOffset, 64)), 0, 511); - - if ($info['mpeg']['video']['raw']['non_intra_quant_flag']) { - $info['mpeg']['video']['raw']['non_intra_quant'] = substr($MPEGstreamData, $VideoChunkOffset, 64); - $VideoChunkOffset += 64; - } - - } else { - - $info['mpeg']['video']['raw']['non_intra_quant_flag'] = (bool) getid3_lib::Bin2Dec(substr($assortedinformation, 31, 1)); - if ($info['mpeg']['video']['raw']['non_intra_quant_flag']) { - $info['mpeg']['video']['raw']['non_intra_quant'] = substr($MPEGstreamData, $VideoChunkOffset, 64); - $VideoChunkOffset += 64; - } - - } - - if ($info['mpeg']['video']['raw']['bitrate'] == 0x3FFFF) { // 18 set bits - - $info['warning'][] = 'This version of getID3() ['.$this->getid3->version().'] cannot determine average bitrate of VBR MPEG video files'; - $info['mpeg']['video']['bitrate_mode'] = 'vbr'; - - } else { - - $info['mpeg']['video']['bitrate'] = $info['mpeg']['video']['raw']['bitrate'] * 400; - $info['mpeg']['video']['bitrate_mode'] = 'cbr'; - $info['video']['bitrate'] = $info['mpeg']['video']['bitrate']; - - } - - $info['video']['resolution_x'] = $info['mpeg']['video']['framesize_horizontal']; - $info['video']['resolution_y'] = $info['mpeg']['video']['framesize_vertical']; - $info['video']['frame_rate'] = $info['mpeg']['video']['frame_rate']; - $info['video']['bitrate_mode'] = $info['mpeg']['video']['bitrate_mode']; - $info['video']['pixel_aspect_ratio'] = $info['mpeg']['video']['pixel_aspect_ratio']; - $info['video']['lossless'] = false; - $info['video']['bits_per_sample'] = 24; - - } else { - - $info['error'][] = 'Could not find start of video block in the first 100,000 bytes (or before end of file) - this might not be an MPEG-video file?'; - - } - - //0x000001B3 begins the sequence_header of every MPEG video stream. - //But in MPEG-2, this header must immediately be followed by an - //extension_start_code (0x000001B5) with a sequence_extension ID (1). - //(This extension contains all the additional MPEG-2 stuff.) - //MPEG-1 doesn't have this extension, so that's a sure way to tell the - //difference between MPEG-1 and MPEG-2 video streams. - - if (substr($MPEGstreamData, $VideoChunkOffset, 4) == GETID3_MPEG_VIDEO_EXTENSION_START) { - $info['video']['codec'] = 'MPEG-2'; - } else { - $info['video']['codec'] = 'MPEG-1'; - } - - - $AudioChunkOffset = 0; - while (true) { - while (substr($MPEGstreamData, $AudioChunkOffset++, 4) !== GETID3_MPEG_AUDIO_START) { - if ($AudioChunkOffset >= $MPEGstreamDataLength) { - break 2; - } - } - - $getid3_temp = new getID3(); - $getid3_temp->openfile($this->getid3->filename); - $getid3_temp->info = $info; - $getid3_mp3 = new getid3_mp3($getid3_temp); - for ($i = 0; $i <= 7; $i++) { - // some files have the MPEG-audio header 8 bytes after the end of the $00 $00 $01 $C0 signature, some have it up to 13 bytes (or more?) after - // I have no idea why or what the difference is, so this is a stupid hack. - // If anybody has any better idea of what's going on, please let me know - info@getid3.org - fseek($getid3_temp->fp, ftell($this->getid3->fp), SEEK_SET); - $getid3_temp->info = $info; // only overwrite real data if valid header found - if ($getid3_mp3->decodeMPEGaudioHeader(($AudioChunkOffset + 3) + 8 + $i, $getid3_temp->info, false)) { - $info = $getid3_temp->info; - $info['audio']['bitrate_mode'] = 'cbr'; - $info['audio']['lossless'] = false; - unset($getid3_temp, $getid3_mp3); - break 2; - } - } - unset($getid3_temp, $getid3_mp3); - } - - // Temporary hack to account for interleaving overhead: - if (!empty($info['video']['bitrate']) && !empty($info['audio']['bitrate'])) { - $info['playtime_seconds'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / ($info['video']['bitrate'] + $info['audio']['bitrate']); - - // Interleaved MPEG audio/video files have a certain amount of overhead that varies - // by both video and audio bitrates, and not in any sensible, linear/logarithmic patter - // Use interpolated lookup tables to approximately guess how much is overhead, because - // playtime is calculated as filesize / total-bitrate - $info['playtime_seconds'] *= $this->MPEGsystemNonOverheadPercentage($info['video']['bitrate'], $info['audio']['bitrate']); - - //switch ($info['video']['bitrate']) { - // case('5000000'): - // $multiplier = 0.93292642112380355828048824319889; - // break; - // case('5500000'): - // $multiplier = 0.93582895375200989965359777343219; - // break; - // case('6000000'): - // $multiplier = 0.93796247714820932532911373859139; - // break; - // case('7000000'): - // $multiplier = 0.9413264083635103463010117778776; - // break; - // default: - // $multiplier = 1; - // break; - //} - //$info['playtime_seconds'] *= $multiplier; - //$info['warning'][] = 'Interleaved MPEG audio/video playtime may be inaccurate. With current hack should be within a few seconds of accurate. Report to info@getid3.org if off by more than 10 seconds.'; - if ($info['video']['bitrate'] < 50000) { - $info['warning'][] = 'Interleaved MPEG audio/video playtime may be slightly inaccurate for video bitrates below 100kbps. Except in extreme low-bitrate situations, error should be less than 1%. Report to info@getid3.org if greater than this.'; - } - } - - return true; - } - - - public function MPEGsystemNonOverheadPercentage($VideoBitrate, $AudioBitrate) { - $OverheadPercentage = 0; - - $AudioBitrate = max(min($AudioBitrate / 1000, 384), 32); // limit to range of 32kbps - 384kbps (should be only legal bitrates, but maybe VBR?) - $VideoBitrate = max(min($VideoBitrate / 1000, 10000), 10); // limit to range of 10kbps - 10Mbps (beyond that curves flatten anyways, no big loss) - - - //OMBB[audiobitrate] = array(video-10kbps, video-100kbps, video-1000kbps, video-10000kbps) - $OverheadMultiplierByBitrate[32] = array(0, 0.9676287944368530, 0.9802276264360310, 0.9844916183244460, 0.9852821845179940); - $OverheadMultiplierByBitrate[48] = array(0, 0.9779100089209830, 0.9787770035359320, 0.9846738664076130, 0.9852683013799960); - $OverheadMultiplierByBitrate[56] = array(0, 0.9731249855367600, 0.9776624308938040, 0.9832606361852130, 0.9843922606633340); - $OverheadMultiplierByBitrate[64] = array(0, 0.9755642683275760, 0.9795256705493390, 0.9836573009193170, 0.9851122539404470); - $OverheadMultiplierByBitrate[96] = array(0, 0.9788025247497290, 0.9798553314148700, 0.9822956869792560, 0.9834815119124690); - $OverheadMultiplierByBitrate[128] = array(0, 0.9816940050925480, 0.9821675936072120, 0.9829756927470870, 0.9839763420152050); - $OverheadMultiplierByBitrate[160] = array(0, 0.9825894094561180, 0.9820913399073960, 0.9823907143253970, 0.9832821783651570); - $OverheadMultiplierByBitrate[192] = array(0, 0.9832038474336260, 0.9825731694317960, 0.9821028622712400, 0.9828262076447620); - $OverheadMultiplierByBitrate[224] = array(0, 0.9836516298538770, 0.9824718601823890, 0.9818302180625380, 0.9823735101626480); - $OverheadMultiplierByBitrate[256] = array(0, 0.9845863022094920, 0.9837229411967540, 0.9824521662210830, 0.9828645172100790); - $OverheadMultiplierByBitrate[320] = array(0, 0.9849565280263180, 0.9837683142805110, 0.9822885275960400, 0.9824424382727190); - $OverheadMultiplierByBitrate[384] = array(0, 0.9856094774357600, 0.9844573394432720, 0.9825970399837330, 0.9824673808303890); - - $BitrateToUseMin = 32; - $BitrateToUseMax = 32; - $previousBitrate = 32; - foreach ($OverheadMultiplierByBitrate as $key => $value) { - if ($AudioBitrate >= $previousBitrate) { - $BitrateToUseMin = $previousBitrate; - } - if ($AudioBitrate < $key) { - $BitrateToUseMax = $key; - break; - } - $previousBitrate = $key; - } - $FactorA = ($BitrateToUseMax - $AudioBitrate) / ($BitrateToUseMax - $BitrateToUseMin); - - $VideoBitrateLog10 = log10($VideoBitrate); - $VideoFactorMin1 = $OverheadMultiplierByBitrate[$BitrateToUseMin][floor($VideoBitrateLog10)]; - $VideoFactorMin2 = $OverheadMultiplierByBitrate[$BitrateToUseMax][floor($VideoBitrateLog10)]; - $VideoFactorMax1 = $OverheadMultiplierByBitrate[$BitrateToUseMin][ceil($VideoBitrateLog10)]; - $VideoFactorMax2 = $OverheadMultiplierByBitrate[$BitrateToUseMax][ceil($VideoBitrateLog10)]; - $FactorV = $VideoBitrateLog10 - floor($VideoBitrateLog10); - - $OverheadPercentage = $VideoFactorMin1 * $FactorA * $FactorV; - $OverheadPercentage += $VideoFactorMin2 * (1 - $FactorA) * $FactorV; - $OverheadPercentage += $VideoFactorMax1 * $FactorA * (1 - $FactorV); - $OverheadPercentage += $VideoFactorMax2 * (1 - $FactorA) * (1 - $FactorV); - - return $OverheadPercentage; - } - - - public function MPEGvideoFramerateLookup($rawframerate) { - $MPEGvideoFramerateLookup = array(0, 23.976, 24, 25, 29.97, 30, 50, 59.94, 60); - return (isset($MPEGvideoFramerateLookup[$rawframerate]) ? (float) $MPEGvideoFramerateLookup[$rawframerate] : (float) 0); - } - - public function MPEGvideoAspectRatioLookup($rawaspectratio) { - $MPEGvideoAspectRatioLookup = array(0, 1, 0.6735, 0.7031, 0.7615, 0.8055, 0.8437, 0.8935, 0.9157, 0.9815, 1.0255, 1.0695, 1.0950, 1.1575, 1.2015, 0); - return (isset($MPEGvideoAspectRatioLookup[$rawaspectratio]) ? (float) $MPEGvideoAspectRatioLookup[$rawaspectratio] : (float) 0); - } - - public function MPEGvideoAspectRatioTextLookup($rawaspectratio) { - $MPEGvideoAspectRatioTextLookup = array('forbidden', 'square pixels', '0.6735', '16:9, 625 line, PAL', '0.7615', '0.8055', '16:9, 525 line, NTSC', '0.8935', '4:3, 625 line, PAL, CCIR601', '0.9815', '1.0255', '1.0695', '4:3, 525 line, NTSC, CCIR601', '1.1575', '1.2015', 'reserved'); - return (isset($MPEGvideoAspectRatioTextLookup[$rawaspectratio]) ? $MPEGvideoAspectRatioTextLookup[$rawaspectratio] : ''); - } - -} diff --git a/james-heinrich/getid3/.gitattributes b/james-heinrich/getid3/.gitattributes new file mode 100644 index 00000000..412eeda7 --- /dev/null +++ b/james-heinrich/getid3/.gitattributes @@ -0,0 +1,22 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp +*.sln merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/james-heinrich/getid3/.gitignore b/james-heinrich/getid3/.gitignore new file mode 100644 index 00000000..45991640 --- /dev/null +++ b/james-heinrich/getid3/.gitignore @@ -0,0 +1,167 @@ +helperapps/*.exe +helperapps/*.dll + + +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results +[Dd]ebug/ +[Rr]elease/ +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.vspscc +.builds +*.dotCover + +## TODO: If you have NuGet Package Restore enabled, uncomment this +#packages/ + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf + +# Visual Studio profiler +*.psess +*.vsp + +# ReSharper is a .NET coding add-in +_ReSharper* + +# Installshield output folder +[Ee]xpress + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish + +# Others +[Bb]in +[Oo]bj +sql +TestResults +*.Cache +ClientBin +stylecop.* +~$* +*.dbmdl +Generated_Code #added for RIA/Silverlight projects + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML + + + +############ +## Windows +############ + +# Windows image file caches +Thumbs.db + +# Folder config file +Desktop.ini + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg + +# Mac crap +.DS_Store diff --git a/james-heinrich/getid3/README.md b/james-heinrich/getid3/README.md new file mode 100644 index 00000000..f34fdd48 --- /dev/null +++ b/james-heinrich/getid3/README.md @@ -0,0 +1,607 @@ +getID3() by James Heinrich () +=== +**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](http://www.mozilla.org/MPL/2.0/) + +**getID3 Commercial License:** + +* [gCL](http://getid3.org/#gCL) (payment required) + +* * * +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 +=== + +**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 +=== + +**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 +=== + +It's highly recommended that you sign up for notification from +Sourceforge for when new versions are released. Please visit: + +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? +=== + +Reads & parses (to varying degrees): + ++ tags: + * APE (v1 and v2) + * ID3v1 (& ID3v1.1) + * ID3v2 (v2.4, v2.3, v2.2) + * Lyrics3 (v1 & v2) + ++ audio-lossy: + * MP3/MP2/MP1 + * MPC / Musepack + * Ogg (Vorbis, OggFLAC, Speex) + * 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 + * 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 (& ID3v1.1) + * ID3v2 (v2.3 & v2.4) + * VorbisComment on OggVorbis + * VorbisComment on FLAC (not OggFLAC) + * APE v2 + * Lyrics3 (delete only) + + + +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. + + + +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: + +``` php +analyze($filename); + // Delete temporary file + unlink($localtempfilename); + } + fclose($fp_remote); +} + +``` + + +**See /demos/demo.write.php for how to write tags.** + +What does the returned data structure look like? +=== + +See structure.txt + +It is recommended that you look at the output of +/demos/demo.browse.php scanning the file(s) you're interested in to +confirm what data is actually returned for any particular filetype in +general, and your files in particular, as the actual data returned +may vary considerably depending on what information is available in +the file itself. + + + +Notes +=== + +getID3() 1.x: +--- +If the format parser encounters a critical problem, it will return +something in `$fileinfo['error']`, describing the encountered error. If +a less critical error or notice is generated it will appear in +`$fileinfo['warning']`. Both keys may contain more than one warning or +error. If something is returned in ['error'] then the file was not +correctly parsed and returned data may or may not be correct and/or +complete. If something is returned in `['warning']` (and not `['error']`) +then the data that is returned is OK - usually getID3() is reporting +errors in the file that have been worked around due to known bugs in +other programs. Some warnings may indicate that the data that is +returned is OK but that some data could not be extracted due to +errors in the file. + +getID3() 2.x: +--- +See above except errors are thrown (so you will only get one error). + +Disclaimer +=== + +getID3() has been tested on many systems, on many types of files, +under many operating systems, and is generally believe to be stable +and safe. That being said, there is still the chance there is an +undiscovered and/or unfixed bug that may potentially corrupt your +file, especially within the writing functions. By using getID3() you +agree that it's not my fault if any of your files are corrupted. +In fact, I'm not liable for anything :) + +License +=== + +GNU General Public License - see license.txt + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to: +Free Software Foundation, Inc. +59 Temple Place - Suite 330 +Boston, MA 02111-1307, USA. + +FAQ: +--- +**Q:** Can I use getID3() in my program? Do I need a commercial license? + +**A:** You're generally free to use getID3 however you see fit. The only + case in which you would require a commercial license is if you're + selling your closed-source program that integrates getID3. If you + sell your program including a copy of getID3, that's fine as long + as you include a copy of the sourcecode when you sell it. Or you + can distribute your code without getID3 and say "download it from + getid3.sourceforge.net" + + + +Why is it called "getID3()" if it does so much more than just that? +=== + +v0.1 did in fact just do that. I don't have a copy of code that old, but I +could essentially write it today with a one-line function: + +``` php +function getID3($filename) { return unpack('a3TAG/a30title/a30artist/a30album/a4year/a28comment/c1track/c1genreid', substr(file_get_contents($filename), -128)); } + +``` + + +Future Plans +=== + + +* Better support for MP4 container format +* Scan for appended ID3v2 tag at end of file per ID3v2.4 specs (Section 5.0) +* Support for JPEG-2000 (http://www.morgan-multimedia.com/jpeg2000_overview.htm) +* Support for MOD (mod/stm/s3m/it/xm/mtm/ult/669) +* Support for ACE (thanks Vince) +* Support for Ogg other than Vorbis, Speex and OggFlac (ie. Ogg+Xvid) +* Ability to create Xing/LAME VBR header for VBR MP3s that are missing VBR header +* Ability to "clean" ID3v2 padding (replace invalid padding with valid padding) +* Warn if MP3s change version mid-stream (in full-scan mode) +* check for corrupt/broken mid-file MP3 streams in histogram scan +* Support for lossless-compression formats + (http://www.firstpr.com.au/audiocomp/lossless/#Links) + (http://compression.ca/act-sound.html) + (http://web.inter.nl.net/users/hvdh/lossless/lossless.htm) +* Support for RIFF-INFO chunks + * http://lotto.st-andrews.ac.uk/~njh/tag_interchange.html + (thanks Nick Humfrey ) + * http://abcavi.narod.ru/sof/abcavi/infotags.htm + (thanks Kibi) +* Better support for Bink video +* http://www.hr/josip/DSP/AudioFile2.html +* http://www.pcisys.net/~melanson/codecs/ +* Detect mp3PRO +* Support for PSD +* Support for JPC +* Support for JP2 +* Support for JPX +* Support for JB2 +* Support for IFF +* Support for ICO +* Support for ANI +* Support for EXE (comments, author, etc) (thanks p*quaedackersØplanet*nl) +* Support for DVD-IFO (region, subtitles, aspect ratio, etc) + (thanks p*quaedackersØplanet*nl) +* More complete support for SWF - parsing encapsulated MP3 and/or JPEG content + (thanks n8n8Øyahoo*com) +* Support for a2b +* Optional scan-through-frames for AVI verification + (thanks rockcohenØmassive-interactive*nl) +* Support for TTF (thanks infoØbutterflyx*com) +* Support for DSS (http://www.getid3.org/phpBB3/viewtopic.php?t=171) +* Support for SMAF (http://smaf-yamaha.com/what/demo.html) + http://www.getid3.org/phpBB3/viewtopic.php?t=182 +* Support for AMR (http://www.getid3.org/phpBB3/viewtopic.php?t=195) +* Support for 3gpp (http://www.getid3.org/phpBB3/viewtopic.php?t=195) +* Support for ID4 (http://www.wackysoft.cjb.net grizlyY2KØhotmail*com) +* Parse XML data returned in Ogg comments +* Parse XML data from Quicktime SMIL metafiles (klausrathØmac*com) +* ID3v2 genre string creator function +* More complete parsing of JPG +* Support for all old-style ASF packets +* ASF/WMA/WMV tag writing +* Parse declared T??? ID3v2 text information frames, where appropriate + (thanks Christian Fritz for the idea) +* Recognize encoder: + http://www.guerillasoft.com/EncSpot2/index.html + http://ff123.net/identify.html + http://www.hydrogenaudio.org/?act=ST&f=16&t=9414 + http://www.hydrogenaudio.org/?showtopic=11785 +* Support for other OS/2 bitmap structures: Bitmap Array('BA'), + Color Icon('CI'), Color Pointer('CP'), Icon('IC'), Pointer ('PT') + http://netghost.narod.ru/gff/graphics/summary/os2bmp.htm +* Support for WavPack RAW mode +* ASF/WMA/WMV data packet parsing +* ID3v2FrameFlagsLookupTagAlter() +* ID3v2FrameFlagsLookupFileAlter() +* obey ID3v2 tag alter/preserve/discard rules +* http://www.geocities.com/SiliconValley/Sector/9654/Softdoc/Illyrium/Aolyr.htm +* proper checking for LINK/LNK frame validity in ID3v2 writing +* proper checking for ASPI-TLEN frame validity in ID3v2 writing +* proper checking for COMR frame validity in ID3v2 writing +* http://www.geocities.co.jp/SiliconValley-Oakland/3664/index.html +* decode GEOB ID3v2 structure as encoded by RealJukebox, + decode NCON ID3v2 structure as encoded by MusicMatch + (probably won't happen - the formats are proprietary) + + + +Known Bugs/Issues in getID3() that may be fixed eventually +=== + + +* Cannot determine bitrate for MPEG video with VBR video data + (need documentation) +* Interlace/progressive cannot be determined for MPEG video + (need documentation) +* MIDI playtime is sometimes inaccurate +* AAC-RAW mode files cannot be identified +* WavPack-RAW mode files cannot be identified +* mp4 files report lots of "Unknown QuickTime atom type" + (need documentation) +* Encrypted ASF/WMA/WMV files warn about "unhandled GUID + ASF_Content_Encryption_Object" +* Bitrate split between audio and video cannot be calculated for + NSV, only the total bitrate. (need documentation) +* All Ogg formats (Vorbis, OggFLAC, Speex) are affected by the + problem of large VorbisComments spanning multiple Ogg pages, but + but only OggVorbis files can be processed with vorbiscomment. +* The version of "head" supplied with Mac OS 10.2.8 (maybe other + versions too) does only understands a single option (-n) and + therefore fails. getID3 ignores this and returns wrong md5_data. + + + +Known Bugs/Issues in getID3() that cannot be fixed +--- + + +* 32-bit PHP installations only: + Files larger than 2GB cannot always be parsed fully by getID3() + due to limitations in the 32-bit PHP filesystem functions. + NOTE: Since v1.7.8b3 there is partial support for larger-than- + 2GB files, most of which will parse OK, as long as no critical + data is located beyond the 2GB offset. + Known will-work: + * all file formats on 64-bit PHP + * ZIP (format doesn't support files >2GB) + * FLAC (current encoders don't support files >2GB) + Known will-not-work: + * ID3v1 tags (always located at end-of-file) + * Lyrics3 tags (always located at end-of-file) + * APE tags (always located at end-of-file) + Maybe-will-work: + * Quicktime (will work if needed metadata is before 2GB offset, + that is if the file has been hinted/optimized for streaming) + * RIFF.WAV (should work fine, but gives warnings about not being + able to parse all chunks) + * RIFF.AVI (playtime will probably be wrong, is only based on + "movi" chunk that fits in the first 2GB, should issue error + to show that playtime is incorrect. Other data should be mostly + correct, assuming that data is constant throughout the file) + + + +Known Bugs/Issues in other programs +--- + + +* Windows Media Player (up to v11) and iTunes (up to v10+) do + not correctly handle ID3v2.3 tags with UTF-16BE+BOM + encoding (they assume the data is UTF-16LE+BOM and either + crash (WMP) or output Asian character set (iTunes) +* Winamp (up to v2.80 at least) does not support ID3v2.4 tags, + only ID3v2.3 + see: http://forums.winamp.com/showthread.php?postid=387524 +* Some versions of Helium2 (www.helium2.com) do not write + ID3v2.4-compliant Frame Sizes, even though the tag is marked + as ID3v2.4) (detected by getID3()) +* MP3ext V3.3.17 places a non-compliant padding string at the end + of the ID3v2 header. This is supposedly fixed in v3.4b21 but + only if you manually add a registry key. This fix is not yet + confirmed. (detected by getID3()) +* CDex v1.40 (fixed by v1.50b7) writes non-compliant Ogg comment + strings, supposed to be in the format "NAME=value" but actually + written just "value" (detected by getID3()) +* Oggenc 0.9-rc3 flags the encoded file as ABR whether it's + actually ABR or VBR. +* iTunes (versions "X v2.0.3", "v3.0.1" are known-guilty, probably + other versions are too) writes ID3v2.3 comment tags using a + frame name 'COM ' which is not valid for ID3v2.3+ (it's an + ID3v2.2-style frame name) (detected by getID3()) +* MP2enc does not encode mono CBR MP2 files properly (half speed + sound and double playtime) +* MP2enc does not encode mono VBR MP2 files properly (actually + encoded as stereo) +* tooLAME does not encode mono VBR MP2 files properly (actually + encoded as stereo) +* AACenc encodes files in VBR mode (actually ABR) even if CBR is + specified +* AAC/ADIF - bitrate_mode = cbr for vbr files +* LAME 3.90-3.92 prepends one frame of null data (space for the + LAME/VBR header, but it never gets written) when encoding in CBR + mode with the DLL +* Ahead Nero encodes TwinVQF with a DSIZ value (which is supposed + to be the filesize in bytes) of "0" for TwinVQF v1.0 and "1" for + TwinVQF v2.0 (detected by getID3()) +* Ahead Nero encodes TwinVQF files 1 second shorter than they + should be +* AAC-ADTS files are always actually encoded VBR, even if CBR mode + is specified (the CBR-mode switches on the encoder enable ABR + mode, not CBR as such, but it's not possible to tell the + difference between such ABR files and true VBR) +* STREAMINFO.audio_signature in OggFLAC is always null. "The reason + it's like that is because there is no seeking support in + libOggFLAC yet, so it has no way to go back and write the + computed sum after encoding. Seeking support in Ogg FLAC is the + #1 item for the next release." - Josh Coalson (FLAC developer) + NOTE: getID3() will calculate md5_data in a method similar to + other file formats, but that value cannot be compared to the + md5_data value from FLAC data in a FLAC file format. +* STREAMINFO.audio_signature is not calculated in FLAC v0.3.0 & + v0.4.0 - getID3() will calculate md5_data in a method similar to + other file formats, but that value cannot be compared to the + md5_data value from FLAC v0.5.0+ +* RioPort (various versions including 2.0 and 3.11) tags ID3v2 with + a WCOM frame that has no data portion +* Earlier versions of Coolplayer adds illegal ID3 tags to Ogg Vorbis + files, thus making them corrupt. +* Meracl ID3 Tag Writer v1.3.4 (and older) incorrectly truncates the + last byte of data from an MP3 file when appending a new ID3v1 tag. + (detected by getID3()) +* Lossless-Audio files encoded with and without the -noseek switch + do actually differ internally and therefore cannot match md5_data +* iTunes has been known to append a new ID3v1 tag on the end of an + existing ID3v1 tag when ID3v2 tag is also present + (detected by getID3()) +* MediaMonkey may write a blank RGAD ID3v2 frame but put actual + replay gain adjustments in a series of user-defined TXXX frames + (detected and handled by getID3() since v1.9.2) + + + + +Reference material: +=== + +[www.id3.org](http://www.id3.org) material now mirrored at + +* http://www.id3.org/id3v2.4.0-structure.txt +* http://www.id3.org/id3v2.4.0-frames.txt +* http://www.id3.org/id3v2.4.0-changes.txt +* http://www.id3.org/id3v2.3.0.txt +* http://www.id3.org/id3v2-00.txt +* http://www.id3.org/mp3frame.html +* http://minnie.tuhs.org/pipermail/mp3encoder/2001-January/001800.html +* http://www.dv.co.yu/mpgscript/mpeghdr.htm +* http://www.mp3-tech.org/programmer/frame_header.html +* http://users.belgacom.net/gc247244/extra/tag.html +* http://gabriel.mp3-tech.org/mp3infotag.html +* http://www.id3.org/iso4217.html +* http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-1.TXT +* http://www.xiph.org/ogg/vorbis/doc/framing.html +* http://www.xiph.org/ogg/vorbis/doc/v-comment.html +* http://leknor.com/code/php/class.ogg.php.txt +* http://www.id3.org/iso639-2.html +* http://www.id3.org/lyrics3.html +* http://www.id3.org/lyrics3200.html +* http://www.psc.edu/general/software/packages/ieee/ieee.html +* http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee-expl.html +* http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html +* http://www.jmcgowan.com/avi.html +* http://www.wotsit.org/ +* http://www.herdsoft.com/ti/davincie/davp3xo2.htm +* http://www.mathdogs.com/vorbis-illuminated/bitstream-appendix.html +* "Standard MIDI File Format" by Dustin Caldwell (from www.wotsit.org) +* http://midistudio.com/Help/GMSpecs_Patches.htm +* http://www.xiph.org/archives/vorbis/200109/0459.html +* http://www.replaygain.org/ +* http://www.lossless-audio.com/ +* http://download.microsoft.com/download/winmediatech40/Doc/1.0/WIN98MeXP/EN-US/ASF_Specification_v.1.0.exe +* http://mediaxw.sourceforge.net/files/doc/Active%20Streaming%20Format%20(ASF)%201.0%20Specification.pdf +* http://www.uni-jena.de/~pfk/mpp/sv8/ (archived at http://www.hydrogenaudio.org/musepack/klemm/www.personal.uni-jena.de/~pfk/mpp/sv8/) +* http://jfaul.de/atl/ +* http://www.uni-jena.de/~pfk/mpp/ (archived at http://www.hydrogenaudio.org/musepack/klemm/www.personal.uni-jena.de/~pfk/mpp/) +* http://www.libpng.org/pub/png/spec/png-1.2-pdg.html +* http://www.real.com/devzone/library/creating/rmsdk/doc/rmff.htm +* http://www.fastgraph.com/help/bmp_os2_header_format.html +* http://netghost.narod.ru/gff/graphics/summary/os2bmp.htm +* http://flac.sourceforge.net/format.html +* http://www.research.att.com/projects/mpegaudio/mpeg2.html +* http://www.audiocoding.com/wiki/index.php?page=AAC +* http://libmpeg.org/mpeg4/doc/w2203tfs.pdf +* http://www.geocities.com/xhelmboyx/quicktime/formats/qtm-layout.txt +* http://developer.apple.com/techpubs/quicktime/qtdevdocs/RM/frameset.htm +* http://www.nullsoft.com/nsv/ +* http://www.wotsit.org/download.asp?f=iso9660 +* http://sandbox.mc.edu/~bennet/cs110/tc/tctod.html +* http://www.cdroller.com/htm/readdata.html +* http://www.speex.org/manual/node10.html +* http://www.harmony-central.com/Computer/Programming/aiff-file-format.doc +* http://www.faqs.org/rfcs/rfc2361.html +* http://ghido.shelter.ro/ +* http://www.ebu.ch/tech_t3285.pdf +* http://www.sr.se/utveckling/tu/bwf +* http://ftp.aessc.org/pub/aes46-2002.pdf +* http://cartchunk.org:8080/ +* http://www.broadcastpapers.com/radio/cartchunk01.htm +* http://www.hr/josip/DSP/AudioFile2.html +* http://home.attbi.com/~chris.bagwell/AudioFormats-11.html +* http://www.pure-mac.com/extkey.html +* http://cesnet.dl.sourceforge.net/sourceforge/bonkenc/bonk-binary-format-0.9.txt +* http://www.headbands.com/gspot/ +* http://www.openswf.org/spec/SWFfileformat.html +* http://j-faul.virtualave.net/ +* http://www.btinternet.com/~AnthonyJ/Atari/programming/avr_format.html +* http://cui.unige.ch/OSG/info/AudioFormats/ap11.html +* http://sswf.sourceforge.net/SWFalexref.html +* http://www.geocities.com/xhelmboyx/quicktime/formats/qti-layout.txt +* http://www-lehre.informatik.uni-osnabrueck.de/~fbstark/diplom/docs/swf/Flash_Uncovered.htm +* http://developer.apple.com/quicktime/icefloe/dispatch012.html +* http://www.csdn.net/Dev/Format/graphics/PCD.htm +* http://tta.iszf.irk.ru/ +* http://www.atsc.org/standards/a_52a.pdf +* http://www.alanwood.net/unicode/ +* http://www.freelists.org/archives/matroska-devel/07-2003/msg00010.html +* http://www.its.msstate.edu/net/real/reports/config/tags.stats +* http://homepages.slingshot.co.nz/~helmboy/quicktime/formats/qtm-layout.txt +* http://brennan.young.net/Comp/LiveStage/things.html +* http://www.multiweb.cz/twoinches/MP3inside.htm +* http://www.geocities.co.jp/SiliconValley-Oakland/3664/alittle.html#GenreExtended +* http://www.mactech.com/articles/mactech/Vol.06/06.01/SANENormalized/ +* http://www.unicode.org/unicode/faq/utf_bom.html +* http://tta.corecodec.org/?menu=format +* http://www.scvi.net/nsvformat.htm +* http://pda.etsi.org/pda/queryform.asp +* http://cpansearch.perl.org/src/RGIBSON/Audio-DSS-0.02/lib/Audio/DSS.pm +* http://trac.musepack.net/trac/wiki/SV8Specification +* http://wyday.com/cuesharp/specification.php +* http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html diff --git a/james-heinrich/getid3/changelog.txt b/james-heinrich/getid3/changelog.txt new file mode 100644 index 00000000..62bd4815 --- /dev/null +++ b/james-heinrich/getid3/changelog.txt @@ -0,0 +1,2794 @@ +///////////////////////////////////////////////////////////////// +/// getID3() by James Heinrich // +// available at http://getid3.sourceforge.net // +// or http://www.getid3.org // +// also https://github.com/JamesHeinrich/getID3 // +///////////////////////////////////////////////////////////////// +// // +// changelog.txt - part of getID3() // +// See readme.txt for more details // +// /// +///////////////////////////////////////////////////////////////// + + » denotes a major feature addition/change + ¤ denotes a change in the returned structure + ! denotes a cry for help from developers +* Bugfix: denotes a fixed bug + +Version History +=============== + +1.9.9: [2014-??-??] James Heinrich + * Bugfix: (#1845) Quicktime parsing with no PHP memory_limit + +1.9.8: [2014-05-11] James Heinrich + » Add support for AMR (Adaptive Multi-Rate audio codec) + new file: module.audio.amr.php + » Added composer.json, registered on packagist.org + * Added workaround for PHP Bug #39923 (undefined constant IMG_JPG) + * Bugfix: (#1813) avoid running out of memory when parsing large + Quicktime files + * Bugfix: (#1812) potential unwanted high-ASCII characters in errors + * Bugfix: close potential XXE security issue (CVE-2014-2053) + * Bugfix: (G:10) Avoid warnings from realpath() if SAFE MODE is enabled + * Bugfix: (G:12) If [tags] data contains an array of strings then html + encoding did not take place. + * Bugfix: (G:12) IPTC character set not specified + * Bugfix: possible divide by zero error in FLV module + * Bugfix: possible undefined key in ID3v2 + * Bugfix: possible undefined key in MPEG video files + * Bugfix: demo.browse to use character set consistently + +1.9.7: [2013-07-05] James Heinrich + * Bugfix: [module.audio-video.quicktime.php] track languages set + with 15-bit-encoded ISO639-2 language codes not parsed correctly + * Bugfix: (#1717) QuickTime atom hierarchy broken + * Bugfix: (#1716) truncate MIDI file could cause infinite loop + * Bugfix: all source files converted to UTF-8 + +1.9.6: [2013-06-03] James Heinrich + » getID3() is now licensed under GPL / LGPL / MozillaPL / gCL + See license.txt for more details. + * Bugfix: (#1550) Quicktime video track sample description parsed + incorrectly + * Bugfix: (#1550) Quicktime matrix U/V/W values calculated incorrectly + * [demo.browse] disable edit-tag and delete-file links by default + * Bugfix: option_max_2gb_check should issue warning not error on >2GB + +1.9.5: [2013-02-20] James Heinrich, Dmitry Arkhipov + » DTS-in-WAV now properly supported + ¤ DSS files return additional data in new keys, and some existing + keys have been renamed + * Bugfix: open_basedir not parsed correctly under Windows + (thanks yannick*jamontØgmail*com) + * Bugfix: [demo/demo.browse] might not display file or directory name + on PHP >=5.4.0 if filename not UTF-8 friendly + * Bugfix: [demo/demo.zip] could read more uncompressed data than + required; fail to read file if local data descriptor not set; + some wrong include files were listed; improved error message display + * Bugfix: [module.audio-video.riff] INFO comment chunks with null name + chunk not parsed correctly + * Bugfix: [module.archive.gz] gzip files with filename stored may have + filename reduplicated in [gzip][files] output + * Bugfix: [module.archive.zip] data_descriptor not parsed correctly + * Bugfix: [module.archive.zip] some newer compression methods unknown + * Bugfix: [module.archive.zip] not all flags parsed + * Bugfix: [module.archive.zip] local file header not parsed correctly + if file has zero values for compressed_size in Local File Header + * Bugfix: (#1493) better support for >2GB filesize on 32-bit Linux + * Bugfix: (#1474) unneccesary call to GetDataImageSize in JPEG module + * Bugfix: (#1470) GIF files falsely detected as TS format + * Bugfix: (#1431) Matroska did not parse PixelCrop* / DisplayUnit + (thanks jgerberØwikimedia*org) + * Bugfix: (#1430) split ID3v2 text values on null separator + * Bugfix: (#1426) MS Office 2007 file format now recognized as zip.msoffice + * Bugfix: (#1423) optimized CreateDeepArray function + * Bugfix: (#1415) add support for DS2 variant of DSS + +1.9.4b1: [2012-10-05] James Heinrich, Dmitry Arkhipov, Karl G. Holz + » New module: extension.cache.sqlite3.php (by Karl G. Holz) + » New demo: demos/getid3.demo.dirscan.php (by Karl G. Holz) + » PHP5 standards improvements (thanks phansysØgmail*com) + » more reliable >4GB file size parsing using COM (if available) + Scripting.FileSystemObject rather than parsing `dir` output + * added support for FLAC inside Matroska (audio bitrate cannot + be determined in this case) + * XMP module now returns all tags, not just whitelisted ones + * (#1297) Added detection of MPEG Transport Stream files. + Stub module.audio-video.ts.php incomplete + * (#1383) removed unneeded ?> tags (thanks daveØholyfield*info) + * Bugfix: XMP returns attributes array not just value strings + * Bugfix: (#1369) ID3v2 IPLS contents not parsed + * Bugfix: (#1357) demo.mysql.php mysql_table_exists() failed + * Bugfix: (#1355) copy Foobar2000 QuickTime tags to [comments] + * Bugfix: (#1351) QuickTime files with zero-sized atom boxes + could cause infinite loop + * Bugfix: (#1343) FLAC attached pictures Ogg not handled + * Bugfix: (#1343) ID3v2 inside WAV "id3 " chunk not handled + * Bugfix: (#1315) BMP detection was broken + * Bugfix: (#1309) ID3v2.2 content_group_description (TT2) did + not copy to same place as ID3v2.3/ID3v2.4 (TIT2) + * Bugfix: (#1308) [playtime_string] could show hh:mm:60 + * Bugfix: (#1306) extension.cache.mysql.php keyword TYPE->ENGINE + * Bugfix: (#1295) missing video information if QuickTime file has + disabled tracks + * Bugfix: (#1275) MD5/SHA1 data hashes not working properly + under Windows + + +1.9.3: [2011-12-13] Dmitry Arkhipov, James Heinrich + * Matroska module improved: + 1. Added support for A_MS/ACM audio codec + 2. Fixed issues in tags, cues, chapters and clusters parsing + 3. Fixed almost all errors with track_data_offset, errors + still may occur with Xiph data lacing + 4. Optimized audio/video streams population with usage of the + official default values for missing elements + 5. Audio/video keys are now populated with data from the + default stream, not from the first one as before + 6. Full WebM support + * Bugfix: demo.browse would not pop up warnings when clicked + if warning contains apostrophe/single-quote character + * Bugfix: (#1269) ID3v1 genre typo "Trash"->"Thrash" Metal + + +1.9.2: [2011-12-08] James Heinrich, Dmitry Arkhipov + » significant rewrite to module.audio-video.matroska.php + ¤ (#1256) ID3 tags in AIFF 'ID3 ' chunks now parsed + ¤ (#1039) iXML data in WAV files now returned and parsed into + [riff][WAVE][iXML][0][data] and [riff][WAVE][iXML][0][parsed] + ¤ [playtime_string] now returns M:SS if less than 1 hour, and + H:MM:SS if 1 hour or longer + * Bugfix: (#1266) variable tablename: extension.cache.mysql.php + * Bugfix: (#1265) unescaped # in regex in write.id3v2.php + * Bugfix: (#1252) MediaMonkey writes blank ID3v2 RGAD frames + and puts replay-gain values in TXXX frames + * Bugfix: (#1251) FLV playtime could be inaccurate for longer + files where meta frame is present but meta-playtime is zero + * Bugfix: (#1216) show hex values of unknown atom names + * Bugfix: (#1215) undefined variable in PrintHexBytes() + * Bugfix: FLV audio bitrate was returning kbps not bps + * Bugfix: missing ) in write.real.php::RemoveReal() + * Bugfix: replace $this::VERSION with getID3::VERSION in + extension.cache.*.php + + +1.9.1: [2011-08-10] James Heinrich + ¤ ASF Extended Header Object data now (partially) parsed + * Default getID3 encoding now set to UTF-8 not ISO-8859-1 + * Bugfix: (#1212) truncated Matroska files may result in + infinite loop and memory exhaustion + * Bugfix: (#1203) parse RIFF JUNK chunks for version strings + * Bugfix: (#1201) multi-byte characters strings incorrectly + displayed by table_var_dump() in demo.browse.php + * Bugfix: (#1199) prevent PHP warning on malformed ID3v2 APIC + * Bugfix: (#1196) typo in module.audio-video.quicktime.php + * Bugfix: (#1195) QuicktimeStoreFrontCodeLookup() broken + * Bugfix: (#1194) mp4 embedded images not handled correctly + * Bugfix: (#1193) [image_mime] key not set fo WM/picture data + * Bugfix: (#1193) ASF Extended Header Object Metadata Library + now parsed for embedded images and handled per usual style + * Bugfix: (#1190) demo.mimeonly.php was broken since v1.9.0 + * Bugfix: ID3v2 comment is now called 'comment' not 'comments' + * Bugfix: AVI unknown codec fourcc would be reported as blank + * Bugfix: AVI zero-size JUNK chunk would give warning + + +1.9.0: [2011-06-20] James Heinrich + » changed all module classes to have proper constructors + with the actual analysis code moved to function Analyze() + * removed unnecessary ob_* calls, replaced with appropriate + checks and judicious use of @ error suppression + ¤ GETID3_VERSION constant replaced with $getID3->version() + ¤ picture data is now returned only in the original source + location and [comments][picture], it is no longer replicated + in [comments_html], [tags] or [tags_html] + ¤ Matroska tags are now returned in [comments] as per normal + ¤ Matroska tags are better supported, including pictures + ¤ GPS data in MP4 files (e.g. iPhone) is now parsed (#1157) + ¤ Matroska audio/video tracks with a default flag, the default + stream flag is now copied to [audio|video][streams] (#1147) + ¤ Nikon-specific data (NCDT atom) in Quicktime videos now parsed + ¤ QuickTime atoms 'meta' and 'data' now (mostly) parsed + * Bugfix: remove false warning of junk data on WAV+ID3v1 + * Bugfix: DolbyDigitalWAV files returned wrong audio bitrate + * Bugfix: large attachment data in Matroska tags were not + returned completely. + * Bugfix: wrong image_mime used for images in demo.browse.php + * Bugfix: broken preg_match in module.audio.dss.php + * Bugfix: Lyrics3 end offset was off by 1 + * Bugfix: audio channelmode could be wrong for 2 channels + (e.g. joint stereo reported as stereo) + * Bugfix: MultiByteCharString2HTML() would return empty string + if passed float or int value, now casts to string first + * Bugfix: FLAC.picture was not returning under [data] + + [image_mime] per standardized format + * Bugfix: BigEndian2Int() could incorrectly return negative + signed synchsafe integer instead of casting to float + * Bugfix: (#1177) ID3v2.4 extended headers were broken + * Bugfix: (#1173) some MIDI files not completely parsed + * Bugfix: (#1171) change helperapps error to nonblocking warning + * Bugfix: (#1170) possible infinite loop in FLV module + * Bugfix: (#1169) $this reference in static function (ID3v2) + * Bugfix: (#1156) demo.mysql.php not working + * Bugfix: (#1153) badly-tagged files could produce invalid + argument errors in module.tag.xmp.php + * Bugfix: (#1152) add error-suppression to iconv() calls + * Bugfix: (#1151) AAC-ADTS files could sometimes not find sync + * Bugfix: (#1136) last character of unicode tags (e.g. ASF) + was being truncated + * Bugfix: (#1133) write.id3v2.php IsValidURL() was broken + * Bugfix: (#1126) ID3v2.POPM field was being clobbered + * Bugfix: (#999, #1154) ID3v2 UFID data was missing + + +1.8.5: [2011-02-18] James Heinrich + » support >2GB files on 64-bit PHP + - note current unofficial 64-bit PHP builds for Windows + do not actually support 64-bit integers so are still + subject to normal 32-bit limits (2GB) for file functions + » PHP v5.0.5 now minimum required version. + Removed obsolte functions from getid3.lib.php: + md5_file, sha1_file, image_type_to_mime_type + » IDivX tags now parsed on AVI files + ¤ embedded image data is returned inside [comments][picture] + in a 2-element array (data, image_mime) for all formats + * $this->overwrite_tags=false is now known to be buggy and + has been disabled for this version until a full review + of tag writing can be completed. Certainly affects ID3v2, + the other writable tag formats may or may not be broken + * getID3 constructor no longer checks for (or sets) timezone + * demo.browse.php now shows cover art as inline images + rather than dumped to separate files + * [audio][streams][x][language] now set when known + * Bugfix: RIFF-AVI "JUNK" chunks are now parsed properly, + including zero-sized ones (no more false errors) + * Bugfix: msoffice documents now return correct error message + * Bugfix: demo.browse.php now encodes data according to + current page encoding (default=UTF-8) + * Bugfix: (#1120) sometimes incorrect ID3v2 genre parsing + * Bugfix: (#1116) possibly incorrect warnings (or lack of) + for RIFFs > 2GB. + * Bugfix: (#1115) wrong RIFFtype in RIFF files + * Bugfix: (#1114) wrong MIME type may be set for Matroska + * Bugfix: (#1113) support DSS v3 files + * Bugfix: (#1111) cover art in APE tags now supported + * Bugfix: (#1091) RemoveID3v1() unitialized variables + * Bugfix: (# 504) do not set Quicktime resolution if + 'tkhd' atom is disabled + * Bugfix: (# 95) return [quicktime][controller] if known + + +1.8.4: [2011-02-03] James Heinrich + * change default encoding in ID3v2 writing to UTF16-LE+BOM + (or ISO-8859-1 where possible) for better compatability + with broken versions of Windows Media Player and iTunes + * Bugfix: [FLV] incorrect overall bitrate in some files + * Bugfix: (#1102) missing parentheses in write[.id3v2].php + * Bugfix: (#510) undefined IsValidDottedIP() in write.id3v2.php + + +1.8.3: [2011-01-18] James Heinrich + » magic_quotes_gpc must now be disabled to use getID3 + » replace all error-suppressing @$variable calls with + isset() or empty() as appropriate for some configurations + where @ does not act to suppress warnings of undefined + variables (e.g. support forum thread #798) + * remove SafeStripSlashes() and FixTextFields functions + * [quicktime] use fourcc if codec name zero-length + * [quicktime] support "iods" atom + * Bugfix: (#1099) sometimes incorrect detection of safe_mode + * Bugfix: (#1095) more robust setting of temp dir + * Bugfix: (#1093) add support for ClusterSimpleBlock to + prevent "Undefined index: track_data_offsets" errors + in Matroska files + * Bugfix: [riff] prevent errors when RIFF.WAVE.BEXT chunk + contains null date/time (thanks moysevichØgmail*com) + * Bugfix: [quicktime] prevent divide-by-zero errors if + time_to_sample_table has zero-sample entry + (thanks moysevichØgmail*com) + + +1.8.2: [2010-12-06] James Heinrich + * include startup warning for PHP < v5 + * magic_quotes_runtime must now be disabled to use getID3 + ¤ MusicBrainz / AmpliFIND data more accessible in returned data + from Quicktime-style files (e.g. MP4/AAC) + * Bugfix: (#1079) wrong encoding might be used for ID3v2 + text data, and/or garbage data prepended before text + data; DataLengthIndicator value was being ignored + * Bugfix: (#1055) clearer warnings on non-EXIF contents in + JPEG [APP1] + * Bugfix: (#999) ID3v2 UFID data was missing + + +1.8.1: [2010-11-25] James Heinrich + * replaced calls to deprecated mysql_escape_string() with + mysql_real_escape_string() + * Bugfix: (#1072) memory limit not handled correctly if + in gigabytes in php.ini (e.g. "2G") + * Bugfix: (#1068) wrong encoding for Quicktime tags + * Bugfix: (#1040) possible infinite loop in genre parsing + * Bugfix: (#1036) helperapps directory not resolving 8.3 + path names correctly + * Bugfix: (#1023) dbm cache extension not correctly handling + types other than "db3" + * Bugfix: (#1023) mysql cache extension now base64_encodes + data to make binary-safe. Existing cached data must be + purged from your database cache + * Bugfix: (#1007) ClosestStandardMP3Bitrate() not selecting + most appropriate value + * Bugfix: (#996) inefficient and buggy ID3v1 and ID3v2 + genre parsing + * Bugfix: (#974) track number handled incorrectly in + demo.write.php + * Bugfix: (#969) tempnam() calls failing with open_basedir + * Bugfix: (#955) UTF-16LE text files could be falsely + identified as corrupt mp3 files + * Bugfix: (#877) detect if mbstring.func_overload is set in php.ini + * Bugfix: (#858) PHP safe_mode setting in php.ini incorrectly + handled if set to "Off" + * Bugfix: (#838) prevent warnings with assorted unhandled + Quicktime atoms + + +1.8.0: [2010-11-23] James Heinrich + » Changes required for PHP v5.3+ compatability, including: + - change ereg* functions to preg_* equivalents + - declare functions static as needed + note: users of PHP v4.x may need to stay with getID3 v1.7.x + » Added CUE (cuesheet) support + new file: module.misc.cue.php + (thanks Nigel Barnes ngbarnesØhotmail*com) + » Added XMP (Adobe Extensible Metadata Platform) support + currently used with module.graphic.jpg.php + new file: module.tag.xmp.php + (thanks Nigel Barnes ngbarnesØhotmail*com) + ¤ [jpg][exif][GPS][computed] now exists when possible with + calculated values (decimal latitude, longitude, altitude, time) + ¤ Prevent clobbering WMA artist with albumartist value; added WMA + partofset tag; added WMA tag picture data to WMA comments + (thanks ngbarnesØhotmail*com) + ¤ RIFF.WAVE.SNDM (SoundMiner) metadata now parsed + (thanks emerrittØwbgu*bgsu*edu) + ¤ FLAC embedded pictures now return [data_length] key + (thanks darrenburnhillØhotmail*com) + * added support for a number of new comment atom types added in + iTunes v4.0-v7.0 (thanks ngbarnesØhotmail*com) + * demo.browse.php now shows video resolution and framerate (if no + artist or title info present) + * additional FLV details parsed, may be faster as well + (thanks ngbarnesØhotmail*com) + * Bugfix: DSS files longer than 60 seconds had wrong playtime + * Bugfix: possible empty array encountered in APE tags + (thanks csnaitsirchØweb*de) + * Bugfix: prevent fatal error when calling BigEndian2Int() on + zero-length string (thanks taylor*fausakØgmail*com) + * Bugfix: prevent errors when parsing invalid Vorbis comments + (thanks dr*dieselØgmail*com) + * Bugfix: files could not be analyzed from Windows shares + (e.g. \\SERVER\Directory\Filename.mp3) + * Bugfix: RAR file opening should use 'filenamepath' + (thanks adrien*gibratØgmail*com) + * Bugfix: [asf][codec_list_object][codec_entries][x][description] + not containing expected comma-seperated values no longer aborts + (thanks larry_globusØyahoo*com) + * Bugfix: [id3v2] UFID was not returning data + (thanks joostØdecock*org) + +1.7.9: [2009-03-08] James Heinrich + » Added DSS (Digital Speech Standard) support + new file: module.audio.dss.php + (thanks luke*wilkinsØdtsam*com) + » Added MPC (Musepack) SV8 support + (thanks WaldoMonster) + ¤ some MPC [header] keys renamed to be the same between SV7/SV8 + ¤ start aligning demos CSS styling with v2.x styles + new file: demos/getid3.css + ¤ JPEG now returns parsed IPTC tags in [iptc] + ¤ getid3_lib::GetDataImageSize now requires $imageinfo parameter + ¤ better support for Matroska files with AC3/DTS/MP3/OGG audio + (support still lacking for AAC) + ¤ standardize ID3v2 TCMP key to 'part_of_a_set' between reading + and writing (thanks aaron_stormØyahoo*com) + ¤ added ID3v2 keys 'TCMP','TCP' to for writing iTunes-style tags + (thanks aaron_stormØyahoo*com) + ¤ back-ported PICTURE tag handling in FLAC tags + (thanks WaldoMonster) + ¤ added alternate method to get [video][frame_rate] from QuickTime + * added partial support for "TCMP"/"TCP" ID3v2 frames (iTunes + non-standard part-of-a-compilation tag) + (thanks aaron_stormØyahoo*com) + * slightly improved scanning through FLV files speed + (thanks franki) + * faster Matroska scanning by stopping at cluster chunks once + needed header chunks are found (much faster for large files) + * added workaround for broken tagging programs that miss terminating + null byte for numeric ID3v2.4 genres + (thanks yam655Øgmail*com) + * Bugfix: MultiByteCharString2HTML() did not escape common HTML + special characters like & and ? + * Bugfix: cleaned up some malformed HTML errors in demo.browse.php + * Bugfix: under Windows files >2GB might not be processed due to + "dir" command not finding file with double directory slashes + * Bugfix: "MODule (assorted sub-formats)" was falsely matching + some random files (e.g. JPEGs) (thanks qwertywin) + * Bugfix: suppress PHP_notice on failed SWF-compressed + decompression failure (thanks mkron) + + +1.7.8b3: [2008-07-13] James Heinrich + » Experimental partial support for files > 2GB (gets filesize + from shell call to "dir" or "ls", parse files with PHP only + up to 2GB limit). See readme.txt for details on what formats + work properly and other limitations + » Initial support for Matroska. Has only been tested with a + limited number of sample files, please report any bugs + » Experimental support for PHP-RAR reading. Known buggy, disabled + by default, enable with care + ¤ getid3_lib::CastAsInt() now returns ints up to 2^31 (not 2^30) + ¤ Quicktime: [video] now returns [frame_rate] and [fourcc] for MP4 + video files + * MP3: headerless VBR files now only have up to 10 blocks of 5000 + frames each scanned by default and bitrate extrapolated from that + distribution for speed (thanks glau*stuffØridiculousprods*com) + * Quicktime: support "co64" atom + * SWF: lower memory use when compressed SWF files processed + (thanks doughammondØblueyonder*co*uk) + * Bugfix: FLV height and width was calculated incorrectly + (thanks moysevichØgmail*com) + * Bugfix: FLV GETID3_FLV_TAG_META parsed incorrectly + (thanks moysevichØgmail*com) + * Bugfix: Quicktime: 'tkhd' matrix_v and matrix_d were switched + (thanks rjjmoroØhotmail*com) + * Bugfix: Quicktime: frame_rate was often incorrect for MP4 video + * Bugfix: getid3_lib::CastAsInt returned -2147483648 when passed + 2147483648 (0x80000000) + + +1.7.8b2: [2007-10-15] James Heinrich, Allan Hansen + * Video bitrate now calculated even if not explicitly stated in + file metadata, but if overall and audio bitrates are known + * Bugfix: 'comments_html' missing last letter in id3v2 tags. + * Bugfix: module objects (e.g. getid3_riff) that are instantiated + in other modules are explicitly disposed once no longer needed. + * Bugfix: some AVI files were not returning audio information + because "strh" chunk was not being read in + * Bugfix: asf [audio][][dataformat] should be set + to "wma" but wasn't + * Bugfix: [mpeg][audio][bitrate_mode] should always be one of + ("cbr", "vbr", "abr") but wasn't for some values in + LAMEvbrMethodLookup() + * Bugfix: MP3 audio in AVI files could show "cbr" instead of + correct audio bitrate_mode, and audio bitrate could be slightly + incorrect if multiple files were scanned in a loop (scanning + single files produced correct values). + * Bugfix: remove [audio/video][bitrate] key if falsely set to zero + * Bugfix: PlaytimeString returned non-matching value for negative + playtimes (which shouldn't happen either, but now they're at + least shown correctly, if they happen due to other bugs) + * Bugfix: Several ASF header values are invalid if the broadcast + flag is set, getID3() now calculates these values in other + ways if the broadcast flag is set (thanks fletchØpobox*com) + * Bugfix: lyrics3-flags-lyrics field was always false, and there + never was a lyrics3-flags-timestamp field present even though + the lyrics3-raw-IND field consisted of "10" (lyrics present, + timestamp not present). (thanks i*f*schulzØweb*de) + * Bugfix: TAR.GZ files produce PHP errors when + option_gzip_parse_contents == true in module.archive.gzip.php + (thanks alan*harderØsun*com) + + +1.7.8b1: [2007-01-08] Allan Hansen + » Major update to readme.txt + » PHP 4.2.0 required + » Tagwriter requires metaflac 1.1.1+ in order to write FLAC tags. + » Removed broken and non-fixable tagwriting module for real format. + ! Developers please help fix the above module: + http://www.getid3.org/phpBB3/viewtopic.php?t=677 + » Avoided security issues with demo.browse.php, demo.write.php and + demo.mysql.php. These demos are now disabled by default and has + to be enabled in the source. + * Bugfix: id3v2 genre broken since 1.7.7. + » Added DTS module (module.audio.dts.php) + ¤ ASF/WMV files now return largest video stream dimensions in + [video][resolution_x] and [video][resolution_y] + * Bugfix: Minor issues with midi module (avoid PHP_NOTICE). + * Bugfix: Minor issues with lyrics3 (avoid PHP_NOTICE). + * Bugfix: PHP_NOTICE issues in MultiByteCharString2HTML() + * Bugfix: PHP_NOTICE issue in BigEndian2Float() + * Bugfix: fread() zero bytes issue in real module. + * Bugfix: ASF module returned mime type video/x-ms-wma instead of + video/x-ms-wmv for certain FourCCs. + * Bugfix: PHP_NOTICE issues with broken ID3v2 tag/garbage. + * Bugfix: PNG module broken in regards to gIFg and gIFx chunks. + » Removed detection of short filenames 8dot3 under windows, as + it only worked for English versions of windows and has other + problems. + * Bugfix: Some CBR MP3 files detected as VBR with plenty of warnings. + * Bugfix: PHP_NOTICE issues in MP3 module. + * Bugfix: Quicktime returned incorrect frame rate. + * Bugfix: DivByZero on zero length FLV files. + * Bugfix: PHP_NOTICE one some FLV files. + * Bugfix: ID3v2 UTF-8/16 encoded frames terminated by \x00 + * Bugfix: ID3v2 LINK frames iconv error. + * Bugfix: ID3v2 padding length calculated incorrectly. + * Bugfix: ID3v2.3 extended headers non-conformance + » SVG file detection. + » Added SVG user module (user_modules/module.graphic.svg.php). + Thanks to Roan Horning. + » PAR2 file detection (no parsing) + * Bugfix: Wave files being detected as MP3. + * Bugfix: ASF padding offset bug. + * Bugfix: Shorten module not working for wav files with fmt + chunks <> 16 bytes. + ¤ RIFF: Zero sized chunk invokes warning instead of error. + ¤ FLAC: Removed some ['raw'] keys. + ¤ MPC: Mime type returned: audio/x-musepack + +1.7.7: [2006-06-25] Allan Hansen + * Bugfix: AAC static bitrate cache wrong result when parsing + several files. + * Bugfix: Do not return NULL video bitrate for ASF v3. + * Bugfix: getid3_lib::GetImageSize() broken => JPG module broken. + * Bugfix: Encoder options should now be returned with correct + "--alt-preset n" / "--alt-preset cbr n" when scanning more files. + * Bugfix: Shorten module not escapeshellarg() filenames (UNIX only). + * Bugfix: Filenames not escapeshellarg() for md5_data and + sha1_data (UNIX only). + * Bugfix: UNIX: head and tail called with -cNNN instead of "-c NNN". + » Added detection support for PDF and MS Office documents + (*.doc, *.xls, *.pps, etc) (thanks zeromassmediaØgmail*com) + ¤ Bugfix: ID3v2 "TDRC" frame now used as "year" in comments if TYER + unavailable (TYER is deprecated in ID3v2.4) + (thanks matthiasØpanczyk*org) + ¤ Removed GETID3_OS_DIRSLASH, replaced with DIRECTORY_SEPARATOR + * Bugfix: added LAME preset guessing for presets 410,420,440,490 + (thanks adminØlogbud*com) + * Bugfix: Added escapeshellarg() call in getid3_lib::hash_data + (thanks towbØgmx*net) + » TAR module no longer reads entire file into memory + » FLV module no longer reads entire file into memory + * Bugfix: added LAME preset guessing for presets 410,420,440,490 + (thanks adminØlogbud*com) + * Bugfix: Added escapeshellarg() call in getid3_lib::hash_data + (thanks towbØgmx*net) + * Bugfix: Error message when padding in FLAC files were used up. + * Bugfix: Shorten module not working under windows. + ¤ Bugfix: gmmktime() instead of mktime(). + ¤ Using gmmktime() instead of mktime() in ISO, ZIP, PNG and RIFF + modules to avoid E_STRICT notices with PHP5.1+. + * Bugfix: ['comments_html'] and ['comments'] contains different + value when having multiple tags (one of them ID3v1) and the + long field names. + +1.7.6: [2006-03-12] James Heinrich + * Rewrote getid3_lib::GetDataImageSize() to use GetImageSize() + instead of using code by filØrezox*com + * Bugfix: incorrect dimensions from disabled Quicktime tracks + (thanks m-1Øgmx*net) + * Bugfix: ['codec'] key warning in module.audio-video.asf.php + (thanks niel*archerØblueyonder*co*uk) + * Bugfix: undefined array in write.php + (thanks drewishØkatherinehouse*com) + * Bugfix: DeleteAPEtag() incorrectly failing when no tag present + (thanks drewishØkatherinehouse*com) + * Bugfix: ID3v2 writing frames with URL fields failing when URL + is not in ISO-8859-1 (thanks drewishØkatherinehouse*com) + * Bugfix: PHP notices on bad ID3v2 frames + (thanks cw264701Øohiou*edu) + * Bugfix: audio & video bitrates sometimes wrong in ASF files + (thanks kris_kauperØexcite*com) + +1.7.5: [2005-12-29] James Heinrich + » Added FLV (FLash Video) support -- new file: + module.audio-video.flv.php + (thanks Seth Kaufman for code) + » Real tags can now be written (previous Real tag writing + code was not supposed to be in public releases, as it + was not complete) + » GETID3_HELPERAPPSDIR now autodetected under Windows + ¤ ASF lyrics now returned under [comments][lyrics] + * Bugfix: removed "--lowpass xxxxx" info from guessed + LAME presets when source frequency <= 32kHz + * Bugfix: ID3v2 extended header errors + * Bugfix: missing ob_end_clean() in write.id3v2.php + (thanks rasherØgmail*com) + +1.7.4: [2005-05-04] James Heinrich + ¤ Added ['quicktime']['hinting'] key (boolean) + (thanks jonØwebignition*net) + * Bugfix: major UTF-8 to UTF-16/ISO-8859-1 conversion + bug (empty string returned) when using iconv_fallback + (thanks chrisØfmgp*com) + * Bugfix: Missing 'lossless' key in RIFF-WAV + (thanks bobbfwedØcomcast*net) + +1.7.3: [2005-04-22] James Heinrich + » Added TAR support -- new file: module.archive.tar.php + (thanks Mike Mozolin for code!) + » Added GZIP support -- new file: module.archive.gzip.php + (thanks Mike Mozolin for code!) + * Bugfix: demo.browse.php now displays embedded images + internally instead of passing local filename as IMG + SRC (should allow demo.browse.php to correctly show + embedded images over a network) + (thanks patpowermanØhotmail*com) + * Bugfix: minor UTF-8 display issues in demo.browse.php + * Bugfix: demo.browse.php now works even if the evil + setting magic_quotes_gpc is turned on + (thanks patpowermanØhotmail*com) + * Bugfix: incorrect MIDI playtime for some files + (thanks joelØoneporpoise*com) + * Bugfix: 'url_source' typo in module.tag.id3v2.php + (thanks richardlynchØusers*sourceforge*net) + * Bugfix: Quicktime 'mvhd' matrix values were wrong + (thanks webØbobbymac*net) + ¤ ID3v2 now returns xx/yy for ['track'] (if + available), with xx in ['tracknum'] and yy in + ['totaltracks']. Previously ['tracknum'] was not + available and ['track'] had only xx. + Bugfixes and improvements to /demo/demo.mysql.php: + - remix/version parsed from tags and stored in + database, can be used when renaming files + - track number can be used for renaming files + + +1.7.2: [2004-10-18] Allan Hansen + » Added support for WavPack v4.0+ + (thanks ahØartemis*dk) + » Removed code for parsing EXE files + (thanks ahØartemis*dk) + Removed file: module.misc.exe.php + * Bugfix: Large ID3v2 tags inside ASF not parsed + properly under PHP5. + * Bugfix: Certain Wavpack3 files failed under PHP5 due + to new undocumented tmpfile() limit (same problem as + above). + * Bugfix: New iTunes crashes PHP - temp fix - no tags + on those files. + * Bugfix: ['nsv']['NSVs']['framerate_index'] might be + wrong (thanks ahØartemis*dk) + * Bugfix: transparent color was wrong from truecolor + PNG (thanks ahØartemis*dk) + * Bugfix: Changed MPC SV7 header size from 30 to 28, + this will change hash values for MPC files + (thanks ahØartemis*dk) + * Bugfix: Changed MPC SV4-6 header size from 28 to 8, + this will change hash values for MPC files + (thanks ahØartemis*dk) + ¤ Trim/unset wavpack encoder_options to match 2.0.0b2 + output. + ¤ Commented-out unknown/unused values in NSV and ISO + modules (thanks ahØartemis*dk) + + +1.7.1b1: [July-26-2004] James Heinrich + » Added support for Apple Lossless Audio Codec + » Added support for RealAudio Lossless + » Added support for TTA v3 + » Added support for TIFF + New file: /getid3/module.graphic.tiff.php + » Modified iconv_fallback to work with UTF-8, UTF-16, UTF-16LE, + UTF-16BE and ISO-8859-1 even if iconv() and/or XML support is + not available. This means that iconv() is no longer required + for most users of getID3() + (thanks Jeremia, khleeØbitpass*com) + » Added support for Monkey's Audio v3.98+ (thanks ahØartemis*dk) + » Included new demo showing most-basic getID3() usage + New file: /demos/demo.basic.php + * Bugfix: LAME3.94+ presets cached incorrectly if multiple files + are scanned in one batch and first file is LAME3.93 or earlier + (thanks enoyandØyahoo*com) + * Bugfix: Added warning if compressed ID3v2 frame decompression + fails. (thanks Mike Billings) + * Bugfix: Assorted small fixes to ensure compatability with PHP5 + * Bugfix: ID3v1 genre "Blues" could not be written + (thanks Jeremia) + * Bugfix: ['bitrate_mode'] typo in module.audio-video.real.php + (thanks asukakenjiØusers*sourceforge*net) + * Bugfix: ['zip']['files'] is now populated with filenames even + if End Of Central Directory couldn't be parsed + * Bugfix: ['audio']['lossless'] was incorrect for FLAC + (thanks WaldoMonster) + * Bugfix: MD5 File was incorrect in directory browse mode for + /demo/getid3.browse.php + * Bugfix: PHP v5 compatability changes (float array keys, fread() + calls with zero data length) + (thanks getid3Øjsc*pp*ru) + * Bugfix: was dying if on compressed ID3v2 frames if + gzuncompress() function was unavailable + * Bugfix: ['vqf']['COMM'] was always empty + * Bugfix: MIDI playtime was missing for single-track MIDI files + * Bugfix: removed � characters from ['comments_html'] + (thanks p*quaedackersØplanet*nl) + * Bugfix: improved MIDI playtime accuracy + (thanks joelØoneporpoise*com) + * Bugfix: BMP subtypes 4 and 5 were not being identified + * Bugfix: frame_rate in AVI was incorrectly truncated to integer + * Bugfix: FLAC cuesheet track index was incorrect + (thanks tetsuo*yokozukaØoperamail*com) + ¤ ['quicktime']['display_scale'] now contains the playback scale + multiplier for QuickTime movies - a movie set to playback at + double-size will have "2" here. Other values are "1" and "0.5" + ¤ Added LAME preset guessing for --preset medium with v3.90.3 + (thanks phwipØfish*co*uk) + ¤ Added $encoding_id3v1 to allow for ID3v1 encodings other than + the standard ISO-8859-1 + ¤ Default AVI video bitrate_mode is now 'vbr' + (thanks eltoderØpisem*net) + Force getID3() to abort if Shorten files have ID3 or APE tags + (thanks ahØartemis*dk) + Editable textbox for parent directory in demo.browse.php + (thanks eltoderØpisem*net) + + +1.7.0-hotfix [2004-03-17] Allan Hansen + (hotfix version released by Allan Hansen) + * Bugfix: PHP 4.1.x compatiblity - fgets($fp) => fgets($fp, 1024) + * Bugfix: Added default charset to TextEncodingNameLookup() in + module.tag.id3v2.php + Ø Removed option_no_iconv + iconv() support is only a requirement for WMA/WMW/ASF, and for + destination encodings other than ISO-8859-1 and UTF-8, iconv is + not needed otherwise. New 'iconv_req' in GetFileFormatArray() + only set for WMA/WMV/ASF. analyze() now refuses to analyse + WMA/ASF file if iconv is not present. + iconv_fallback() only dies on internal errors not missing iconv() + + +1.7.0: [January-19-2004] James Heinrich + » Added support for RIFF/CDXA files (MPEG video in RIFF container + format (thanks chrisØdigitekdesign*com) + » Added support for TTA v2 (thanks ahØartemis*dk) + ¤ ID3v2 unsynchronisation scheme disabled by default because most + tag-reading programs cannot read unsynchronised tags. Can be + overridden by setting id3v2_use_unsynchronisation to true. + (thanks mikeØdelusion*org) + ¤ extention.*.php renamed to extension.*.php + (thanks tp62Øcornell*edu) + ¤ /demo/demo.check.php renamed to /demo/demo.browse.php + ¤ Added id3v2_paddedlength configuration parameter to WriteTags() + and renamed tag_language to id3v2_tag_language + ¤ MPEG audio layers are now represented as 1, 2 or 3 instead of + 'I', 'II', or 'III' + ¤ Added [audio][wformattag] and [video][fourcc] for WAV and AVI + ¤ Added [audio][streams] which contains one entry for each audio + stream present in the file (usually only one). The data is a + copy of what is usually found in [audio]. If there are multiple + audio streams then [audio] will contain a sum of the bitrates + of all audio streams, and the data format of the first stream + (if streams are of different data types) + ¤ Added BruteForce mode to mp3 scanning. Disabled by default as + it is extremely slow and only files that are broken enough to + not really play will gain any benefit from this. + ¤ Suppress '--resample xxxxx' appended to encoder options for mp3 + with low-quality presets for default sampling frequencies + ¤ Enhanced LAME preset guessing for pre-3.93 with a better lookup + table, --resample/--lowpass guessing (thanks phwipØfish*co*uk) + ¤ RIFF files with non-MP3 contents no longer have + [audio][encoder_options] set + ¤ Added [audio][encoder_options] to audio formats where possible + (including LiteWave, LPAC, OptimFROG, TTA) + ¤ Moved [quantization] and [max_prediction_order] from + [lpac][flags] to just [lpac] + ¤ WavPack flags are now parsed into [wavpack][flags] + * Bugfix: APEtags with ReplayGain information stored with comma- + seperated decimal values (ie "0,95" instead of "0.95") were + giving wrong peak and gain values + * Bugfix: Filesize > 2GB not always detected correctly + * Bugfix: Some ID3v2 frames had data key unset incorrectly + (thanks chrisØdigitekdesign*com) + * Bugfix: Warnings on empty-strings-only comments + * Bugfix: ID3v2 tag writing may have had incorrect padding length + if padded length less than current ID3v2 tag length and + merge_existing_data is false (thanks mikeØdelusion*org) + * Bugfix: hash_data() for SHA1 was broken under Windows + * Bugfix: BigEndian2Float()/LittleEndian2Float() were broken + * Bugfix: LAME header calculated track peaks were incorrect for + LAME3.94a15 and earlier + * Bugfix: AVIs with VBR MP3 audio data reported incorrect bitrate + and bitrate_mode + * Bugfix: AVIs sometimes had incorrect or missing video and total + bitrates + * Bugifx: AVIs sometimes had incorrect ['avdataend'] and + therefore also incorrect data hashes (md5_data, sha1_data) + * Bugfix: ID3v1 genreid no longer returned for Unknown genre + * Bugfix: ID3v1 SCMPX genres were broken + Modified LAME header parsing to correctly process peak track + value for LAME3.94a16+ (thanks Gabriel) + md5_file() and sha1_file() now work under Windows in PHP < 4.2.0 + and 4.3.0 respectively with helper apps + Default md5_data() tempfile location is now system temp directory + instead of same directory as file (thanks towbØtiscali*de) + Improved list of RIFF ['INFO'] comment key translations + More helpful error message when GETID3_HELPERAPPSDIR has spaces + /demo/demo.browse.php now autogets both MD5 and SHA1 hashes for + files < 50MB + Replaced PHP_OS comparisons with GETID3_OS_ISWINDOWS define + (thanks necroticØusers*sourceforge*net) + + +1.7.0b5: [December-29-2003] James Heinrich + » Windows only: Various binary files are now required for some + file formats, especially for tag writing, as well as md5sum + (and other) calculations. These binaries are now stored in the + directory defined as GETID3_HELPERAPPSDIR in getid3.php + (default is /helperapps/ parallel to /getid3/). + Note: This directory must not have any spaces in the pathname. + All neccesary files are available as a seperate download. + See /helperapps/readme.txt for more information + New file: /helperapps/readme.txt + » Unified tag-writing interface for all tag formats + New file: /getid3/write.php + /getid3/write.apetag.php + /getid3/write.id3v1.php + /getid3/write.id3v2.php + /getid3/write.lyrics3.php + /getid3/write.metaflac.php + /getid3/write.vorbiscomment.php + » Added support for Shorten - requires shorten binary (head.exe + is also required under Windows). + New file: /getid3/module.audio.shorten.php + » Added support for RKAU + New file: /getid3/module.audio.rkau.php + » Added (minimal) support for SZIP + New file: /getid3/module.archive.szip.php + » Added MySQL caching extention (thanks ahØartemis*dk) + New file: /getid3/extention.cache.mysql.php + » Added DBM caching extention (thanks ahØartemis*dk) + New file: /getid3/extention.cache.dbm.php + » Added sha1_data hash option (thanks ahØartemis*dk) + » Added option to allow getID3() to skip ID3v2 without parsing it + for faster scanning when ID3v2 data is not required. If you + want to enable this feature delete /getid3/module.tag.id3v2.php + (thanks ahØartemis*dk) + ¤ 8-bit WAV data now calculates MD5 checksums as normal, not + converting to signed data as before, so stored md5_data_source + in FLAC files will no longer match md5_data for the equivalent + decoded 8-bit WAV. A warning will be generated for 8-bit FLAC + files + ¤ Added option_no_iconv option to allow getID3() to work + partially without iconv() support enabled in PHP + (thanks ahØartemis*dk) + ¤ All '*_ascii' keys removed for ASF/WMA/WMV files + ¤ All 'ascii*' keys removed for ID3v2 tags + ¤ Ogg filetypes now return MIME of "application/ogg" instead of + the previous "application/x-ogg" + (thanks blakewattersØusers*sourceforge*net) + ¤ Force contents of ['id3v2']['comments'] to UTF-8 format from + whatever encoding each frame may have (text encoding can vary + from frame to frame in ID3v2) + ¤ MP3Gain information from APE tags suppressed from ['tags'] and + parsed into ['replay_gain'] + ¤ ReplayGain information (all formats) changed from "Radio" and + "Audiophile" to "Track" and "Album" respectively + ¤ ['volume'] and ['max_noclip_gain'] are now available in both + ['replay_gain']['track'] and ['replay_gain']['album'] for all + formats that calculate ReplayGain. + ¤ ['video']['total_frames'] is available for AVIs + ¤ All parsed ID3v2 frame data is now in ['id3v2'][XXXX][#] + (previously some frame types would have numeric array keys if + multiple instances of that frame type were allowed and other + frame types would not) + ¤ ASF/WMA "WM/Picture" images are now parsed in the same manner + as ID3v2 with the image (ex JPEG) data returned in [data] + rather than [value] + * Bugfix: Optional tag processing options were being ignored (ie + ID3v1 still processed even if option_tag_id3v1 == false) + (thanks ahØartemis*dk) + * Bugfix: fixed MultiByteCharString2HTML() for UTF-8 + * Bugfix: Quicktime files not always reporting video frame_rate + * Bugfix: False ID3v1 synch patterns in APE or Lyrics3 tags are + now detected and incorrect ID3v1 data not returned + (thanks sebastian_maresØusers*sourceforge*net for the idea) + * Bugfix: WMA9 Lossless now reported as lossless + * Bugfix: two typos in ID3v1 genre list + * Bugfix: MPEG-2/2.5 ABR/VBR MP3 files had doubled playtime + * Bugfix: MPEG-2/2.5 LayerII (ie MP2: 24/22.05/16kHz) files were + not detected due to incorrect frame length calculation + * Bugfix: MPEG LayerI files were not detected due to incorrect + frame length calculation (must be multiple of slot length) + Added alternative md5_data via system call - twice as fast. Needs + "getID3()-WindowsSupport" to work under Windows. + (thanks ahØartemis*dk) + ID3v2.4 compressed frames are now supported + php_uname() calls changed to use PHP_OS constant + Added SCMPX extensions to ID3v1 genres (0xF0-0xFE) + Obfuscated contributor email address in changelog and sourcecode + Added memory-saving EmbeddedLookup() function for lookup tables + in RIFF and ID3v2 modules (thanks ahØartemis*dk) + Major memory patches to many modules by using + $var = &$INFO_ARRAY_AT_SOME_INDEX + in place of large multi-dimensional array declarations. + Memory saved: RIFF: ~200kB; ID3v2: ~475kB; ASF: ~50kB etc. + (thanks ahØartemis*dk) + + +1.7.0b4: [November-19-2003] James Heinrich + » Support added for MPC files with old SV4-SV6 structure + » RealVideo now properly supported with resolution, framerate, etc + (thanks jcsston) + » RealAudio files with old-style file format (v2-v4) are now + fully supported + » Support added for DolbyDigital WAV files (thanks ahØartemis*dk) + ¤ ['RIFF'] is now ['riff'] to conform to make all root key names + lowercase + ¤ ['OFR'] is now ['ofr'] to conform to make all root key names + lowercase + ¤ ['tags_html'] is now available as a copy of ['tags'] but + with all text replaced with an HTML version of all characters + above chr(127), translated according to whatever the encoding + of the source tag is, in the HTML form Ӓ + ¤ CopyTagsToComments() is now available in getid3_lib + ¤ QuicktimeVR files now return a ['video']['dataformat'] of + 'quicktimevr' instead of 'quicktime' (thanks gtsØtsu*biz) + ¤ Quicktime video files with DivX, Xvid, 3ivx or MPEG4 video + streams now return those names as ['video']['dataformat'] + ¤ MPEG video files are now identified with ['video']['codec'] set + to either 'MPEG-1' or 'MPEG-2' (rather than just 'MPEG'). If you + see a file wrongly identified, please report it! + (thanks fccHandler) + ¤ All bitrate values in ['mpeg']['audio'] is now reported in bps + rather than kbps (ie 128000 instead of 128) for consistancy + ¤ AVIs with MP2 audio now report ['audio']['dataformat'] as 'mp2' + rather than 'wav' (thanks metalbrainØnetian*com) + ¤ Added ['md5_data_source'] for OptimFROG + ¤ AC3 in RIFF-WAV now identified with ['audio']['dataformat'] + returning 'ac3' + ¤ WavPack ['extra_bc'] now returned as integer + ¤ WavPack ['extras'] now returned as 3-element array of integers + ¤ MP3 ['audio']['encoder options'] now returns 'VBR' or 'CBR' only + (no bitrate) if no LAME preset is used, or 'VBR q??' where ?? is + a number 0-100 for Fraunhofer-encoded VBR MP3s + * Bugfix: VBR MP3s could have incorrect bitrate reported + * Bugfix: Quicktime files with MP4 audio were not returning + ['video']['dataformat'] (thanks robØmassive-interactive*nl) + * Bugfix: strpad vs str_pad typo in module.riff.php + (thanks nicojunØusers*sourceforge*net) + * Bugfix: ReplayGain information was often wrong for MPC files + * Bugfix: MD5 and other post-TAIL chunks were not being processed + in module.audio.optimfrog.php + * Bugfix: Undefined variable in table_var_dump() in demo/check.php + * Bugfix: QuickTime files now only return information in [audio] + or [video] if those exist in the file + * Bugfix: WavPack no longer tries to read entire compressed data + chunk + * Bugfix: Properly handle VBR MP3s with "Info" (rather than + "Xing") header frame. foobar2000 adds this to MP3 files when + "Fix MP3 Header" function is used (thanks ahØartemis*dk) + * Bugfix: Fraunhofer VBRI headers for MP3s were assuming 2-byte + entries for TOC rather than using stride, and were ignoring the + scaling value. (thanks sebastianØmaresweb*net) + Several QuickTime atoms have been added to an exclusion list + because they have been observed, but I have no idea what they + are supposed to do so I can't add real support for them, but + they should not generate warnings (robØmassive-interactive*nl) + Old MPC encoder (before v1.06) was return as v0.00, now returned + as 'Buschmann v1.7.0-v1.7.9 or Klemm v0.90-v1.05' + (thanks ahØartemis*dk) + Added check for magic_quotes_runtime and code to disable it if + neccesary (thanks stefan*kischkelØt-online*de) + Added 3ivx fourCCs to module.audio-video.quicktime.php + MP3 and AC3 streams are now parsed when contained inside RIFF-WAV + or RIFF-AVI container formats + Better detection of named presets in LAME 3.93/3.94 + + +1.7.0b3: [October-17-2003] James Heinrich + » AC-3 (aka Dolby Digital) is now supported. + New file: /getid3/module.audio.ac3.php + * Bugfix: ID3v2-writing function Unsynchronise() was broken, which + made ID3v2 tag containing binary data (typically pictures) get + corrupted. (thanks t*coombesØbendigo*vic*gov*au, + i*kuehlbornØndh*net, mikeØdelusion*org, mikeØftl*com) + * Bugfix: Zip comments now returned as array instead of string, + as they're supposed to be. + * Bugfix: Quicktime/MP4 files may have reported extremely low + bitrates (thanks spunkØdasspunk*com) + Improved double-ID3v1 check to prevent false detection when string + "TAG" is present in APE or Lyrics3 + Fixed /demo/simple.php + Fixed /demo/joinmp3.php + Fixed /demo/mimeonly.php + Fixed /demo/write.php + + +1.7.0b2: [October-15-2003] James Heinrich + » TTA Lossless Audio Compressor format now supported. + (http://tta.iszf.irk.ru) + New file: /getid3/module.graphic.tta.php + » PhotoCD (PCD) format now supported. Image data for the three + lowest resolutions (192x128, 384x256, 768x512) can be optionally + extracted. + New file: /getid3/module.graphic.pcd.php + ¤ RIFF-MP3 files now should return the same ['md5_data'] as the + identical MP3 file outside the RIFF container + ¤ Name of LAME preset used (if available, needs LAME v3.90+) + returned in ['mpeg']['audio']['LAME']['preset_used'] and also as + part of ['audio']['encoder_options'] + ¤ VQF module now sets ['audio']['encoder_options'] to i.e. CBR96 + ¤ MP3 module now sets ['audio']['encoder_options'] on CBR files + and all LAME-encoded files + ¤ MPC module now sets ['audio']['encoder_options'] + ¤ Monkey module now sets ['audio']['encoder_options'] + ¤ AAC module now sets ['audio']['encoder_options'] to profile name + ¤ ASF module now sets ['audio']['encoder_options'] + ¤ Ogg module adds ['audio']['encoder_options'] -b 128 on + Ogg Vorbis 1.0+ ABR files + ¤ Ogg module adds ['audio']['encoder_options'] -q N on + Ogg Vorbis 1.0+ VBR files 44k/48k sample rate/stereo files only. + ¤ Ogg module ['audio']['encoder_options'] "Nominal birate: 80k" to + other Ogg Vorbis files. + ¤ ID3v2 track number now returned as string (with leading zeros, + if present in data) rather than integer (thanks Plamen) + ¤ ASF module returns ['asf']['comments']['encoding_time_unix'] if + available (from WM/EncodingTime) + ¤ Fixed /demo/mysql.php and added some new features: + - encoder options + - ID3v2 "Encoded By" + - non-empty comments + - total entries in database summary (totals & averages) + - database version update + * Bugfix: 'UNICODE' iconv() charset changed to 'UTF-16LE' or + 'UTF-16BE' as appropriate + * Bugfix: iconv_fallback() function created in case iconv() fails + * Bugfix: fixed MD5 calls in demo/check.php + * Bugfix: reenabled detection of APE + Lyrics3 tags in same file + * Bugfix: ASF module now returns ID3v1 genre as string instead of + number - patch from Eugene Toder. + * Bugfix: ASF module now reads non-standard field names, + i.e. "date" as well as WM/Year - patch from Eugene Toder. + * Bugfix: ASF module now returns genre as-is if it is not a + standard ID3v1 genre (thanks wonderboy) + * Bugfix: Eliminated false-synch problem in MP3 module + * Bugfix: Fixed missing root ['bitrate'] for most formats + * Bugfix: ['audio']['compression_ration'] missing for MPC + (thanks WaldoMonster) + * Bugfix: NSV module died in 1.7.0b1 + * Bugfix: ASF module died in 1.7.0b1 when WM/Picture preset + * Bugfix: ASF tracknumber incorrect when specified by WM/Track + rather than WM/TrackNumber (thanks jgriffiniiiØhotmail*com) + * Bugfix: MPEG audio+video playtime should now be pretty accurate + (ie within 0.1% variation at most) + (thanks mgrimmØhealthtvchannel*org) + * Bugfix: ID3v2 not being copied to ['tags'] in some cases + * Bugfix: LAME CBR files with Info tag were being incorrectly + flagged as VBR (thanks Jojo) + * Bugfix: LAME tag not being detected for LAME 3.90 (original) + Changed regex pattern match for MP3 to include 3rd byte for more + reliable/accurate pattern matching + Added duplicate-ID3v1 tag checking (two ID3v1 tags, one after the + other) that has been known to occur with iTunes + (thanks towbØtiscali*de) + Added instructions for enabling iconv() support under Windows + Removed some unneccesary debugging code + Suppressed duplicate PHP warnings for missing include files + Included some missing dependencies in various files + /demo/audioinfo.class.php now copies ['audio']['encoder_options'] + + +1.7.0b1: [2003-09-28] Allan Hansen + This beta version was not made by James Heinrich. It was made by + Allan Hansen - please send bug reports on this + beta directly to me. + + James Heinrich will release 1.7.0 final, but it may take some time + to work out the bugs from the major rewrite. + + This version could be called getID3lite. It makes a lot of checks + optional and makes it easy to remove support for undesired formats + + It also is more library-like. Older versions of getID3() declared + an incredible amount of global scope functions and defined several + constants. 1.7.0beta1 still declares constants, but they are all + prepended by GETID3_. It declares no global scope functions - they + are all wrapped into classes. + + » Made getID3() depend on iconv library: compile PHP --with-iconv + » Created new directory structure + Moved all demos to demos/ + Moved all getID3() files to getid3/ + Renamed most files to module.something + Changed header in all module.something to explain what they do + Simply remove all modules you don't need + Wrapped all modules into classes + * Bugfix: Implemented misc patches from Eugene Toder + * Bugfix: Implemented misc patches from "six" + ¤ Added root key 'encoding' + ¤ Added prefix GETID3_ to all defined constants. + ¤ Wrapped getid3.php into getid3 class + ¤ Wrapped getid3.functions.php into getid3_lib class + Removed unused functions + Moved several functions away from getid3.functions.php and + into the files where they are actually used. + Renamed getid3.functions.php to getid3.lib.php + Moved getid3.rgad.php functions into getid3_lib + Moved getid3.getimagesize.php funcitons ingo getid3_lib + ¤ Moved getid3.ogginfo.php into ogg module + ¤ Combined GetTagOnly() and GetAllFileInfo() in method analyze + ¤ Removed redundant and unuseful root keys + 'file_modified_time' == filemtime($filename) + 'md5_file' == md5_file($filename) + 'exist' == file_exists($filename) + ¤ Changed root key ['tags'] from array of string to array of array + of comments. + Simplified code for detecting base path. + Removed ob_ from InitializeFilepointerArray(). That was really a + ugly HACK to get output from fopen. If user want the reason, + he should open the file himself! + Checking for APE tags before lyrics3 - makes Lyrics3 not depend + on APE tag. It seems to work on my test file. + Changed ['error'] and ['warning'] in multiple files to append to + array instead of appending to string. That simplified code in + getid3.php too. + Simplified clean-up procedure: simply remove all empty root keys + Setting tags in individual modules instead of main getid3.php + Made Bonk and ASF modules non-dependent on id3 modules - id3 + optional. + Rewrote HandleAllTags() - simplified and convert comments to + desired encoding. + Replaced all calls to RoughTranslateUnicodeToASCII() in ASF module + with a TrimConvert() method. This uses iconv() for conversion. + It also converts from UNICODE instead of UTF-16BE, as the spec + says it should. + Replaced all calls to RoughTranslateUnicodeToASCII() in id3v2 + module with iconv(). id3v2 module also reads + $ThisFileInfo['encoding'] and converts all comments to this + format. All other formats just add their comments in their + native charset, but every comment field in id3v2 can have a + different encoding, so this is needed. + Did same thing as above with ISO module. However - it does not + work. I need to find out how to specify big-endian unicode != + UNICODING encoding name given to iconv(). + Built-in assume mp3 format in getid3.php + Temporarily nuked root key ['comments'] and CopyCommentsToRoot() + Updated demo/audioinfo.class.php + Updated demo/check.php - some thing don't work! + Other demos are out of order! + + +1.6.5: [October-06-2003] James Heinrich + » Added support for LiteWave (thanks supportØclearjump*com) + Ø Split out speedup info from ['OFR']['OFR']['compression'] into + ['OFR']['OFR']['speedup'] + Ø If EXIF functions for JPEG not available, now warning not error + Ø ID3v2 track number now returned as string (with leading zeros, + if present in data) rather than integer (thanks Plamen) + * Bugfix: now correctly parses cbSize element of WAVEFORMATEX + structure (thanks supportØclearjump*com) + * Bugfix: ASF module now reads non-standard field names, + i.e. "date" as well as WM/Year - patch from Eugene Toder. + * Bugfix: ASF module now returns genre as-is if it is not a + standard ID3v1 genre (thanks wonderboy) + * Bugfix: ['audio']['compression_ration'] missing for MPC + (thanks WaldoMonster) + Prevent infinite loop in MP3 histogram if framelength == 0 + Added wFormatTag values 0x00FF and 0x2001 - 0x2005 + (thanks steveØheadbands*com) + Added "twos" and "sowt" FourCCs for Mac AIFC + + +1.6.4: [June-30-2003] James Heinrich + » Added support for free-format MP3s + (thanks Sebastian Mares for the idea) + » Compressed (Flash 6+) SWF files are now handled properly + (thanks alan*cheungØalumni*ust*hk) + » Added DeleteLyrics3() to getid3.lyrics3.php + » Added FixID3v1Padding() to getid3.putid3.php + » Added new simple MP3-splicing sample file + (thanks tommybobØmailandnews*com for the idea) + New file: getid3.demo.joinmp3.php + » Moved all contents of getid3.putid3.php into either + getid3.id3v1.php or getid3.id3v2.php or getid3.functions.php as + appropriate + Removed file: getid3.putid3.php + ¤ ['error'] and ['warning'] keys now return as arrays, not strings + ¤ New root key for all files: ['file_modified_time'] (UNIX time) + ¤ getid3.demo.scandir.php renamed to getid3.demo.mysql.php + ¤ New demo file returns the MIME type only for a single file + (thanks adminØe-tones*co*uk for the idea) + New file: getid3.demo.mimeonly.php + ¤ Added check for valid ID3v1 padding (strings should be padded + with null characters but some taggers incorrectly use spaces). + A warning will be generated if padding is invalid. New boolean + key ['id3v1']['padding_valid'] indicates padding validity. + ¤ CleanUpGetAllMP3info() removes more useless root keys for + unknown-format files + ¤ Extended LAME information in ['mpeg']['audio']['LAME'] is now + only returned for LAME v3.90+ + ¤ LAME-encoded MP3s now return + ['mpeg']['audio']['LAME']['long_version'] as well as + ['mpeg']['audio']['LAME']['short_version'] - these are identical + in LAME v3.90+ but older versions will report longer more + detailed version information if available + ¤ New Lyrics3 values: ['lyrics3']['raw']['offset_start'] and + ['lyrics3']['raw']['offset_end'] + ¤ New optional parameter on getAPEtagFilepointer() to scan from a + defined offset rather than end-of-file to allow scanning of APE + tags before Lyrics3 tags + ¤ ['tag_offset_start'] and ['tag_offset_end'] are now present in + ['ape'], ['lyrics3'], ['id3v1'] and ['id3v2'] + ¤ Numerous changes to the returned structure and content for La + files, including parsing the seektable (if applicable) and + parsing RIFF data occuring after the end of the compressed audio + data (notably RIFF comments) + (thanks mikeØbevin*de) + ¤ getSWFHeaderFilepointer() now has optional 3rd parameter + $ReturnAllTagData (default == false) which if set to true will + return data on all tags in ['swf']['tags'] + ¤ ['swf']['bgcolor'] now returns the 6-character string + representing the background color in HTML hex color format + (thanks ubergeekØubergeek*tv) + ¤ ['swf']['header']['frame_delay'] is no longer returned + ¤ getQuicktimeHeaderFilepointer() now has two additional optional + parameters: $ReturnAtomData (default == true) and + $ParseAllPossibleAtoms (default == false). Setting + $ReturnAtomData to false will reduce the size of the returned + data array by unsetting ['quicktime']['moov'] before returning. + Leaving $ParseAllPossibleAtoms as false now suppresses parsing + of several atom types that contain very large tables of data + that are not typically useful. Atom type suppressed are: + stts, stss, stsc, stsz, and stco + (thanks ubergeekØubergeek*tv) + ¤ ['fileformat'] no longer set to 'id3' if ID3v1 or ID3v2 tag + detected but no other data format recognized + * Bugfix: La files now return the correct values for + ['avdataoffset'] and ['avdataend'] and therefore the correct + values for ['md5_data'] - note that ['md5_data'] values will not + match values from previous versions of getID3() - the previous + versions were incorrect + (thanks mikeØbevin*de) + * Bugfix: A temporary file was being created in the web server's + root directory (not DocumentRoot) each time ['md5_data'] was + calculated, and not removed due to lack of permissions. Temp + file is now created (as it was supposed to be) in the directory + of the file being examined, or the system temp directory, and + properly removed when done. + * Bugfix: Several incorrect values were being returned inside + ['mpeg']['audio']['LAME'] (thanks bouvigneØmp3-tech*org) + * Bugfix: SWF frame rates values were usually incorrect. + (thanks alan.cheungØalumni*ust*hk and ubergeekØubergeek*tv) + * Bugfix: ID3v2.2 files always flagged 4 bytes of invalid padding + (thanks marcaØmac*com) + * Bugfix: Lyrics3 without ID3v1 was not working properly + * Bugfix: Lyrics3, APE & ID3v1 can all now exist in the same file. + A warning is issued if APE comes after Lyrics3 (because Lyrics3- + aware taggers probably are not APE-aware and therefore won't be + able to find the Lyrics3 tag) (thanks mp3gainØhotmail*com) + * Bugfix: WriteAPEtag() now writes the APE tag before any Lyrics3 + tags (if present) and removes any incorrect ones that are after + existing Lyrics3 tags (thanks mp3gainØhotmail*com) + * Bugfix: RIFF-WAVE file with incorrect NumberOfSamples values in + the 'fact' chunk no longer cause incorrect playtime calculation + (thanks stprasadØindusnetworks*com) + * Bugfix: getid3.demo.simple.php had undefined variables if the + file needed to be deep-scanned with assumeFormat + * Bugfix: fixed previously-incorrect ['avdataend'] values for APE + and Lyrics3 tags in some cases, which in some cases means that + ['md5_data'] is different than previously (now correct) + Much-improved detection of AAC-ADTS, which also means MP3 + format detection should now be nearly twice as fast + Truncated AVIs and WAVs are now reported + Number of new features and bugfixes in getid3.demo.mysql.php + Quicktime 'meta' atoms now parsed, so Quicktime MP4 files can now + return artist, title, album, etc (thanks spunkØdasspunk*com) + Consolidated all comments processing functions (processing the + ['comments'] and ['tags'] keys) into HandleAllTags() which now + also checks to ensure that APE tags are really better than ID3v2 + before using them in ['comments'] + Known issue with Meracl ID3 Tag Writer v1.3.4 truncating last byte + of MP3 file when appending new ID3v1 tag now specifically noted + (rather than generic Probably Truncated File message) + getid3.demo.mysql.php now stores last-modified time for each file + getid3.demo.mysql.php is now case-sensitive for filenames + getid3.demo.mysql.php can generate M3U playlists of any of the + groups of files it can select (duplicate filenames, tag types, + etc.) + getid3.demo.mysql.php can now find mismatched tag contents and + filenames + getid3.demo.check.php now shows total number of errors & warnings + GetFileFormatArray() now matches actual patterns for MP3 files + based on the first two bytes of the file, rather than just the + first one + Simplified DeleteAPEtag() and made it work properly with Lyrics3 + + +1.6.3: [May-17-2003] James Heinrich + » Added support for Bonk (thanks ahØartemis*dk) + New file: getid3.bonk.php + » Added support for AVR (thanks ahØartemis*dk) + New file: getid3.avr.php + ¤ Contents of getid3.id3.php moved to getid3.id3v1.php + Removed file: getid3.id3.php + ¤ Contents of getid3.frames.php moved to getid3.id3v2.php + Removed file: getid3.frames.php + ¤ Returned data structure documentation improved and updated and + now stored in getid3.structure.txt rather than getid3.readme.txt + New file: getid3.structure.txt + ¤ Now including the GNU General Public License in the distribution + as getid3.license.txt + New file: getid3.license.txt + ¤ Added new, optional, parameter to WriteAPEtag() (and also + GenerateAPEtag()) which must be set to TRUE if the values you + are passing are already UTF8-encoded, otherwise all data is + encoded to UTF8 by default. For all ASCII/ANSI data this value + should be left at the defaul value of FALSE. + ¤ Added third, optional, parameter to getID3v2Filepointer() - + $StartingOffset (default == 0) which can parse an ID3v2 tag + in a file at a position other than the start-of-file. + ¤ ['video']['pixel_aspect_ratio'] now returned when known + ¤ AVI files with WMA audio now return ['audio']['dataformat'] + of 'wma' rather than 'wav' + ¤ ASF-WMA files now return the artist value from WM/AlbumArtist + in ['comments']['artist'] (thanks msibbaldØsaebauld*com) + ¤ ASF-WMA files now return the 'author' value from + ['asf']['content_description'] in ['comments']['artist'] + instead of ['comments']['author'] + ¤ ASF-WMA files now return the 'description' value from + ['asf']['content_description'] in ['comments']['comment'] + instead of ['comments']['description'] + * Bugfix: APE tag writing with multiple values for a tag (more + than one ARTIST for example) was not being correctly written + (thanks ahØartemis*dk) + * Bugfix: CreateDeepArray() was returning an empty-string key as + the top-level returned value - ['iso']['files'] now directly + contains the file listing without an empty array in between. + * Bugfix: ID3v2 genreid was not being returned in some cases. + * Bugfix: APEv1 tags would generate error messages + * Bugfix: APE tags would sometimes show phantom second entry for + each item (title, artist, etc) with no data + * Bugfix: APE tag writing was not UTF8-encoding the data - + non-ASCII characters (above chr(127)) were being incorrectly + stored (thanks ahØartemis*dk) + * Bugfix: getid3.demo.scandir.php had undefined function error + * Bugfix: getid3.demo.scandir.php would not display list of files + with no tags + Added link to getid3.demo.check.php from list of specific-tags + files in getid3.demo.scandir.php + + +1.6.2: [May-04-2003] James Heinrich + » New official mirror site for getID3() - http://www.getid3.org + » Added basic support for SWF (Flash) (thanks n8n8Øyahoo*com) + New file: getid3.swf.php + » Added experimental support for parsing the audio portion of + MPEG-video files. I don't have any actual documentation for + this, so this part is experimental and not guaranteed accurate, + but it seems to be working OK as far as I have been able to test + it. Bug reports (or even better - documentation!) are welcome at + info@getid3.org + » Added new simple directory-scanning sample file + New file: getid3.demo.simple.php + » getid3.demo.write.php now writes APE tags as well. + ¤ Renamed getid3.write.php to getid3.demo.write.php + ¤ Renamed audioinfo.class.php to getid3.demo.audioinfo.class.php + ¤ getid3.php now automatically includes the getid3.functions.php + function library file, no need to include it seperately. + ¤ getLyrics3Filepointer() has been changed to be consistant with + all the other similar function structures - the parameters have + changed. The old function has been renamed to getLyrics3Data() + ¤ Added DeleteAPEtag() function to getid3.ape.php + ¤ HandleID3v1Tag() now only handles ID3v1. Lyrics3 processing is + now done by HandleLyrics3Tag() + ¤ If BitrateHistogram is enabled in getOnlyMPEGaudioInfo() it now + also returns ['mpeg']['audio']['version_distribution'] showing + the number of frames of each MPEG version (1, 2 or 2.5) - all + frames *should* be of the same MPEG version + ¤ getID3v1Filepointer() always returns TRUE now, even if it didn't + find a valid ID3v1 tag + ¤ getOnlyMPEGaudioInfo() now looks for MPEG sync in the first 128k + bytes rather than the first 64k bytes + ¤ Added dummy function GetAllMP3info() to generate warning not to + use that deprecated function. + ¤ ['video']['codec'] is now 'MPEG' for all MPEG video files (this + will change to 'MPEG-1' or 'MPEG-2' as soon as I figure out how + to determine that) (thanks jigalØspill*nl) + ¤ ['mpeg']['audio']['LAME']['mp3_gain'] renamed to + ['mpeg']['audio']['LAME']['mp3_gain_db'] (gain in dB) + ¤ Added ['mpeg']['audio']['LAME']['mp3_gain_factor'] (gain as a + multiplication factor) + ¤ Added support for Preset and Surround Info bytes from LAME VBR + tag (http://gabriel.mp3-tech.org/mp3infotag.html) + * Bugfix: APE tag writing would put the string 'Array' for all + values rather than the actual data (thanks ahØartemis*dk) + * Bugfix: Warning now generated for VBR MPEG-video files because + getID3() cannot determine average bitrate. If you know of + documentation that would tell me how to do this, please email + info@getid3.org + * Bugfix: Replay Gain values from Vorbis comments are now + returned in ['replay_gain'] (and not in ['comments']) + (thanks ahØartemis*dk) + * Bugfix: Replay Gain values from APE comments are now correctly + returned in ['replay_gain'] (thanks ahØartemis*dk) + * Bugfix: getid3.demo.check.php is now case-insensitive when + assuming a format for a corrupted file if standard detection + does not identify the file type. + * Bugfix: RIFF comments were overwriting/suppressing ID3 comments + for RIFF-MP3 files (thanks wmØwofuer*com) + * Bugfix: RIFF-MP3 files with 'RMP3' chunks instead of 'WAVE' were + not being correctly identified. + * Bugfix: ID3v2 padding shorter than the length of an ID3v2 frame + header was not correctly detected + * Bugfix: getid3.demo.check.php now does in-depth scanning for MP2 + and MP1 files the same as for MP3 files based on file extension + if a MPEG-audio structure isn't found immediately at the start + of the file + * Bugfix: removed condition where RIFF-WAV was being scanned for + MPEG-audio signature when it shouldn't be present (non-MP3 WAV) + * Bugfix: ASF files were not always showing correct audio datatype + * Bugfix: array_merge_clobber() and array_merge_noclobber() were + not being conditionally defined in getid3.functions.php + (thanks rich.martinØreden-anders*com) + * Bugfix: stream_numbers was not being correctly returned in + bitrate_mutual_exclusion_object chunks of ASF files + * Bugfix: Added support for 24kHz and 12kHz audio in ASF files + * Bugfix: Removed possible undefined offset error in MP3s where + cannot find synch before end of file + * Bugfix: Removed potential out-of-memory crash situation when + parsing Real files with chunks larger than the available memory + (thanks jigalØspill*nl) + * Bugfix: ID3v1 was incorrectly taking precedence over ID3v2 in + the ['comments'] array (thanks lionelflØwanadoo*fr) + * Bugfix: No longer calculates overall bitrate and playtime for + VBR MPEG video files based on the audio bitrate. + * Bugfix: AssumeFormat was not working properly + Added summary footer line to getid3.demo.check.php + Added '.mpeg' to the list of assume-format-from-filenames list in + getid3.demo.check.php + MPEG-video files now more reliably detected + A number of additional features have been added to + getid3.demo.scandir.php + Added many RIFF-AVI audio types and fourcc video types to the + lookup functions in getid3.riff.php + Now identifes files with Lyrics3 v1 tags that are of incorrect + length (v1 Lyrics3 is supposed to be 5100 bytes long, but + [unknown program] writes variable-length tags (which is illegal + for Lyrics3 v1)). getID3() now correctly parses these tags and + issues a warning. + Split GetFileFormat() to GetFileFormat() and GetFileFormatArray() + HTML colors in getid3.demo.check.php are now defined as constant + variables at the top of the file (if you want to change them) + Added support for OptimFROG v4.50x (non-alpha) (new header fields) + (thanks floringhidoØyahoo*com) + Added support for Lossless Audio v0.4 (thanks mikeØbevin*de) + + +1.6.1: [March-03-2003] James Heinrich + » Added support for writing APE v2. + WriteAPEtag() in getid3.ape.php + NOTE: APE v1 writing support will *not* be added to future + versions of getID3() + (thanks ahØartemis*dk and adamØphysco*com for the idea) + » Added support for AIFF (Audio Interchange File Format) including + AIFF, AIFC and 8SVX (thanks ahØartemis*dk for the idea) + Removed file: getid3.aiff.php + » Added support for OptimFROG (v4.50a and v4.2x) + (thanks ahØartemis*dk for the idea) + New file: getid3.optimfrog.php + » Added support for WavPack (thanks ahØartemis*dk for the idea) + » Added support for LPAC (thanks ahØartemis*dk for the idea) + » Added support for NeXT/Sun .au format + New file: getid3.au.php + » Added support for Creative SoundBlaster VOC format + New file: getid3.voc.php + » Added support for the BWF (Broadcast Wave File) RIFF chunks + "bext" and "MEXT" (thanks Ryan and njhØsurgeradio*co*uk) + » Added support for the CART (Broadcast Wave File) RIFF chunks + (thanks Ryan) + » Added getid3.demo.scandir.php - a sample recursive scanning demo + that scans every file in a given directory, and all sub- + directories, and stores the resulting data in MySQL database, + and then displays a list of duplicate files based on md5_data + ¤ ['md5_data_source'] now contains the MD5 value for the original + uncompressed data for formats that store that information + (currently only FLAC v0.5+). ['md5_data'] (if chosen to be + calculated) will contain the calculated MD5 value for the + compressed file. To check if 2 files are identical in every way, + including all comments: compare ['md5_file']. To check if two + files were compressed from the same source file: compare + ['md5_data_source']. To check if the compressed audio/video data + of two files is identical, even if comments or even the + container file format is different (MP3 in RIFF container, + FLAC in Ogg container, etc): compare ['md5_data']. + ¤ ['md5_data'] for 8-bit WAV files is now calculated based on a + converted version of the data from unsigned to signed (MSB + inverted) to match the MD5 value calculated by FLAC + ¤ New optional parameter added to GetAllFileInfo() - + $MD5dataIfMD5SourceKnown (default: false). If false the md5_data + value will NOT be calculated for files (such as FLAC) that have + ['md5_data_source'] set, even if $MD5data == true. + (thanks ahØartemis*dk) + ¤ getid3.check.php renamed to getid3.demo.check.php + ¤ Added GetTagOnly() function to getid3.php - similar to + GetAllFileInfo() except only takes a filename as a parameter and + only returns ID3v2, APE, Lyrics3 and ID3v1 tag information - no + attempt is made to parse the data contents of the file at all. + (thanks Phil for the idea) + ¤ Added ['audio']['lossless'] and ['video']['lossless'] for all + formats (when known). Both are boolean values - true means the + data is lossless-compressed, false means the data is lossy- + compressed. + ¤ Added ['audio']['compression_ratio'] and/or + ['video']['compression_ratio'] for all formats. Returns a number + (usually) less than 1, where 1 represents no compression and 0.5 + represents a compressed file half the size of the original file + ¤ Added ['video']['bits_per_sample'] to all video formats (when + known) + ¤ Added ['video']['frame_rate'] to all video formats (when known) + ¤ ['fileformat'] set to 'mp1' or 'mp2' instead of 'mp3' when + ['audio']['dataformat'] is one of those (thanks ahØartemis*dk) + ¤ Added 4th parameter to md5_data(), $invertsign, which will invert + the MSB of each byte before MD5'ing. This is needed for 8-bit + WAV files because FLAC calculates the stored MD5 value on + signed data rather than the original byte values. ['md5_data'] + of an 8-bit WAV will now match the ['md5_data_source'] value + (thanks lichvarmØphoenix*inf*upol*cz) + ¤ ['ape']['items']['data'] and ['ape']['items']['data_ascii'] now + contains an array of values, if the tag contains UTF-8 text (as + opposed to binary data) + ¤ ['mpeg']['audio']['bitratemode'] renamed to + ['mpeg']['audio']['bitrate_mode'] + * Bugfix: Removed potential bug that could replace all MP3 file + contents with only the new ID3v2 tag in getid3.putid3.php + * Bugfix: md5_data values calculated for RIFF (WAV, AVI) files + were incorrect (thanks ahØartemis*dk) + * Bugfix: MP3 data in an MP4 wrapper fileformat could not identify + bitrate (thanks ahØartemis*dk) + * Bugfix: ['audio'] and/or ['video'] keys would sometimes get + removed even if not empty + * Bugfix: Prevented creation of null entries in + ['RIFF']['WAVE']['INFO'] if a comment entry was not present + * Bugfix: Potential infinite-loop condition in getid3.ogg.php + (thanks afshin.behniaØsbcglobal*net) + * Bugfix: Ogg files with illegal ID3v1 (and/or APE or Lyrics3) + tags were not finding the last Ogg page + (thanks afshin.behniaØsbcglobal*net) + * Bugfix: replay-gain values not properly set from LAME tag + * Bugfix: RIFF-MP3 had incorrect md5_data + * Bugfix: the LAME DLL CBR problem of not re-writing the LAME + frame at the beginning of the data is now detected for MP3s + with ID3v2 tags as well + * Bugfix: APE tags with multiple values (ie multiple entries in + the "artist" tag) are now shown properly in ['ape']['items'] + * Bugfix: fixed condition where APE tag with no ID3v1 tag could be + mistaken for APE tag with ID3v1 (and incorrectly parsed) + * Bugfix: added warning if ID3v2 frame has zero-length data + (thanks cmassetØclubinternet*fr) + * Bugfix: getid3.frames.php looking for non-existant key in USER + frames + Improved detection of RIFF-MP3 data. [unknown program] encodes + RIFF-WAV data with a chunk name of 'RMP3' instead of the + standard 'RIFF' + Encoder now returned in both ['comments'] and ['audio']['encoder'] + for RIFF-WAV files with an INFO.ISFT chunk + Generate a warning for FLAC files encoded with v0.3 or v0.4 + because audio_signature is not calculated during encoding + (thanks ahØartemis*dk) + Modified getid3.check.php to display md5_data_source as well as + md5_file and md5_data if display-MD5 mode is selected + Modified getid3.check.php to assume-format based on file extension + in browse mode if fileformat is found to be 'id3' (formerly only + if the fileformat was null) + Changed scaling of BitrateColor() from representing 1-256kbps to + representing 1-768kbps for better display of high-bitrate files, + specifically lossless-compressed CD-audio (FLAC, LA, etc) + + +1.6.0: [January-30-2003] James Heinrich + » Added support for OggFLAC (FLAC data stored in an Ogg container) + (thanks ahØartemis*dk for the idea) + » Added support for Speex (the data stored in an Ogg container) + » Comments are now available in the root 2-dimensional array + ['comments'] - each entry in this array will contain one or more + strings. For example, if there are two artists then + ['comments']['artist'][0] will contain the first one and + ['comments']['artist'][1] the other. All keys are forced + lowercase. Comments will be stored in the ['comments'] array in + this order of precedence: + 1) Native format tags (ASF, VQF, NSV, RIFF, Quicktime, Vorbis) + 2) APE tags + 3) ID3v2 + 4) Lyrics3 + 5) ID3v1 + Lower-priority tags will not overwrite or append existing values + of higher-priority tags (for example, 'artist' in ID3v1 will be + ignored if already specified in APE), but missing values will be + filled in (for example, if 'album' is specified in ID3v2 but not + in APE, it will be included in the ['comments'] array). + Note: Root keys (['title'], ['artist'], etc) are NOT available + in this or future versions of getID3(). + (thanks ahØartemis*dk) + » MD5 hashes are now available for all formats for both the entire + file (['md5_file']) and the portion of the file containing only + the audio/video data, stripped of all prepended/appended tags + like ID3v2, ID3v1, APE, etc - ['md5_data'] + (thanks ahØartemis*dk for alternate md5_file() function that + runs on UNIX system running PHP < 4.2.0) + NOTE: Ogg files require the use of vorbiscomment to obtain the + md5_data value. vorbiscomment must be downloaded from + http://www.vorbis.com/download.psp and placed in the getID3() + directory. All Ogg formats (Vorbis, OggFLAC, Speex) are affected + by this problem, but only OggVorbis files can be processed with + vorbiscomment. OggFLAC and Speex files will be processed by + getID3(), but this may result in an incorrect value for md5_data + in the event that VorbisComments are larger than 1 page (4-8kB). + NOTE: md5_data for Ogg will not work if PHP is running in Safe + Mode + » There is now a wrapper class available, written by Allan Hansen, + which should simplify extracting most common basic information + (such as format, bitrate, comments). + New file: audioinfo.class.php + » OggWrite() in getid3.ogginfo.php has been replaced with a new + version that uses vorbiscomment to write the comments, because + of a reported bug that can corrupt OggVorbis files such they + cannot be played. + NOTE: Ogg comment writing now requires the use of vorbiscomment + which must be downloaded from http://www.vorbis.com/download.psp + and placed in the getID3() directory. + NOTE: Ogg comment writing will not work if PHP is running in + Safe Mode + ¤ New root key ['tags'] is now always returned for all formats. + It is an array that may contain any of: + * Native format tags: 'vqf', 'riff', 'vorbiscomment', 'asf', + 'nsv', 'real', 'midi', 'zip', 'quicktime' + * Appended data tags: 'ape', 'lyrics3', 'id3v2', 'id3v1' + ¤ New root key ['audio'] is an array containing any or all of: + codec, channels, channelmode, bitrate, bits_per_sample, + dataformat, bitrate_mode, sample_rate, encoder + Note: This replaces several root keys, including: + bitrate_audio, bits_per_sample, frequency, channels + ¤ New root key ['video'] is an array containing any or all of: + bitrate_mode, bitrate, codec, resolution_x, resolution_y, + resolution_y, frame_rate, encoder + Note: This replaces several root keys, including: + bitrate_video, resolution_x, resolution_y, frame_rate + ¤ ['id3']['id3v1'] has moved to ['id3v1'] + ¤ ['id3']['id3v2'] has moved to ['id3v2'] + ¤ ['audiodataoffset'] and ['audiodataend'] have been renamed to + ['avdataoffset'] and ['avdataend'] respectively + ¤ GetAllMP3info() has been changed to GetAllFileInfo() with a + different parameter list ($allowedFormats is no longer a + parameter). Check your code where you're calling + GetAllMP3Info() - you will need to change both the function + name and the parameter list if you pass more than 2 parameters + ¤ All formats now return ['audio']['dataformat'] and/or + ['video']['dataformat'] where appropriate - this goes along with + ['fileformat'] - ['fileformat'] will return the actual structure + of the file, whereas ['dataformat'] will return the format of + the data inside that structure. For example, an Ogg file can + contain Vobis data (normal), or it can contain FLAC data in the + Ogg container format. In that case, ['fileformat'] would be + 'ogg', but ['dataformat'] would be 'flac'. + Note: this means that WAV and AVI files now return a + ['fileformat'] of 'riff' rather than 'wav' or 'avi'. + ¤ ['filesize'] is no longer returned for files larger than 2GB + because PHP does not support large file access. Attempting to + parse a file larger than 2GB will result in a message stored in + ['error'] and ['filesize'] not set. + ¤ APEtag, ID3v1, and ID3v2 are now supported on ALL multimedia + files - even if illegal by format. Ogg will return warning if + ID3/APE tags are present. (thanks ahØartemis*dk) + ¤ All files: non-critical errors are now returned in the root key + ['warning'] rather than ['error'] (only critical errors that + prevent getID3() from correctly parsing the file are returned in + ['error'] (thanks ahØartemis*dk) + ¤ Renamed all references to $MP3fileInfo to $ThisFileInfo + ¤ Joliet now supported for ISO-9660. + ['iso']['supplementary_volume_descriptor'] is now returned, if + available, and ['iso']['files'] will contain ASCII equivalents + of the Unicode directory structure & filenames stored. + ¤ Moved Monkey's Audio code from getid3.ape.php to seperate file. + New file: getid3.monkey.php + ¤ Added new keys for ISO-9660: ['name_ascii'] for directories, + ['file_identifier_ascii'] for files + ¤ Added root key ['track'] for CD-audio files + ¤ Ogg/Vorbis-comment files now have comments returned inside + ['ogg']['comments_common'] as an array of strings, rather than + simple strings in ['ogg'] + ¤ Quicktime files now have comments returned inside + ['quicktime']['comments'] as an array of strings, rather than + simple strings in ['quicktime'] + ¤ ['mime_type'] is a new root key returned for all supported + formats (thanks ahØartemis*dk) + ¤ ['fileformat'] now returns 'mp1' instead of 'mp3' for MPEG-1 + layer-I audio files (thanks ahØartemis*dk) + ¤ ['mpeg']['audio']['bitratemode'] now returns lowercase + ¤ MPEG-4 audio files which consist of MP3 data wrapped in a + Quicktime fileformat will now return the usual data in + ['mpeg']['audio'] + ¤ Type-1 DV AVIs are now supported + ¤ DV AVIs will return 1 or 2 in ['RIFF']['video'][x]['dv_type'] + ¤ Changed ['fileformat'] from 'mpg' to 'mpeg' for MPEG video files + ¤ ASF comments are now stored in ['asf']['comments'] instead of + ['asf'] + ¤ RealMedia chunk data is now returned inside ['real']['chunks'] + instead of ['real'] + ¤ ['replay_gain'] now properly populated from APE tags + ¤ Added support for ASF_Old_ASF_Index_Object in ASF files + (thanks ahØartemis*dk) + ¤ AAC-ADTS files now return ['aac']['bitrate_distribution'] + ¤ ParseVorbisComments() has been replaced with + ParseVorbisCommentsFilepointer() (with different parameters) + ¤ All references to any key ['frequency'] are now ['sample_rate'] + ¤ Moved ID3v2 comments from ['id3v2'] into common root + ['comments'] structure, and now returns more values than before + * Bugfix: ['iso']['files'] and ['zip']['files'] could potentially + contain duplicate entries (in a numeric-indexed array) for files + if the directory structure specifies files multiple times. + Entries are now guaranteed unique, with the last entry for the + file overwriting any former ones. + * Bugfix: RIFF parsing had numerous issues, including: + - large AVIs would take a very very long time to parse + - chunks with odd (not even) sizes would cause the parser fail + - video and/or audio codecs not always identified + The ParseRIFF() function has been completely rewritten and fixes + all known issues with RIFF parsing. Users are, however, + encouraged to double-check output of any parsed (AVI/WAV/CDDA) + files. + * Bugfix: Modified getid3.riff.php to return correct total + bitrates for AVIs with multiple audio streams + * Bugfix: GetFileFormat() was not creating array structure + correctly (thanks ahØartemis*dk) + * Bugfix: LAME tag for MP3s can only specify up to 255kbps, so any + files with actual CBR bitrate of >=256 were reported incorrectly + * Bugfix: Lyrics3 synched lyrics were not being correctly returned + * Bugfix: CreateDeepArray() was broken for non-nested cases, which + meant ZIP and ISO ['files'] structures were broken + * Bugfix: Incorrect pattern matching for ZIP files meant no zip + files were being detected as such + * Bugfix: AAC-ADIF was returning an incorrect number of channels + (too few) in some cases (thanks ahØartemis*dk) + * Bugfix: Vorbis comments were returning an incorrect value for + ['dataoffset'] in some cases + * Bugfix: MPEG video ['marker_bit'] and ['vbv_buffer_size'] were + incorrect + * Bugfix: ['playtime_string'] could potentially have a value of + x minutes and 60 seconds (ie 3:60 instead of 4:00) + Added support for FLAC cuesheets (FLAC 1.1.0+) + (thanks ahØartemis*dk) + Improved parsing speed in MP3, MP2 and AAC (thanks ahØartemis*dk) + Extra error-checking added to try and identify corrupt files for + most audio formats (thanks ahØartemis*dk) + More accurate playtime calculation for RealMedia + (thanks ahØartemis*dk) + Changed all relevant files to use ['audiodataoffset'] and + ['audiodataend'] rather than ['filesize'] where appropriate + (thanks ahØartemis*dk) + Added text encoding type 255 as a duplicate of UTF-16BE but with + Big-Endian rather than Little-Endian byte order + Added many RIFF-AVI audio types and fourcc video types to the + lookup functions in getid3.riff.php + Added numerous new known GUIDs to getid3.asf.php + Added PoweredBygetID3() function to easily get a "powered by" + string with the current getID3() version. + Added "Morgan Multimedia Motion JPEG2000" (MJ2C), "DivX v5" (DX50) + and "XviD" (XVID) codecs to list of known codecs in + getid3.riff.php + Changed GETID3_INCLUDEPATH path seperators to forced / + (from \ for Windows) + Modified getid3.check.php to only change \ directory seperators to + / on Windows operating systems + Modified getid3.check.php to handle larger-than-2GB files (which + now do not return a filesize) + Modified getid3.check.php to handle ['dataformat_audio'] and + ['dataformat_video'] + Modified getid3.check.php to show a list of present tags in one + column rather than one column for each of ID3v1, ID3v2, etc + Modified getid3.check.php to show MD5 values. Initially disabled + but can be enabled for a directory with a click. md5_file is + always calculated when displaying detailed info about a single + file; md5_data is calculated if the file is < 50MB + Modified getid3.check.php to show errors and warnings. Details are + visible with a mouseover or a click. + Changed getid3.check.php to use SafeStripSlashes instead of a + manual conditional directory name replacement for special + characters + Added sample recursive scanning sample code to getid3.readme.txt + (thanks lipisinØmail*ru for the idea) + + +1.5.7: [January-10-2003] James Heinrich + » Added support for ISO 9660 (CD-ROM image) format. Most-useful + data is directory structure returned under ['iso']['files'] + Note: Only ISO-9660 supported, not (yet) Joliet extension + (thanks nebula_djØsofthome*net for the idea) + New file: getid3.iso.php + ¤ ZIP files are now parsed by getID3() itself without relying on + built-in PHP functions and/or ZZipLib support. + (thanks Vince for the idea) + ¤ ZIP files now return a simple directory listing with filename + and filesize info only under ['zip']['files']. + Note: empty subdirectories will note appear in here, only files + and non-empty subdirectories. Information for all entries, + including empty subdirectories, is available under + ['zip']['central_directory'] (or under ['zip']['entries'] if the + Central Directory cannot be located (usually due to a trucated + file). + ¤ RIFF-WAV files with MP3 data (or MP3s with RIFF headers, if you + want to think of it that way) now have the MPEG audio portion + scanned and the usual data returned in ['mpeg']['audio'] if the + RIFF audio codec has wFormatTag of "85" (identified by getID3() + as "MPEG Layer 3") + (thanks ahØartemis*dk for the idea) + ¤ EXIF data (if present) is returned for JPEG files under + ['jpg']['exif'] (thanks nebula_djØsofthome*net) + ¤ ['filepath'] now returned for all files with the directory part + of the full filename. + ¤ ['filenamepath'] is now returned for all files (equivalent to + ['filepath'].'/'.['filename']) + * Bugfix: ['id3']['id3v2'][]['dataoffset'] was wrong + * Bugfix: MP3s tagged with iTunes have an invalid comment field + frame name ('COM ' - should be 'COMM') but the data is valid + otherwise; the frame is now renamed to 'COMM' and parsed + normally (with the error noted in ['error']) + (thanks kheller2Ømac*com for the sample file) + * Bugfix: Some ASF/WMA audio files were not being identified as + any format (thanks ahØartemis*dk) + * Bugfix: Warning now generated and ASCII format assumed for + invalid text encoding values in ID3v2 + * Bugfix: Changed ZIP detection pattern from 'PK' to 'PK\x04\x03' + * Bugfix: Ogg/FLAC files with large Vorbis comments were dying in + an infinite loop with lots of error messages due to missing $fd + parameter on ParseVorbisComments() (thanks ahØartemis*dk) + * Bugfix: ['data'] and ['image_mime'] were being returned for all + Ogg comments even if they were not images for versions of PHP + that have image_type_to_mime_type() built in (ie PHP 4.3.0+) + + +1.5.6: [December-31-2002] James Heinrich + » Added support for NSV (Nullsoft Streaming Video) + (www.nullsoft.com/nsv/) + (thanks demonØsoundplanet*com for the idea) + New file: getid3.nsv.php + » Added support for CD-audio track files (track01.cda etc) + ¤ Added standard ['frame_rate'] root value when known (AVI, NSV, + MPEG-video) + ¤ ASF files now report ['fileformat'] of: + 'wmv' when Windows Media Video codec v7/v8/v9 is used; + 'wma' when any 'Windows Media Audio' named audio codec is used + and no video stream is present; + 'asf' in all other cases (audio-only, video-only, or both) + ¤ Removed support for ZIP functions (will be rewritten to not + require ZZIPlib support in future versions) + ¤ Added function SafeStripSlashes() as a drop-in replacement for + stripslashes(), but that only strips slashes if magic_quotes_gpc + is set + ¤ Removed support for remote file scanning (HTTP / FTP) + ¤ Added ['aac']['frames'] (number of AAC frames in file) + ¤ Added ['mpeg']['audio']['frame_count'] when a bitrate histogram + is created + ¤ Average bitrate for VBR MP3/MP2 is calculated from actual counts + of frames of various bitrates (rather than relying on the header + values or filesize) when a bitrate histogram is created + ¤ RecursiveFrameScanning() split out into seperate function + (getid3.mp3.php) + ¤ Removed old function getMP3header() from getid3.mp3.php + ¤ Changed default MPEG_VALID_CHECK_FRAMES (number of mp3 frames + scanned to ensure a valid audio sequence has been located) from + 10 to 25. This means scanning will be slightly slower, but more + reliable/accurate + * Bugfix: ID3v2.2 - valid frame names not correctly detected + (thanks maeckerØweb*de for the sample file) + * Bugfix: ID3v2.2 - valid padding not correctly detected + (thanks maeckerØweb*de for the sample file) + * Bugfix: MIDI files with flat key signatures were not being + correctly reported (thanks alexleeisØshaw*ca for sample file) + * Bugfix: now returns message in ['error'] if file does not exist + * Bugfix: ['RIFF']['video'][x]['codec'] wasn't always being + correctly populated + * Bugfix: ['bitrate'] was incorrect for multi-stream RealMedia + * Bugfix: ['playtime_seconds'] was sometimes null or incorrect + for multi-stream RealMedia + * Bugfix: ChannelTypeID was incorrect in RVA2 ID3v2.4 frames + * Bugfix: Fixed potential divide-by-zero error for corrupt FLAC + files (thanks ahØartemis*dk) + * Bugfix: AAC-ADTS was not returning ['bitrate_mode'] unless + $ReturnExtendedInfo was TRUE (thanks ahØartemis*dk) + * Bugfix: LAME-encoded CBR MP3s now properly identified as CBR + with correct bitrate (thanks ahØartemis*dk) + * Bugfix: VBR MP2 (or headerless MP3) is now identified as VBR + rather than CBR. Note: to obtain VBR bitrate for headerless + files, the entire file is scanned and a histogram distribution + of bitrates is created, and the average bitrate calculated from + that. (thanks ahØartemis*dk for sample file) + Added support for DSIZ chunks in VQF, and checks to make sure size + of audio data matches DSIZ value, if present + (thanks ahØartemis*dk for sample file) + Rewrote GetAllMP3info() - removed some unneccesary code, changed + format-detection routine from ParseAsThisFormat() to + GetFileFormat() to allow for more flexible format parsing + (needed for ISO CD-ROM images, helpful for Quicktime and others) + Changed references in all files from string-cast indexes: ["$i"] + to non-cast indexes: [$i] where appropriate + Put a sans-serif 9pt style on all text in getid3.check.php + getAACADTSheaderFilepointer() now return TRUE if synch is lost + after the first frame has been successfully parsed (previously + it would return FALSE if synch was lost at any time, meaning the + file is most likely MP3, which was incorrect) + (thanks ahØartemis*dk for sample file) + Speed improvement code changes to getid3.mp3.php (up to 24% faster + in some cases) (thanks ahØartemis*dk for the code) + Changed all include_once() to require_once() + + +1.5.5: [November-25-2002] James Heinrich + » Added support for La (Lossless Audio - www.lossless-audio.com) + (thanks ahØartemis*dk for the idea) + New file: getid3.la.php + ¤ Moved lookup functions from getid3.lookup.php to the files where + they are used. + New file: getid3.id3.php + New file: getid3.rgad.php + Removed file: getid3.lookup.php + ¤ getID3v1Filepointer() returns FALSE if ID3v1 tag not found + ¤ Added new paramter "ReturnExtendedInfo" to the function + getAACADTSheaderFilepointer() in getid3.aac.php which now + defaults to FALSE - if TRUE then the data for every frame is + returned (containing aac_frame_length, adts_buffer_fullness and + num_raw_data_blocks, which aren't usually very useful). Speed + improvement with FALSE is about 35%. + ¤ Now returns fopen() errors in ['error'], for example if a remote + file is not accessible. + ¤ Changed default number of MP3 audio frames to scan to determine + if a valid stream has been found from 5 to 10, now also defined + as a constant at the top of getid3.mp3.php This will result in + slightly slower MP3 parsing, but greater reliability in + detecting false/invalid/corrupted VBR headers. + ¤ fopen() errors now displayed in getid3.putid3.php + (thanks miguel.dieckmannØhamburg*de) + ¤ Added 4th parameter to decodeMPEGaudioHeader() $ScanAsCBR which + will force an MP3 audio frame sequence to be force-scanned in + CBR mode. You should never need to call this directly, it's only + used internally to scan for MP3 files that have an illegal VBR + header with CBR data. (thanks fletchØpobox*com) + * Bugfix: ASF_Marker_Object in getid3.asf.php was always returning + an error in non-existant "reserved_1" and failing + * Bugfix: VBR bitrate calculations in getid3.mp3.php only occur if + ['mpeg']['audio']['VBR_frames'] is defined. + (thanks fletchØpobox*com) + * Bugfix: getid3.putid3.php no longer deletes original MP3 if + ID3v2 tag writing fails (thanks miguel*dieckmannØhamburg*de) + * Bugfix: incorrect order of if-statement error messages in + getid3.putid3.php (thanks miguel*dieckmannØhamburg*de) + getid3.asf.php now notes the error and continues parsing rather + than failing when it encounters an error parsing a chunk + Now actually scan 1000 frames for AAC ADTS as reported in the + v1.5.4 changelog, rather than 100. (thanks ahØartemis*dk) + Improved scanning speed in getAACADTSheaderFilepointer() by ~30% + (thanks ahØartemis*dk for the fix) + Added FileSizeNiceDisplay() function to getid3.functions.php for + formatting filesize output in kB, MB, GB, etc. + + +1.5.4: [October-07-2002] James Heinrich + » Added support for Quicktime. + New file: getid3.quicktime.php + » Added support for AAC files, both ADTS and ADIF header formats. + ADIF format is a pain because it's very similar to standard MP3 + header format, and it's hard to distinguish between the two. I + have tried to make the detection accurate, but I have a limited + number of AAC test files to play with so if you have an AAC file + that gets detected as MP3/MP2 (or vice-versa), please send me + the details via email at infoØgetid3Øorg + ADTS format is very slow to parse because to get the bitrate of + VBR files the whole file has to be stepped through frame by + frame (getID3() scans up to the first 1000 frames and assumes + that to be close enough). + Note: I would suggest commenting out support for AAC (see top of + GetAllMP3info() function in getid3.php) unless you need it. + (thanks jfaulØgmx*de for the idea and sample Delphi source code) + New file: getid3.aac.php + » Added bitrate distribution analysis option for MP3 VBR files. A + new boolean parameter for getOnlyMPEGaudioInfo() enabled this + feature which steps through the MP3 file frame by frame and + counts how many frames of each bitrate exist. This information + is returned in ['mpeg']['audio']['bitrate_distribution'] + Caution: this feature is very inefficient for large files and + takes a very long time and does lots of disk I/O. Use with care. + ¤ Changed layout of allowedFormats in GetAllMP3info() function in + getid3.php to allow easy removal of support for any of the + supported format. As stated above, I recommend commenting out + AAC unless needed. + ¤ Added ['flac']['compressed_audio_bytes'], + ['flac']['uncompressed_audio_bytes'], and + ['flac']['compression_ratio'] + ¤ Replaced FXPT2DOT30toFloat() function with FixedPoint2_30() + * Bugfix: getid3.mpc.php was slightly miscalculating the number of + samples, therefore also bitrate and playtime + (thanks ahØartemis*dk for the fix) + * Bugfix: MonkeyCompressionLevelNameLookup() didn't know about + 'insane' compression (thanks ahØartemis*dk for the fix) + * Bugfix: MonkeySamplesPerFrame() was incorrect for MAC v3.95+ + (thanks ahØartemis*dk for the fix) + * Bugfix: getid3.check.php wasn't processing the assumeFormat + directive when (register_globals == off) + * Bugfix: detecting of synch pattern for MP3 files with invalid + data at the beginning wasn't always correct, also meant possible + incorrect bitrate/duration/etc info for such corrupt files. + getid3.functions.php now includes a replacement utf8_decode() + function for those PHP installations that are not configured + with the --with-xml option. (thanks stephaneØtekartists*com) + + +1.5.3: [September-30-2002] James Heinrich + » Added support for VQF. (thanks mtØmansonthomas*com for the idea) + New file: getid3.vqf.php + » Added support for FLAC. Comments, if present, are returned under + ['ogg'] because they follow the Ogg Vorbis structure standard. + New file: getid3.flac.php + ¤ OS/2-format bitmaps are now correctly interpreted. The format of + the bitmap is now returned in ['bmp']['type_os'] and + ['bmp']['type_version']. OS/2 bitmaps can be v1 or v2, Windows + can be v1, v4 or v5 + + +1.5.2: [September-25-2002] James Heinrich + » Support for RealMedia (audio & video) added + Note: only tested on G2 and v5 audio and video files - if anyone + has older and/or newer sample files, please test it and/or send + me the sample files. + (thanks stephaneØtekartists*com for idea) + New file: getid3.real.php + » Support for BMP added. Palette and pixel data can optionally be + extracted as well - this is slow and generally unneccesary, but + the option is there if you need it. Also includes PlotBMP() + which will take the extracted pixel data and output it as a true + color PNG. This function requires GD v2.0+ + Note: Untested on 16-bit and 32-bit BMPs because I couldn't find + any sample files - if you know of a program that can create such + files, please email infoØgetid3Øorg + Note: Support for RGB (uncompressed), RLE8 and RLE4 is included + and tested. BITFIELDS support is also included for 16- & 32-bit + formats, but it's untested, so if anybody has any test files + please send them to infoØgetid3Øorg + Note: Support currently only for Windows-format BMPs, and trying + to parse an OS/2-format bitmap leads to unpredictable/invalid + results. + New file: getid3.bmp.php + » PNG now fully parsed, including all information chunks + New file: getid3.png.php + ¤ Support for GIF/JPG/PNG moved to seperate files and expanded, + including standard ['resolution_x'] and ['resolution_y'] as well + as more thorough parsing of header information + New file: getid3.gif.php + New file: getid3.jpg.php + table_var_dump() simplified and now outputs {-style character + entities for characters outside the normal alphanumeric range + CleanOggCommentName() changed to a regular expression + (thanks chris-getid3Øbolt*cx for rewriting the function) + + +1.5.1: [September-20-2002] James Heinrich + » Added support for MPEGplus/Musepack SV7. ['fileformat'] is 'SV7' + for version 7 files (versions 4, 5 ,6 and 8 are not supported + yet, but will be of ['fileformat'] SV4, SV5, SV6 and SV8) when + they are supported (thanks Christian Fritz for the idea) + New file: getid3.mpc.php + ¤ ['bitrate_audio'], ['bitrate_video'], ['bitrate_mode'], + ['channels'], ['resolution_x'], and ['resolution_y'] keys added + for all appropriate formats + ¤ Ogg files with a COVERART comment now save and display the + attached image the same way as is done with ID3v2 APICs + ¤ ['ogg']['comments'][n]['data'] and + ['ogg']['comments'][n]['dataoffset'] is now returned for all + comments. ['ogg']['comments'][n]['data'] is only useful if + the field is supposed to contain binary data. It is a + base64_decode()'d version of ['value']. + ['ogg']['comments'][n]['dataoffset'] is the byte offset in the + file at which the 'COMMENTNAME=value string' starts, not the + start of just 'value' + ¤ ['ogg']['comments'][n]['image_mime'] is now returned if + ['ogg']['comments'][n]['data'] contains valid image data. + ¤ More than 3 Ogg pages may now be read in, if the comment data + is longer than 1 page (usually about 4kB) + ¤ ['fileformat'] is now 'mp2' rather than 'mp3' if it's MPEG-1, + Layer-II audio + ¤ ASF bitrates now calculated even if stream_bitrate_properties + object not present + ¤ ['asf']['stream_properties_object'] is now a numeric-key array + with one entry for each stream - the key being the stream number + ¤ ['replay_gain'] is returned for all audio formats that support + it (MP3-LAME, ID3v2, Ogg) (thanks Christian Fritz for the idea) + ¤ ['mpeg']['audio']['LAME']['RGAD']['radio_replay_gain'] is now + ['mpeg']['audio']['LAME']['RGAD']['radio'] (same for audiophile) + ¤ ASF/WMA files now use WM/Track to get track number from if + WM/TrackNumber is not available (thanks stephaneØtekartists*com) + ¤ ASF/WMV files now returns ['year'] and ['asf']['year'] + ¤ ASV/WMV files now use ['content_description']['description'] for + the ['comment'] field (thanks stephaneØtekartists*com) + ¤ ['track'] is now always returned as an integer + * Bugfix: Ogg comments that are larger than one data page (usually + about 4kB) are now correctly parsed (thanks Christian Fritz) + * Bugfix: Ogg comment data is now UTF8-decoded + * Bugfix: Ogg comment writing now UTF8-encodes the data + * Bugfix: playtime for ASF files was off by (usually + between 3 and 12 seconds) + * Bugfix: ['asf']['stream_properties_objects']['flags'] data was + possibly incorrect + * Bugfix: ASF Padding Object was overwriting + Stream Bitrate Properties Object data (now returned correctly in + ['asf']['padding_object'] + * Bugfix: ASF Marker Object Reserved_2 field was incorrect + * Bugfix: ASF Bitrate Mutual Exclusion Object had incorrect stream + numbers + Warning displayed if incorrectly-formatted Ogg comment is present + (known to be an issue with CDex v1.40, but fixed by v1.50b7) + (thanks Christian Fritz) + Ogg comment writing now checks for valid comment names + Added bitrate column in getid3.check.php, and added some formatting + (font, colour) + Performance tweaks using bitwise math instead of binary string + operations + + +1.5.0: [September-18-2002] James Heinrich + » Ogg comment writing support added. getid3.write.php has been + updated to allow for writing comment tags to both MP3 and Ogg. + Big thanks to Chris Bolt for writing the + OggWrite() function and offering it for inclusion in getID3() + New file: getid3.ogginfo.php + » Support for Monkey's Audio and APE tag added. + (thanks Christian Fritz for the idea) + New file: getid3.ape.php + ['fileformat'] now returns 'mac' for Monkey's Audio files, or + 'ape' for files with an APE tag (Monkey's Audio or other format) + » getid3.thumbnail.php has been removed from the distribution and + the table_var_dump() function now outputs APICs as seperate + files in the same directory as the analyzed file. This should + make the image-displaying more reliable as well as reduce + complexity. The naming convention for the images is + filename.ext.[byte offset of APIC data].[jpg|gif|png] + If anybody still has any problems with corrupted images please + let me know at infoØgetid3Øorg + » Support for extended Xing/LAME tag + (see http://users.belgacom.net/gc247244/extra/tag.html) + Data is returned in ['mpeg']['audio']['LAME'] + ¤ ['ogg']['tracknumber'] has been renamed to ['ogg']['track'] and + ['track'] is now returned in the root of the array + ¤ ['ogg']['pageheader'][n]['flag'] has been renamed to + ['ogg']['pageheader'][n]['flags'] and the unprocessed flag byte + is available in ['ogg']['pageheader'][n]['flags_raw'] + ¤ ['frequency'] is now returned for WAVE files in the root of the + array (thanks danielØelectroteque*org) + ¤ ASF files now return codec, bitrate, resolution, etc information + under ['asf']['video_media'] or ['asf']['audio_media'] + * Bugfix: RVA2 and EQU2 writing in getid3.putid3.php were + incorrectly writing Volume Adjustment field + * Bugfix: EQU2 in getid3.frames.php was reading Volume Adjustment + as unsigned integer instead of signed integer + * Bugfix: handling of remote files over HTTP & FTP was broken + (thanks Vince) + * Bugfix: incorrect handling of some ASF packets + ASF/Windows Media format now more fully parsed, including Index + Objects + Added several new fourCC video codecs + + +1.4.3: [September-15-2002] James Heinrich + » Now parses ASF / WMV / WMA files + ¤ New file: getid3.asf.php + * Bugfix: RoughTranslateUnicodeToASCII() would return nothing + if didn't find a terminator it was expecting + Added FILETIMEtoUNIXtime() function (for converting 64-bit + Microsoft FILETIME timestamps, used in ASF files and elsewhere, + to UNIX Epoch timestamps) + Added GUIDtoBytestring() and BytestringToGUID() functions + + +1.4.2: [September-12-2002] James Heinrich + » getID3() now requires PHP v4.1.0 or higher because it now is + designed to work with register_globals = off and the new auto- + globals ($_GET, $_SERVER, etc). + * Bugfix: VBR MP3 files with Fraunhofer-style VBR header were not + being correctly detected in most cases + (thanks dkushnerØoddcast*com and mikeØftl*com for sample files) + * Bugfix: IsValidTextEncoding() was broken + * Bugfix: Add stripslashes($EditorFilename) to getid3.write.php + (writing was broken for files with ' or " in the filename) + (thanks mikeØftl*com and kthejoker) + * Bugfix: If there is garbage data between a valid VBR header + frame and a sequence of valid MPEG-audio frames the VBR data is + no longer discarded. (thanks to mikeØftl*com for sample + Fraunhofer-style VBR file produced with MusicMatch v7.2) + ¤ Changed variable system to work with (register_globals = off) + ¤ Moved relevant code into seperate PlaytimeString() function + ¤ Added nl2br() to table_var_dump() for cleaner output + ¤ Now returns the following keys from Fraunhofer-VBR files: + ['VBR_seek_offsets'], ['VBR_seek_offsets_stride'], + ['VBR_offsets_relative'] and ['VBR_offsets_absolute'] + ¤ Added ID3v1matchesID3v2() function and implemented in + getid3.check.php (thanks to "Guest" in the forums for the idea) + Changed amount of data read in getid3.getimagesize.php from 10kB + to entire file. (thanks mikeØftl*com) + Wrapped function_exists() checks around function definitions in + getid3.functions.php + Fixed a lot of E_WARNING and E_NOTICE situations, especially in + ID3-writing code (getid3.putid3.php, etc) + Added checks to make sure all needed data is available for writing + ID3v2 tags + + +1.4.1b5: [May-30-2002] James Heinrich + * Bugfix: Unsynchronise() was broken, now fixed + (thanks mikeØftl*com) + * Bugfix: GenerateID3v2Tag() now correctly uses non-synchsafe + integers for frame size descriptors in ID3v2.3 and ID3v2.2 + (thanks mikeØftl*com) + ¤ Added ['artist'], ['title'], etc keys to root of returned + array to provide a common place to access any returned info + from any file type. Currently gets info from ID3v1, ID3v2, + Ogg, and RIFF/WAVE. Possible returned keys are: + title, artist, album, year, genre, comment, track + ¤ Modified LookupGenre() function to search for either genre based + on numeric ID, or now reverse lookup as well + ¤ Added ['artist'], ['title'], etc keys to ['RIFF'] information + if info tags are present + Added functionality to attach a picture to the ID3v2 tag in + getid3.write.php + Sorted genres into alphabetical order (special 3 at end of list) + in getid3.write.php + Changed the comment-edit field in getid3.write.php to a multi-line +