Compress Videos using FFmpeg Laravel & shell_exec method
Apr 29, 2020
Introduction
- First of all, install FFmpeg in your composer. Perform the steps below to install it on Ubuntu:
composer require pbmedia/laravel-FFmpeg
- Start by updating the packages list:
$ sudo apt update
- In your app.php use these
- In providers
Pbmedia\LaravelFFmpeg\FFmpegServiceProvider::class
- In your controller
Use the following on top of the controller- use FFmpeg;
use FFmpeg\Coordinate\Dimension;
use FFmpeg\Format\Video\X264;
Result:
By using this example you can do video compression.
Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.
Originally published at https://blog.webnersolutions.com on April 29, 2020.