PHPackages                             typidesign/laravel-media-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. typidesign/laravel-media-validator

ActiveLibrary[Image &amp; Media](/categories/media)

typidesign/laravel-media-validator
==================================

A Laravel validator for audio and video files.

1.0.6(3y ago)259MITPHPPHP ^7.0|^8.0

Since Oct 9Pushed 3y ago2 watchersCompare

[ Source](https://github.com/typidesign/laravel-media-validator)[ Packagist](https://packagist.org/packages/typidesign/laravel-media-validator)[ Docs](https://github.com/typidesign/laravel-media-validator)[ RSS](/packages/typidesign-laravel-media-validator/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (7)Dependencies (2)Versions (8)Used By (0)

Add validation rules for audio and videos files.
================================================

[](#add-validation-rules-for-audio-and-videos-files)

This package gives your Laravel app a validator for audio and video files based on the information returned by ffprobe, wich is part of the FFmpeg project.

Why this package?
-----------------

[](#why-this-package)

Because Symfony’s MIME types guessing is often not reliable, especially for audio files (see [symfony/symfony#8678](https://github.com/symfony/symfony/issues/8678)).

Installation
------------

[](#installation)

First install ffmpeg:

- On Debian/Ubuntu, run `sudo apt install ffmpeg`
- On macOS with Homebrew: `brew install ffmpeg`

Then you can install the package via composer:

```
composer require typidesign/laravel-media-validator
```

Usage
-----

[](#usage)

In your controller or anywhere you validate your data, add this rule:

```
$request->validate([
    'audio' => [
        new IsAudio(['mp3', 'aac']),
        // …
    ],
]);
```

or this, for videos:

```
$request->validate([
    'audio' => [
        new IsVideo(['h264', 'theora']),
        // …
    ],
]);
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Samuel De Backer](https://github.com/sdebacker)
- [All Contributors](../../contributors)

About Typi Design
-----------------

[](#about-typi-design)

Typi Design is a webdesign agency based in Brussels, Belgium.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~290 days

Recently: every ~317 days

Total

7

Last Release

1395d ago

PHP version history (2 changes)1.0.0PHP ^7.0

1.0.4PHP ^7.0|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b93740e4c6b40a6219441696db5db9c4b635dad91339c1893dfe0813434e8d94?d=identicon)[Samuel De Backer](/maintainers/Samuel%20De%20Backer)

---

Top Contributors

[![sdebacker](https://avatars.githubusercontent.com/u/134503?v=4)](https://github.com/sdebacker "sdebacker (13 commits)")

---

Tags

laravelvalidatorvalidationaudiovideomediacodectypidesign

### Embed Badge

![Health badge](/badges/typidesign-laravel-media-validator/health.svg)

```
[![Health](https://phpackages.com/badges/typidesign-laravel-media-validator/health.svg)](https://phpackages.com/packages/typidesign-laravel-media-validator)
```

###  Alternatives

[happyworm/jplayer

jPlayer allows you to create a media player with a consistent interface and experience across all browsers.

4.6k114.2k1](/packages/happyworm-jplayer)[dereuromark/media-embed

A PHP library to deal with all those media services around, parsing their URLs and embedding their audio/video content in websites.

182530.3k11](/packages/dereuromark-media-embed)[synchro/laravel-medialibrary-audio

Audio file thumbnail generator for Spatie's Laravel Media Library

292.4k](/packages/synchro-laravel-medialibrary-audio)[folour/flavy

FFmpeg layer for Laravel 5.2-5.4, this is a fork of rafasamp/sonus package

279.6k](/packages/folour-flavy)[acekyd/laravelmp3

A light weight Laravel package for simple operations with mp3 files

213.7k](/packages/acekyd-laravelmp3)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
