Home >Backend Development >PHP Tutorial >php中exec('ffmpeg -y -i {$amr} {$mp3}');

php中exec('ffmpeg -y -i {$amr} {$mp3}');

WBOY
WBOYOriginal
2016-07-06 13:54:041477browse

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.

Reply content:

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.

ffmpegUse absolute paths, such as /user/bin/ffmpeg

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn