Weave 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

Mediainfo Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • Despite the framing, this is a Symfony bundle, not a Laravel package. It registers 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.
  • The reusable asset is the underlying library, 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.
  • The bundle layer is thin — essentially a service definition — so 90% of the real integration risk lives in the library and the binary, not the bundle.

Integration feasibility

  • Low for the bundle; moderate for the library. The true integration contract is the mediainfo binary on the host, not the PHP code.
  • Path handling is a design question: most implementations expect a local filesystem path, so S3/HTTP sources require a download-to-temp step.

Technical risk

  • 6 stars, 0 dependents, score 0.09 — effectively undiscoverable and almost certainly unmaintained. Bundle conventions suggest a Symfony 2.x/3.x-era target and possibly PHP 5.6/7.x constraints. Verify composer.json before assuming PHP 8.1+ compatibility.
  • Shell execution is an attack-surface consideration; file paths must never be user-controlled strings concatenated into the command.

Key questions

  • What PHP/Symfony versions are declared? Is PHP 8.x supported?
  • Is the binary path configurable (required for containers and non-standard installs)?
  • Local files only, or remote/streamed sources?
  • Behavior on corrupt or non-media files — exception, null, or partial result?
  • Timeout handling for large files on network mounts?
  • Is a maintained alternative preferable — php-ffmpeg/ffprobe, or getID3 for audio-only?

Integration Approach

Stack fit

  • If the stack is Laravel: do not attempt to load the bundle. Install mhor/php-mediainfo directly and bind it in a service provider reading a published config/media.php (binary_path, timeout) driven by MEDIAINFO_BINARY.
  • If the stack is genuinely Symfony: registration is one line in bundles.php, but consider skipping the abandoned bundle layer and registering the service manually.

Migration path

  • Treat the bundle as a reference implementation. Extract the service-definition pattern; the library API (MediaInfo::getInfo($file)) is small and stable enough to wrap.

Compatibility

  • Pin the library version and validate its PHP constraint. Add a boot-time or health-check probe that runs mediainfo --Version so the environment fails fast rather than at first upload.

Sequencing

  1. Spike in a container with mediainfo installed; test against representative assets — large video, audio-only, corrupt file, unusual container.
  2. Wrap in a configurable service plus a health check.
  3. Move extraction into queued jobs; never run inline on large uploads.
  4. Persist normalized metadata and the raw JSON, so a future library swap can re-parse without re-ingestion.
  5. Put ffprobe behind the same internal interface as a fallback.

Operational Impact

Maintenance

  • The package is a liability rather than an asset at this adoption level. Assume no upstream fixes; budget to vendor or fork the thin bundle layer. Track mhor/php-mediainfo activity separately — it is the piece that actually matters.

Support

  • Minimal external support; internal ownership required. Document the MediaInfo binary version in use, since output parsing can shift across versions.

System dependency and ramp-up

  • The 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

  • Each extraction is a subprocess and I/O-bound. Cap concurrency per host (2–4 processes), enforce hard timeouts, and cache results by file hash to avoid re-extraction.

Failure modes

  • Binary missing/not on PATH → runtime exception at first use.
  • Corrupt or non-media file → library exception; ingestion pipeline must handle gracefully.
  • Timeout on large files → stuck worker; enforce hard limits.
  • Remote sources → temp disk exhaustion during download.
  • MediaInfo version drift → parsed field changes; mitigated by persisting raw JSON.

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.

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.
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk