shell exec命令没有运行ffmpeg

标签 shell ffmpeg exec

我正在编写这个简单的命令来执行 ffmpeg,但 shell_exec 没有给出任何结果。否则它会用 ls 给出结果。

这是我的代码
{

<html>
<body>
<?php
$output = shell_exec('ffmpeg -version');
echo "<pre>$output</pre>";
?>
</body>
</html>

}

最佳答案

如果您将 PHP 与 WAMP 服务器一起使用,请在下面检查以在 php 中启用 shell_exec

Enable shell_exec() in wamp server

关于shell exec命令没有运行ffmpeg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24944375/

相关文章:

c++ - 使用 execv 执行基本 I/O

php - Composer.phar 不想通过 PHP 脚本中的 shell_exec 运行。为什么?

PHP shell_exec 插入 MySQL

linux - 说说如何在 bash 中创建一个不使用递归的菜单?

Linux - 创建进程

android - 尝试通过 android 中的命令行运行 ffmpeg 时出现异常

php - bash脚本中的转义字符

video - 使用 FFmpeg 从 mjpeg 转换为 mp4 (libx264)

ios - FFMpeg avformat_write_header 总是返回 < 0

unix - 如果您从子进程中 fork() 和 exec() 并在父进程中等待,那么父进程如何从子进程中获取返回码?