mhor/mediainfo-bundle
mhor/mediainfo-bundle wraps the MediaInfo library for PHP, making it easy to extract technical metadata from audio and video files—codecs, duration, resolution, bitrate, and more—through a clean, bundle-integrated API. Useful for media catalogs, upload validation, and processing pipelines.
Architecture fit
Mhor\MediaInfo\MediaInfo in Symfony's DI container via the standard Bundle + Extension/Configuration trio. Laravel has no bundle-loading mechanism, so the package is not installable as-is.mhor/php-mediainfo, which shells out to the MediaInfo CLI (mediainfo --Output=JSON) and parses the output into typed track objects (General/Video/Audio/Text). Useful for container, codec, duration, bitrate, resolution, frame rate, audio channels, and subtitle extraction.Integration feasibility
mediainfo binary on the host, not the PHP code.Technical risk
composer.json before assuming PHP 8.1+ compatibility.Key questions
php-ffmpeg/ffprobe, or getID3 for audio-only?Stack fit
mhor/php-mediainfo directly and bind it in a service provider reading a published config/media.php (binary_path, timeout) driven by MEDIAINFO_BINARY.bundles.php, but consider skipping the abandoned bundle layer and registering the service manually.Migration path
MediaInfo::getInfo($file)) is small and stable enough to wrap.Compatibility
mediainfo --Version so the environment fails fast rather than at first upload.Sequencing
mediainfo installed; test against representative assets — large video, audio-only, corrupt file, unusual container.Maintenance
mhor/php-mediainfo activity separately — it is the piece that actually matters.Support
System dependency and ramp-up
mediainfo binary must exist in dev, CI, staging, prod images, and every queue/worker container. This is the single most common failure: works locally, missing in a container, silently breaks the worker. Ramp-up for engineers is low — roughly half a day to a working spike, 2–3 days to production-grade ingestion with queueing, config, health checks, and fallback.Scaling
Failure modes
Recommendation: do not adopt the bundle. Evaluate the underlying library as one implementation behind an internal MediaMetadataExtractor interface, with ffprobe as fallback and raw JSON retained. The bundle contributes a Symfony-shaped abstraction with no maintenance and no Laravel fit — net negative value.
How can I help you explore Laravel packages today?