我正在使用此命令在 ubuntu 终端中检索视频信息:
ffprobe -show_streams sample.mp4
此命令在终端中显示有关视频的所有信息,但是当我在 php 中使用此命令并使用 exec 函数检索结果时,返回
string(0) ""
{}
我如何在 php 中检索结果?
我的代码:
public function information($ffmpeg,$file)
{
$info = exec("$ffmpeg -show_streams $file");
return $info;
}