Skip to content

Using the MP3File Class you can calculate the MP3 file duration in PHP, aware of id3v1, id3v2, CBR, VBR

License

Notifications You must be signed in to change notification settings

nhalstead/PHP_MP3_Duration

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MP3File

Using the MP3File Class you can calculate the MP3 file duration in PHP, aware of id3v1, id3v2, CBR, VBR


Getting Started

Installing using Composer

composer require mp3file/mp3file

How to load:

Load the Package using Composer

require_once("autoload.php");
use MP3File\MP3File;

Load the Package not using Composer (Downloaded from Github)

require_once("PHP_MP3_Duration/src/class.mp3file.php");
use MP3File\MP3File;

Class in Action

Get the Duration of a File (Little bit Longer Process Time, Shorter Code, Composer)

require_once("autoload.php");
use MP3File\MP3File;
echo MP3File::getTime("[Your MP3 File].mp3");

Get the Duration of a File (Shorter Process Time, Longer Code, Composer)

require_once("autoload.php");
use MP3File\MP3File;
$file = new MP3File("[Your MP3 File].mp3");
echo $file->getDurationEstimate();
``

About

Using the MP3File Class you can calculate the MP3 file duration in PHP, aware of id3v1, id3v2, CBR, VBR

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%