一、安装getid3

composer require james-heinrich/getid3

二、引用

use getID3;
use getid3_lib;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;

三、代码例子

 $getID3 = new getID3;
$ThisFileInfo = $getID3->analyze($fileUrl);
 $fileduration = $ThisFileInfo['playtime_seconds']; //这个获得的便是音频文件的时长
echo $fileduration;die;
            

 

 

原生php下载地址: https://codeload.github.com/JamesHeinrich/getID3/zip/master

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2022-12-23
  • 2021-07-06
  • 2021-07-29
  • 2021-12-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
相关资源
相似解决方案