Download the PHP package sormagec/laravel-ffmpeg without Composer
On this page you can find all versions of the php package sormagec/laravel-ffmpeg. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sormagec/laravel-ffmpeg
More information about sormagec/laravel-ffmpeg
Files in sormagec/laravel-ffmpeg
Package laravel-ffmpeg
Short Description FFMpeg for Laravel
License MIT
Homepage https://github.com/sormagec/laravel-ffmpeg
Informations about the package laravel-ffmpeg
Laravel FFMpeg
This package provides an integration with FFmpeg for Laravel 5.6. The storage of the files is handled by Laravel's Filesystem.
Features
- Super easy wrapper around PHP-FFMpeg, including support for filters and other advanced features.
- Integration with Laravel's Filesystem, configuration system and logging handling.
- Compatible with Laravel 5.6.
- Support for Package Discovery.
- PHP 7.1 and 7.2 only.
Installation
This version of the package is only compatible with Laravel 5.6. If you're still using Laravel 5.1 - 5.5, please use version 1.3 (which is not maintained anymore).
You can install the package via composer:
Add the Service Provider and Facade to your config file if you're not using Package Discovery.
Publish the config file using the artisan CLI tool:
Usage
Convert an audio or video file:
Instead of the method you can also use the method, where is an instance of .
You can add filters through a or by using PHP-FFMpeg's Filter objects:
Sometimes you don't want to use the built-in filters. You can apply your own filter by providing a set of options. This can be an array or multiple strings as arguments:
Chain multiple convertions:
Create a frame from a video:
With the class you can determinate the duration of a file:
When opening or saving files from or to a remote disk, temporary files will be created on your server. After you're done exporting or processing these files, you could clean them up by calling the method:
HLS
You can create a M3U8 playlist to do HLS. Exporting is currently only supported on local disks.
As of version 1.2.0 the method of the HLS exporter takes an optional second parameter which can be a callback method. This allows you to add different filters per format:
As of version 1.3.0 you can monitor the transcoding progress of a HLS export. Use the method to provide a callback which gives you the completed percentage.
Advanced
The Media object you get when you 'open' a file, actually holds the Media object that belongs to the underlying driver. It handles dynamic method calls as you can see here. This way all methods of the underlying driver are still available to you.
If you want direct access to the underlying object, call the object as a function (invoke):
Example app
Here's a blogpost that will help you get started with this package:
https://pascalbaljetmedia.com/en/blog/how-to-use-ffmpeg-in-your-laravel-projects
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Pascal Baljet
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-ffmpeg with dependencies
illuminate/config Version 5.5.*
illuminate/filesystem Version 5.5.*
illuminate/log Version 5.5.*
league/flysystem Version ~1.0
sormagec/php-ffmpeg Version ~0.15.0
symfony/process Version ^4.0|^3.0