获取mp4文件标签 [英] Get mp4 file tags

查看:166
本文介绍了获取mp4文件标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在php中获取mp4文件内容。
例如:获取歌曲的名称,歌曲的发行日期,持续时间,文件名,扩展名,艺术家,流派,专辑和大小。然后将其存储到数据库中。请帮助。

解决方案

您可以有很多选项,例如; php-mp4info



一个简单的PHP类,用于从基于MP4的文件(如MP4,M4V和F4V)中读取MP4元数据。




2。 php-reader



PHP Reader是一个用PHP编写的小型库,用于以面向对象的方式读取和写入媒体文件及其信息头。当前支持的格式是ASF(Windows Media Player文件,即WMA,WMV等),ID3,包括ID3v1和ID3v2(MPEG文件,即MP3),MPEG音频比特流(即ABS,MP1,MP2,MP3),MPEG节目流(MPEG电影,以及DVD和HD DVD视频光盘,即MPG,MPEG,VOB,EVO)和ISO基本媒体文件格式(例如QuickTime,MPEG-4和iTunes AAC文件,即QT,MOV,MP4,M4A ,M4B,M4P,M4V等)。




3。 getID3()

getID3 ()是一个PHP脚本,用于从MP3和MP3中提取有用的信息(如ID3标签,比特率,播放时间等)。其他多媒体文件格式(Ogg,WMA,WMV,ASF,WAV,AVI,AAC,VQF,FLAC,MusePack,Real,QuickTime,Monkey's Audio,MIDI等)。
< hr>

4。 基于PHP的MP4 / F4V元数据阅读器

MP4Info类是一个简单的可扩展PHP类,它读取MP4容器的框架(称为框)以获取各种信息,即视频持续时间,视频/音频编解码器,宽度和高度,以及嵌入式XMP元数据。

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.

这篇关于获取mp4文件标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆