Does simple ffmpeg package also work fine when we execute its command from PHP via exec? Or we have some different ffmpeg package for that purpose? Please help me solving it.
FFmpeg package for php
308 views Asked by Ali faizan AtThere are 2 answers
PHP's ffmpeg and the vanilla ffmpeg are independent packages. The php5-ffmpeg
package comes with the ffmpeg binary as a dynamic library. This means that you can install only php5-ffmeg
without installing the command line ffmpeg
package or vice versa or you can have both of them installed.
Therefore, the answer is yes, PHP will work with the command line ffmpeg
given it is installed.
I usually prefer using the command line ffmpeg in PHP via exec
. This allows for testing certain operations on the command line and once the result is as desired, the command can be used in PHP's exec
. On the other hand, in some situations, it may be preferable to use the php5-ffmpeg
package because it gives you the ability to use object oriented coding style when dealing with videos, conversion, etc.
Yes simple
ffmpeg
does work through PHP exec if you have necessary permissions.Sample command
Source