Laravel Audio & Video Validator is a fantastic package introduced by https://github.com/minuteoflaravel. This package adds validators for audio and video files to your Laravel project. To use this package you should install the ffmpeg multimedia framework: On Debian/Ubuntu, run sudo apt install ffmpeg

The package adds these validators: audio video codec duration duration_max duration_min video_width video_height video_max_width video_max_height video_min_width video_min_height If you need to add your custom translatable error messages then just add them as always to the resources/lang/en/validation.php file: 'audio' => 'The :attribute must be a audio.', 'video' => 'The :attribute must be a video.', 'codec' => 'The :attribute codec must be one of these: :codec', 'duration' => 'The :attribute must be :duration seconds duration.', 'duration_max' => 'The :attribute duration must be less than :duration_max seconds.', 'duration_min' => 'The :attribute duration must be greater than :duration_min seconds.', 'video_width' => 'The :attribute width must be :video_width.', 'video_height' => 'The :attribute height must be :video_height.', 'video_max_width' => 'The :attribute width must be less than :video_max_width.', 'video_min_width' => 'The :attribute width must be greater than :video_min_width.', 'video_min_height' => 'The :attribute height must be greater than :video_min_height.', Some examples
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners