dsxrq28228 2013-02-19 12:30
浏览 149
已采纳

使用php从mp3转换为ogg

I want to convert mp3 file to ogg. I tried the following code

exec("/usr/local/bin/ffmpeg -i 1.mp4 -vcodec libtheora -acodec libvorbis testjohn4545454.ogg",$output);
var_dump($output);

But it does not convert the file and it only returns array(0) { } and it only takes a little execution time.

But the conversion is success when using ssh command.

Please give me solution.

  • 写回答

4条回答 默认 最新

  • duanbiaoshu2021 2013-02-19 13:11
    关注

    Thank you for the replies. I used passthru() instead of exec() and it works fine.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?