getaudio_time.php 366 B

123456789101112131415
  1. #!/usr/bin/php -q
  2. <?php
  3. require_once('getid3/getid3.php');
  4. $fileUrl = $argv[1];
  5. //$fileUrl = "/var/spool/asterisk/monitor/recording/8701/20160203-135149-3200-8701-630-incoming-1454478706.212.wav";
  6. $getID3 = new getID3();
  7. $ThisFileInfo = $getID3->analyze($fileUrl);
  8. $time = $ThisFileInfo['playtime_seconds'];
  9. print $time;
  10. //file_put_contents('/1.txt',$time);
  11. ?>