How to convert any video to mp4 with php, ffmpeg and CentOS [closed]

I have been converting videos for about a year working in localhost on a Mac. The path is, '/usr/local/bin/ffmpeg' and it has always worked fine. Recently, I installed ffmpeg on my server, with a CentOS 8 operating system, and the php script I have recently used is not working. My question is, 'Where is the path for ffmpeg in CentOS 8?'


Solution 1:

On the Mac I will assume you installed ffmpeg with brew which does a local build, hence why it ends up under /usr/local

The build for centos probably comes as a pre-built RPM installed with dnf or yum so under normal circumstances will be installed into /usr/bin.

The which command will will search the PATH variable to find the command passed as an argument. e.g.:

$ which ffmpeg
/usr/bin/ffmpeg