doucang2871 2018-10-06 18:34
浏览 68

FFMPEG通过PHP - 生成缩略图不生成的后台任务

I'm trying to generate a thumbnail from a video using FFMPEG via PHP.

This is working great if I do:

echo shell_exec('ffmpeg -y -i input.mp4 -ss 00:00:10.000 -vframes 1 THUMB.png');

But with help from this page I tried to turn this into a background process. It runs, but I don't get any file (THUMB.jpg) written to the server.

echo shell_exec('ffmpeg -y -i input.mp4 -ss 00:00:10.000 -vframes 1 THUMB.png </dev/null >/dev/null 2>/var/log/ffmpeg.log &');

Perhaps it IS generating the thumg but in a different place from where it generates it when I run it synchronously within my PHP flow. What am I doing wrong?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 matlab求解平差
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制
    • ¥20 usb设备兼容性问题
    • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
    • ¥15 安装svn网络有问题怎么办