![]() export to Amazon S3, converted in X264 > inFormat( new \ FFMpeg\ Format\ Video\ WMV) This can be an array or multiple strings as arguments: FFMpeg:: fromDisk( 'videos')Ĭhain multiple convertions: // The 'fromDisk()' method is not required, the file will now // be opened from the default 'disk', as specified in // the config file. You can apply your own filter by providing a set of options. Sometimes you don't want to use the built-in filters. $clipFilter = new \ FFMpeg\ Filters\ Video\ ClipFilter( $start) or $start = \ FFMpeg\ Coordinate\ TimeCode:: fromSeconds( 5) > inFormat( new \ FFMpeg\ Format\ Video\ X264) $filters-> resize( new \ FFMpeg\ Coordinate\ Dimension( 640, 480)) You can add filters through a Closure or by using PHP-FFMpeg's Filter objects: FFMpeg:: fromDisk( 'videos') $media = FFMpeg:: fromFilesystem( $filesystem)-> open( 'yesterday.mp3') Instead of the fromDisk() method you can also use the fromFilesystem() method, where $filesystem is an instance of Illuminate\Contracts\Filesystem\Filesystem. > inFormat( new \ FFMpeg\ Format\ Audio\ Aac) Publish the config file using the artisan CLI tool: php artisan vendor:publish -provider= "Pbmedia\LaravelFFMpeg\FFMpegServiceProvider " UsageĬonvert an audio or video file: FFMpeg:: fromDisk( 'songs') 'FFMpeg' => Pbmedia\ LaravelFFMpeg\ FFMpegFacade::class Pbmedia\ LaravelFFMpeg\ FFMpegServiceProvider::class, Laravel 5: config/app.php 'providers' => [ You can install the package via composer: composer require pbmedia/laravel-ffmpegĪdd the Service Provider and Facade to your app.php config file if you're not using Package Discovery. Mind that older versions are no longer supported. If you're still using an older version of Laravel, please use the chart below to find out which version you should use. Only the master branch and version 4.0 of this package are compatible with Laravel 5.8. Integration with Laravel's Filesystem, configuration system and logging handling. ![]()
0 Comments
Leave a Reply. |