Hello everyone!
I just can’t figure out how to install this module here https://github.com/PHP- FFMpeg / PHP-FFMpeg for OpenServer. I did not find instructions in Google. The module page says that it must be installed via https://getcomposer.org/ . Installed Composer, downloaded FFMpeg. The vendor \ php-ffmpeg folder appeared along the Composer installation path. But how do you associate it with OpenServer now? In the instructions, in the php file, it is added with the line: require ‘vendor / autoload.php’ ;. Composer can be simply dropped into the folder with the files of the Openserver site \ domains \ site.name?
Answer 1, authority 100%
Installed Composer
No need, it’s already built into OpenServer.
A vendor \ php-ffmpeg folder appeared in the Composer installation path. But how do you link it to OpenServer now?
It looks like you installed the library in the composer’s service folder. Remove it from there if I’m not mistaken. Then retry the installation of the package, but this time following the instructions below.
- Start OpenServer
- Open the console from the Advanced tab
- Change from C: \ OSPanel to your application folder with the command
cd domains \ MyApp
- Install the library with
composer require php-ffmpeg / php-ffmpeg
Done, you can now use FFMpeg in your project php files.
require __DIR__. '/vendor/autoload.php';
$ ffmpeg = FFMpeg \ FFMpeg :: create ();
// Perform some action ...