Laravel Getid3 is an awesome Laravel package that helps to extract metadata from media files. It can be used with files stored on different disks such as local disk, S3, etc. You can install this package via composer by running this command: $ composer require owen-oj/laravel-getid3
Owenoj\LaravelGetId3\GetId3ServiceProvider::class, Usage 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 $track->extractInfo(); //get title $track->getTitle(); //get playtime $track->getPlaytime(); We can also extract the artwork from the file //calling this method will return artwork in base64 string $track->getArtwork(); //Optionally you can pass `true` to the method to get a jpeg version.
We run with a superior level of agility and an immense Laravel ecosystem to customize the software for your business.