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 用PLC设计纸袋糊底机送料系统
    • ¥15 simulink仿真中dtc控制永磁同步电机如何控制开关频率
    • ¥15 用C语言输入方程怎么
    • ¥15 网站显示不安全连接问题
    • ¥15 51单片机显示器问题
    • ¥20 关于#qt#的问题:Qt代码的移植问题
    • ¥50 求图像处理的matlab方案
    • ¥50 winform中使用edge的Kiosk模式
    • ¥15 关于#python#的问题:功能监听网页
    • ¥15 怎么让wx群机器人发送音乐