Hi i am trying to install php-ffmpeg.
Can someone guide me or correct me in my steps.
I installed the composer on windows and then traversed to my folder i had created to run install ffmpeg
cmd
After running this command a composer.json
, composer.lock
file were created along with a vendor folder.
Later installed the Shared FFMpeg
build for 64bit from here
http://ffmpeg.zeranoe.com/builds/
and form this folder copied the bin folder to my directory to set the ffmpeg
and ffprobe
path during create()
like this
$ffmpeg = \FFMpeg\FFMpeg::create([
'ffmpeg.binaries' => '/vendor/bin/ffmpeg.exe',
'ffprobe.binaries' => '/vendor/bin/ffprobe.exe'
]);
Currently i am getting this error which says :
"Fatal error: Uncaught exception 'Alchemy\BinaryDriver\Exception\ExecutableNotFoundException' with message 'Executable not found, proposed : /vendor/bin/' in D:\xampp\htdocs\health\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\AbstractBinary.php:160 Stack trace: #0 D:\xampp\htdocs\health\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Driver\FFProbeDriver.php(48): Alchemy\BinaryDriver\AbstractBinary::load('/vendor/bin/', NULL, Object(Alchemy\BinaryDriver\Configuration)) #1 D:\xampp\htdocs\health\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\FFProbe.php(207): FFMpeg\Driver\FFProbeDriver::create(Array, NULL) #2 D:\xampp\htdocs\health\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\FFMpeg.php(117): FFMpeg\FFProbe::create(Array, NULL, NULL) #3 D:\xampp\htdocs\health\ff.php(6): FFMpeg\FFMpeg::create(Array) #4 {main} Next exception 'FFMpeg\Exception\ExecutableNotFoundException' with message 'Unable to load FFProbe' in D:\xampp\htdocs\health\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Driver\FFProbeDriver.php:50 Stack trace: #0 D:\xampp\htdocs\he in D:\xampp\htdocs\health\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Driver\FFProbeDriver.php on line 50".
So what could i have done wrong or am i missing any steps. Can someone point me to the right direction.
Well, I had this issue sometime ago and this is how I resolved it.
Make sure that you have installed the right ffmpeg files on you machine; ei linux server or mac/windows if you are running local. You can download from ffmpeg.org Be sure to download the right Static Build for your cpu (mine was 64bit so i downloaded a 64bit static build)
Extract the tar file on your server... and reference it like so if you are using an env file (don't forget the quotes)
MAKE SURE THERE ARE QUOTES ON YOUR REFERENCE PATHS.
FFMPEG_PATH = "/home/.../usr/bin/ffmpeg/ffmpeg"
FFPROBE_PATH = "/home/.../usr/bin/ffmpeg/ffprobe"
if you aren't using an env file, you can directly reference like so
$ffmpeg = FFMpeg::create(
array(
'ffmpeg.binaries' => "/home/.../usr/bin/ffmpeg/ffmpeg",
'ffprobe.binaries' => "/home/.../usr/bin/ffmpeg/ffprobe",
'timeout' => 10,
'ffmpeg.threads' => 12,
)
);
You need to install FFmpeg
on your machine (if you are working on PC) else you need to install FFmpeg
on your serve
Installing FFmpeg
in Ubuntu
:
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg
sudo apt-get install frei0r-plugins
Can't put complete details for other machine here please follow the given link Here is the link which explains how to do this.
https://github.com/adaptlearning/adapt_authoring/wiki/Installing-FFmpeg
On Mac
brew install ffmpeg
Just in case anyone is seeing this PHP error on their web server and have installed FFMPEG using composer, I was getting the same error and here is how I solved it.
For some reason (unknown to me) the FFMPEG binaries did not arrive at /usr/local/bin
I checked this is the terminal by running: ls /usr/local/bin
No ffmpeg or ffprobe were present!
Here's a link to the binaries. Download the ones you need. If unclear if your server is 32-bit or 64-bit, run uname -m
If your system is running 32-bit (i686 or i386) or 64-bit(x86_64).
I just downloaded the ffmpeg and ffprobe binaries to my local machine and then uploaded them via FTP to public_html/ but you can obviously put them anywhere.
Next, in the terminal, move the binaries to the right spot:
sudo cp -f public_html/ffmpeg /usr/local/bin
sudo cp -f public_html/ffprobe /usr/local/bin
Make sure they have arrived
ls /usr/local/bin
You should see both, and they will appear as white text.
After that you need to make both binaries executable. In the terminal:
sudo chmod +x /usr/local/bin/ffmpeg
sudo chmod +x /usr/local/bin/ffprobe
You're all set!
`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With