This package is a wrapper around james-heinrich/getid3 to extract various information from media files

v2.1 2022-06-07 09:08 UTC

This package is auto-updated.

Last update: 2022-11-07 10:04:06 UTC


Latest Version on Packagist Total Downloads StyleCI

This package is a wrapper around james-heinrich/getid3.


Via Composer

$ composer require owen-oj/laravel-getid3

If you use Laravel 5.5+ you don't need the following step. If not, once package is installed, you need to register the service provider. Open config/app.php and add the following to the providers key.



use Owenoj\LaravelGetId3\GetId3;

//instantiate class with file
$track = new GetId3(request()->file('file'));

// Use static methods:
$track = GetId3::fromUploadedFile(request()->file('file'));
$track = GetId3::fromDiskAndPath('local', '/some/file.mp3');
$track = GetId3::fromDiskAndPath('s3', '/some/file.mp3'); // even works with S3

//get all info

//get title

//get playtime

We can also extract the artwork from the file

//calling this method will return artwork in base64 string
//Optionally you can pass can pass `true` to the method to get a jpeg version. This will return an UploadedFile instance

Available Methods

extractInfo() : array

Get an array of all available metadata of file

getArtist() : string

Get the artist of the track

getTitle() : string

Get the title of the track

getAlbum() : string

Get name of Album

getPlaytime() : string

Get a tracks total playtime

getPlaytimeSeconds() : float

Get total playtime in seconds


Get the artwork of the track

getGenres() : array

Get the list of genres

getComposer() : string

Get the composers of the track

getTrackNumber() : string

Get the track number out of total number on album eg. 1/12

getCopyrightInfo() : string

Get copyright information of the track

getFileFormat() : string

Get the file format of the file eg. mp4

Change log

Please see the changelog for more information on what has changed recently.


$ composer test


Please see contributing.md for details and a todolist.


If you discover any security related issues, please email owen.j@terktrendz.com instead of using the issue tracker.



MIT. Please see the license file for more information.