Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Getid3 Laravel Package

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.

View on GitHub
Deep Wiki
Context7

getID3() is a PHP library for reading and parsing audio/video metadata and tags from a wide range of media file formats. It extracts technical details (codec, bitrate, duration, container) and common tag standards, making it useful for media libraries, upload validation, and cataloging.

Designed for broad format coverage, getID3() supports both lossy and lossless audio as well as popular video containers, with included demos for quick verification on your server.

  • Parses tags: ID3v1/1.1, ID3v2 (2.2–2.4), APE v1/v2, Lyrics3
  • Supports many audio formats: MP3, AAC/MP4, Ogg (Vorbis/Opus/FLAC), FLAC, WAV/AIFF
  • Reads audio/video containers: ASF (WMA/WMV), AVI, MKV, MPEG, QuickTime
  • Includes demo tools (e.g., demos/demo.browse.php) for fast testing
Frequently asked questions about Getid3
How do I install getID3() in a Laravel project?
Run `composer require james-heinrich/getid3` in your project root. The package is autoloaded via Composer, so no additional configuration is needed for basic usage. For Laravel integration, register it as a service provider or facade to manage instances centrally.
Which Laravel versions does getID3() support?
getID3() works with PHP 5.3+, which aligns with Laravel 5.x and later. However, it lacks native support for Laravel’s newer features (e.g., PHP 8.2 attributes). Test thoroughly if using Laravel 9+ or 10+ to avoid compatibility issues.
Can getID3() read metadata from MKV, MP4, or AVI files?
Yes, getID3() supports MKV, MP4 (AAC), and AVI containers. It extracts technical details like codec, bitrate, duration, and embedded tags (e.g., ID3 for MP4, VorbisComments for MKV). Use `$fileinfo = getid3_info($filepath)` to retrieve structured data.
How do I handle large files (e.g., 1GB videos) without timeouts?
For large files, wrap processing in Laravel queues (e.g., `Bus::dispatch(new ProcessMediaJob($file))`) to avoid timeouts. Alternatively, use chunked reading or increase PHP’s `max_execution_time` and `memory_limit` temporarily for critical jobs.
Does getID3() support writing metadata (e.g., updating ID3 tags)?
Yes, getID3() can write metadata for supported formats (e.g., ID3v2, VorbisComments, APE). Use `getid3_lib::WriteTagsToFile($fileinfo, $filepath)` after modifying `$fileinfo['tags']`. Note: Writing requires additional error handling for corrupted files.
Is getID3() compatible with Laravel’s filesystem (e.g., S3 storage)?
Yes, getID3() works with Laravel’s filesystem adapters. Pass the file path (local or remote) to `getid3_info()`. For S3, ensure the file is temporarily downloaded to a local path or use a stream-compatible solution like `Storage::disk('s3')->get($path)`.
What are the memory requirements for getID3()?
Full module support requires ~12MB+ memory. For memory-constrained environments (e.g., shared hosting), disable unused modules via `getid3_include_path()` or process files asynchronously. Check `$fileinfo['error']` for memory-related warnings.
Are there Laravel-specific integrations (e.g., Facades, Jobs) for getID3()?
No, getID3() is a vanilla PHP library. You’ll need to create a Laravel service provider or facade (e.g., `Metadata::read($file)`) and wrap heavy operations in queueable jobs (e.g., `ProcessMediaJob`). Example: `Bus::dispatch(new ProcessMediaJob($filepath))`.
What licenses are available, and which should I choose for Laravel?
getID3() offers GPL, LGPL, MPL, or a legacy commercial license. For proprietary Laravel apps, use **LGPL or MPL** to avoid GPL’s viral effect. Review the `licenses/` directory in the package for terms. Dynamic linking (e.g., via Composer) may mitigate GPL risks.
What alternatives exist for Laravel media metadata extraction?
Alternatives include `spatie/laravel-medialibrary` (for images/audio), `php-ffmpeg` (video metadata), or `symfony/mime` (basic file info). For audio-specific needs, `james-heinrich/getid3` is unmatched in format support but lacks active maintenance. Consider forking or using `spatie` for image-heavy apps.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport