Home >Backend Development >PHP Tutorial >php中exec('ffmpeg -y -i {$amr} {$mp3}');
I encountered a strange problem today. I configured ffmpeg on the Linux server to convert amr to mp3. I put it in the scheduled task and manually executed the scheduled task exec to take effect. The mp3 can be generated properly, but if it is executed every ten minutes, the mp3 cannot be generated. . After repeated testing, the program reaches exec("ffmpeg -y -i {$amr} {$mp3}"); but this line of code is not executed.
I encountered a strange problem today. I configured ffmpeg on the Linux server to convert amr to mp3. I put it in the scheduled task and manually executed the scheduled task exec to take effect. The mp3 can be generated properly, but if it is executed every ten minutes, the mp3 cannot be generated. . After repeated testing, the program reaches exec("ffmpeg -y -i {$amr} {$mp3}"); but this line of code is not executed.
ffmpeg
Use absolute paths, such as /user/bin/ffmpeg