FFmpeg infile path,我的域名

时间:2017-04-26 13:32:29

标签: php ffmpeg

我的文件位于html://www.example.com/wp-content/music.mp3

我已经测试并确认ffmpeg已安装且已运行

exec("ffmpeg -help",$output);

我成功获得了输出。现在我想开始转换,但我找不到上面的文件。我试过了

exec("ffmpeg -i html://www.example.com/wp-content/music.mp3",$output);

exec("ffmpeg -i home/mywebsite/public_html/wp-content/music.mp3",$output);

我也没有输出。 ffmpeg位于/usr/bin/ffmpeg

我如何解决?

1 个答案:

答案 0 :(得分:1)

将错误输出(stderr)重定向到响应(stdout):

<?php
$command = "ffmpeg -i https://www.example/a.mp3 2>&1";
$output = shell_exec($command);

echo $output;