I would like to know how to get mp4 file content in php. For example: get the name of the song,the released date of song ,duration,file name,extension,artist,genre,album and size.Add then store it into a database.Please help.
You can have a lot of options like;
1. php-mp4info
A simple PHP class to read MP4 meta data from MP4 based files, such as MP4, M4V and F4V.
2. php-reader
PHP Reader is a well documented small library written in PHP to read and write media 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).
3. getID3()
getID3() is a PHP script that extracts useful information (such as ID3 tags, bitrate, playtime, etc.) from MP3s & other multimedia file formats (Ogg, WMA, WMV, ASF, WAV, AVI, AAC, VQF, FLAC, MusePack, Real, QuickTime, Monkey's Audio, MIDI and more).
4. PHP based MP4/F4V meta data reader
The MP4Info class is a simple extensible PHP class reading the MP4 container’s frames (called boxes) to get various information, namely the video duration, the video/audio codecs, the width and the height, as well as the embedded XMP meta data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With