[英]MP3 file duration PHP
I worked with some mp3 files, and i needed to show duration of uploaded mp3 file, I used following: http://www.zedwood.com/article/127/php-calculate-duration-of-mp3 as told in question: PHP Function to get MP3 duration . 我使用了一些mp3文件,我需要显示上传的mp3文件的持续时间,我使用了以下内容: http : //www.zedwood.com/article/127/php-calculate-duration-of-mp3 ,如下所述: PHP函数获取MP3持续时间 。
But now I'm facing a problem, there are some files which are not returning any file information. 但是现在我遇到了一个问题,有些文件没有返回任何文件信息。 the array just contains following
该数组只包含以下内容
Array (
[Filesize] => 16756370,
[Encoding] => Unknown
)
As the "Encoding" is Unknown its not returning any data. 由于“编码”是未知的,它不会返回任何数据。
I found a great PHP library, getID3() , that works for VBR files as well. 我找到了一个很棒的PHP库, getID3() ,也适用于VBR文件。
You can find it right here; 你可以在这里找到它; it's free and is being developed actively (latest version is from from February 2013):
它是免费的,并且正在积极开发(最新版本来自2013年2月):
http://sourceforge.net/projects/getid3/files/getID3%28%29%201.x/1.9.5/ http://sourceforge.net/projects/getid3/files/getID3%28%29%201.x/1.9.5/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.