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?'
Asked
Active
Viewed 515 times
1 Answers
2
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

hardillb
- 1,552
- 2
- 12
- 23
-
I think there's something wrong in the command line in the php file: exec($ffmpeg . ' -i "' . $uploaded_file . '" -c:v libx264 "./testuploads/converted/' . $video_mp4 . '" -y 1>convert.txt 2>&1', $output, $convert_status['mp4']); – margie Oct 31 '21 at 10:15
-
@margie update the question and show the complete script. however web development is off topic on serverfault.com – djdomi Oct 31 '21 at 10:57