Coder Social home page Coder Social logo

nhalstead / php_mp3_duration Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mk-j/php_mp3_duration

0.0 2.0 0.0 24 KB

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

Home Page: http://www.zedwood.com/article/php-calculate-duration-of-mp3

License: MIT License

PHP 100.00%

php_mp3_duration's Introduction

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();
``

php_mp3_duration's People

Contributors

nhalstead avatar mk-j avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.