【发布时间】:2021-12-29 23:21:05
【问题描述】:
我正在使用 PHP v7.2 并且当前安装的 CMS 具有通过 FFMPEG 自动为视频添加水印的功能。
它使用 'shell_exec' 运行 FFMPEG。'shell_exec 和 exec' 没有本地值,但它仍然在脚本/php 中显示 shell_exec 由于安全原因已被禁用。我已经联系了服务器,他们还说它在 PHPINFO 中显示已启用,但执行 FFMPEG 时出现错误。
FFMPEG 是这样的 >
$cmd = shell_exec("$ffmpegPath -ss 00:00:01 -i $convertUrl -c copy -t 00:00:04 $xVideoFirstPath 2>&1");
$cmd = shell_exec("$ffmpegPath -i $convertUrl -ss 00:00:01.000 -vframes 1 $videoTumbnailPath 2>&1");
上传视频时显示错误:
Warning: shell_exec() has been disabled for security reasons in /home/zxc/domains/zxc.com/public_html/requests/request.php on line 307
【问题讨论】:
标签: php ffmpeg shell-exec