Abstract
PHP Reader is a well documented small library written in PHP to read and write files and their information headers in an object-oriented manner. Currently supported formats are ASF (Windows Media Player files, ie WMA, WMV, etc), ID3, including both ID3v1 and ID3v2 (MPEG files, ie MP3), MPEG Audio Bit Stream (ie ABS, MP1, MP2, MP3), MPEG Program Stream (MPEG movies, and DVD and HD DVD video discs, ie MPG, MPEG, VOB, EVO), and ISO Base Media File Format (eg QuickTime, MPEG-4 and iTunes AAC files, ie QT, MOV, MP4, M4A, M4B, M4P, M4V, etc).
News
- Call for contribution: I have been thinking for some time now about how to make the library more available for everyone. Broader usage could be achieved by converting the library to a new proposal for addition to the Zend Framework.
In doing so the library would automatically get a meaningful namespace (issue 15) of Zend_Media or something similar instead of rather meaningless PhpReader. The code is already quite close to Zend coding conventions and the transformation should be relatively easy.
This is somewhat a large job, so I urge you to contribute to the project in the form of ideas, comments and help in the process of making the library part of Zend Framework.
Have a look at the current to do list, the issues list and think how to best transform this library to fit the requirements of Zend Framework. Contact me directly at sven at vollbehr dot eu using Gtalk or MSN messenger or post a comment to the groups or the issue tracker!
- 02.04.2009 I am excited to announce the next version of PHP Reader 1.7 with more than 30 000 lines of code, featuring:
- Full implementation of Microsoft Advanced Systems Format (ASF) used by Windows Media Audio (WMA), Windows Media Video (WMA) and many other file types
- Many fixes and improvements such as enhanced support for handling different file encodings
- 26.02.2009 I am pleased to announce that the project has got over 4000 downloads!
- 20.02.2009 The library API documentation is now accessible online.
- 06.12.2008 I am excited to announce the next version of PHP Reader 1.6, featuring:
- Full implementation of MPEG Audio Bit Stream (ABS, MP1, MP2, MP3) optimized for fast play duration estimation
- Partial implementation of MPEG Program Stream (MPG, VOB, EVO) used in MPEG movies, and DVD and HD DVD videos for determining play duration
- 01.12.2008 I am pleased to announce that the project has got over 2000 downloads!
Features
The table below lists the features found currently in the latest release. All the classes can also be used separately from each others. See the corresponding links to check the minimum set of required files.
| Class | Standard | Compliance | Read support | Write support | Supported file extensions |
| ASF | Advanced Systems Format (ASF) | Full implementation | | | ASF, WMA, WMV |
| ID3v1 | ID3v1.0, ID3v1.1 | Full implementation | | | MP3 |
| ID3v2 | ID3v2.3.0, ID3v2.4.0 | Full implementation (issue 8) | | | MP3 |
| MPEG_ABS | MPEG Audio Bit Stream (ISO/IEC 11172-3, ISO/IEC 13818-3) | Full implementation | | No | ABS, MP1, MP2, MP3 |
| MPEG_PS | MPEG Program Stream (ISO/IEC 11172-1, ISO/IEC 13818-1) | Partial implementation | Play duration | No | MPG, MPEG, VOB, EVO |
| ISO14496 | ISO Base Media File Format, or ISO/IEC 14496-12 | Full implementation | | No | 3GP, 3GPP, AVC, DCF, M21, M4A, M4B, M4P, M4V, MAF, MJ2, MJP, MOV, MP4, ODF, SDV, QT |
| Apple iTunes extension to ISO/IEC 14496 to support storing of file information (ILST) | Full implementation | | | ||
| ID3v2 extension to ISO/IEC 14496 to support storing of file information (ID32) | Full implementation | | | ||
| Magic | Mime Magic | Full implementation | | N/A | magic, magic.mime |
There are also couple of classes used commonly by the above classes.
More
If you need a PHP class to read file information from a format other than what is provided here, please do contact me and I will see what I can do for you. You may post comments and feature requests to the issue tracker or the forum.
If you have passion to code, and would like to share your code to the world, you are always welcome to join the project! -Sven Vollbehr