james-heinrich/getid3
getID3() is a PHP library to read and parse audio/video metadata and tags (ID3, APE, Lyrics3, etc.) across many formats including MP3, FLAC, Ogg, MP4/AAC, WAV, AVI, MKV, ASF/WMV/WMA, and more.
Strengths:
$fileinfo), which integrates cleanly with Laravel’s Eloquent models or API responses.Weaknesses:
composer require james-heinrich/getid3.Bus::dispatch(new ProcessMediaJob($file))) for async processing of large media libraries./api/media/metadata) and Artisan commands (e.g., php artisan media:scan).try-catch blocks and log $fileinfo['error']/$fileinfo['warning'].spatie/getid3 or similar).php-ffmpeg + custom parsers)?spatie/laravel-medialibrary) or complement them? Overlap may exist for image metadata (e.g., EXIF).getID3 as a singleton/bound service for dependency injection.
$this->app->singleton('getid3', function () {
return new \getID3();
});
Metadata) to abstract usage:
use Illuminate\Support\Facades\Metadata;
$metadata = Metadata::scan($filePath);
app/Services/MediaMetadataService) to handle edge cases (e.g., remote files, validation).Storage::disk('public')->get($path)) to read files, ensuring consistency with other storage adapters.ProcessMediaMetadataJob) with retries for failed scans.structure.txt and adjust client expectations (e.g., not all fields are populated for every file).php-ffmpeg for audio/video) as a backup for critical paths.MetadataScanned) after processing.memory_limit in php.ini or .env) to 256M+ for large files.$fileinfo['error']/$fileinfo['warning'] to a service like Sentry or Laravel Log.php-ffmpeg, imagick) if getID3 stagnates.$fileinfo structure.title if empty).How can I help you explore Laravel packages today?