Question: I need to run the ffmpeg command in the PHP.

But php-ffmpeg is no more supports the latest version and out of date.

May i know alternate way to run the ffmpeg command in the webfile (PHP,Javascript,jQuery).

I try the `exec()` and `shell_exec()` in the PHP file but gets the blank output.

```
echo shell_exec("/usr/local/bin/ffmpeg  -i test.mp3  -codec:a libmp3lame -b:a 128k out.mp3");

```

and

```
 echo shell_exec("ffmpeg  -i test.mp3  -codec:a libmp3lame -b:a 128k  out.mp3");

```

Answer: 
ffmpeg outputs on stderr, so you need to redirect the output. Add `2>&1` to your command line:

```
echo shell_exec("/usr/local/bin/ffmpeg -i test.mp3 -codec:a libmp3lame -b:a 128k out.mp3 2>&1");

```

Then you will see the output.
first you have to install ffmpeg library in your server. with out install ffmpeg in your server command will not run.

the following link will help you

<https://ffmpeg.org/>

<https://www.resellerspanel.com/articles/dedicated-servers-articles/dedicated-servers-howtos/how-to-install-ffmpeg-on-a-dedicated-server/>

then after run this command 

```
 exec("ffmpeg  -i test.mp3  -codec:a libmp3lame -b:a 128k  out.mp3");

```