xmon/sonata-media-provider-video-bundle
Integrates a video media provider with Sonata Media, letting you upload, store, and manage video files alongside images in Sonata Admin. It plugs into the existing Sonata Media workflow so video media can be configured, rendered, and handled like other media types.
Bottom line: this is not a Laravel package. It is a Symfony bundle — a third-party provider plugin for sonata-project/media-bundle — and it carries a maturity profile (2 stars, 0 dependents, score 2.31/5) that makes it reference material, not a dependency. The correct TPM framing is "adopt the pattern, not the package."
Ecosystem mismatch. The naming (*Bundle, DependencyInjection/, Resources/config/) and the dependency on Sonata Media place this squarely in the Symfony 2.x/3.x era. Sonata Media is a Symfony CMS-toolkit component with no Laravel integration surface. Dropping it into a Laravel app is not a configuration problem, it is a rewrite: you would be importing the Symfony DI container's bundle extension conventions, Sonata's ProviderInterface, and its admin/MediaAdmin wiring. That is a hard architectural stop for any Laravel codebase.
What it actually does. It registers a new Sonata Media provider for the video media type, handling upload and then shelling out to a system FFmpeg binary — classically to extract a poster frame/thumbnail and probe video metadata. It is not a transcoding pipeline: no adaptive bitrate ladder, no HLS/DASH packaging, no queue orchestration beyond whatever Sonata Media itself offers. Scope it as "thumbnail + metadata extraction for a video upload," and nothing more.
Architecture fit. Poor for Laravel. Acceptable only if the existing stack is Symfony with Sonata Media already in production and the team specifically needs a first-class video provider in the Sonata admin. Even there, the fit is questionable: the provider model assumes local filesystem semantics, and the FFmpeg invocation is synchronous within the upload request unless you bolt on a worker.
Integration feasibility. Low as a dependency, moderate as a fork. There is no usable upgrade path to modern PHP (8.2+) or Symfony 6/7 without you owning the port; the upstream constraints almost certainly pin symfony/symfony ~2.x and sonata-project/media-bundle ~2.x. Feasibility improves sharply if you treat the repository as a specification: the metadata field mapping, the provider interface implementation, and the thumbnail-generation flow are all readable and directly portable to spatie/laravel-medialibrary conversions or pbmedia/laravel-ffmpeg.
Technical risk (ranked):
max_execution_time or PHP-FPM worker exhaustion.Key questions to answer before any code is written:
composer.json, and is the package even resolvable on Packagist today?escapeshellarg) or string-interpolated?local?Stack fit. Recommend a build-vs-buy decision before a build-vs-fork one. The realistic options, in order of preference:
| Option | Fit | Notes |
|---|---|---|
| Managed video platform (Mux, Cloudflare Stream, AWS MediaConvert) | Best for Laravel | Offloads transcode, packaging, CDN, and codec licensing; cost is per-minute, not per-engineer |
spatie/laravel-medialibrary + pbmedia/laravel-ffmpeg conversions |
Good for Laravel, thumbnails only | Actively maintained, queue-native, Laravel-idiomatic |
| Port this bundle's provider pattern into a Symfony/Sonata app | Niche, acceptable | Only if Sonata Media is already a hard platform constraint |
| Install this bundle as-is | Not recommended | Version constraints will likely fail resolution on a modern stack |
Migration path. Do not attempt a direct swap. Sequence it as: (1) audit the bundle's provider class and replicate its metadata field schema — duration, width/height, codec, poster frame — into your target media model; (2) implement the extraction step as a queued job behind an interface (VideoMetadataExtractor) so the FFmpeg implementation is swappable for a managed API later; (3) backfill existing media records by re-probing stored files rather than re-uploading; (4) run both paths in shadow mode on new uploads and diff the metadata before cutting over.
If you are genuinely on Symfony/Sonata: fork to a private VCS repository under your own namespace, relax the Composer constraints, add escapeshellarg, add a PHPUnit test around the provider, and pin the fork by commit SHA. Budget a day for the port and treat the fork as permanently yours.
Compatibility. Verify PHP 8.x compatibility explicitly — this era of bundle typically uses each(), untyped properties, or Symfony\Component\DependencyInjection\Extension signatures that break under modern Symfony. FFmpeg compatibility is a separate axis: pin a known-good FFmpeg build in the container image, and assert ffmpeg -version and codec availability at deploy time rather than discovering it on first upload.
Sequencing.
spatie route.finfo rather than client headers, cap upload size, and add a cleanup job for orphaned temp files.Maintenance. Effectively zero upstream maintenance; you are the maintainer from day one. Budget for a quarterly dependency review to confirm the fork still resolves, and accept that the answer will eventually be "no, we rewrite it." This is the single largest lifecycle cost and should be stated plainly in the business case.
Support. None. 2 stars and 0 dependents means no Stack Overflow corpus, no issue-tracker triage, no maintainer responsiveness. Every incident is first-principles debugging by your own team, and internal knowledge will be concentrated in whoever did the spike — a textbook bus-factor of one.
Scaling. The bottleneck is CPU-bound FFmpeg work plus disk I/O, and it scales linearly with upload volume in the worst way: it competes with your web workers. Mitigations are standard but mandatory — dedicated worker pool, upload to object storage first and process from there, concurrency limit per worker sized to available cores (FFmpeg will happily saturate all of them and starve the queue), and a backlog alarm. Storage growth is unbounded: originals plus generated artifacts, so set a retention policy on source files before launch, not after the first invoice.
Failure modes to instrument for:
Ramp-up. A new engineer needs three distinct competencies to be productive here: Sonata Media's provider/admin internals (sparse documentation, dated conventions), Symfony DI bundle wiring, and practical FFmpeg CLI behavior. Realistically 3–5 days before independent work, versus under a day for spatie/laravel-medialibrary or an afternoon for a managed video API's SDK. Write the runbook during the spike, while the knowledge exists.
Recommendation. Do not adopt as a dependency. The opportunity score (2.27) and overall score (2.31) are consistent with the qualitative read: minimal community traction, no maintenance signal, and an ecosystem mismatch with the stated stack. Extract the provider/metadata design as a reference, implement the capability on a maintained library or managed service, and reserve this repository for the architecture diagram's footnotes.
How can I help you explore Laravel packages today?