duanhuan1147 2014-07-16 12:51
浏览 168

FFMPEG没有创建缩略图

My ffmpeg command in php is

echo $cmd_thumbnail_create = ("\"$ffmpeg\" -i \"" . $dir.$videopath . "\" -an -ss $getFromSecond \"" . $dir.$thumbnailpath ."\"");
exec($cmd_thumbnail_create);

Output of which is

"C:\FFMPEG\bin\ffmpeg" -i "C:/xampp/htdocs/final/uploaded_videos/intro_en.mp4" -an -ss 6 "C:/xampp/htdocs/final/thumbnail/intro_en.jpg"

This when copied and executed on the command prompt creates the thumbnail at proper location with proper name.

Any suggestions?

  • 写回答

1条回答 默认 最新

  • donglang2010 2016-06-12 18:07
    关注

    This worked for me...
    first.... locate your path to FFMPEG mine is
    $ffmpeg = "H:\\SERVr\\htdocs\\ffmpeg\\bin\\ffmpeg";
    Then.. in your shell_exec...
    shell_exec("$ffmpeg -i your-input.jpg -an -ss 30 -s 120x100 your-output.jpg 2>&1");

    -i is your input file.
    -ss is video time you want the clip pulled from.
    -s is the size of the thumbnail you want

    This works on my Windows machine with XAMPP, and works perfectly.

    评论

报告相同问题?

悬赏问题

  • ¥15 基于单片机的靶位控制系统
  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错