dongnan1899 2014-12-16 19:44
浏览 34

ffmpeg不从图像创建视频

I have read this Create Video using ffmpeg

Stack Question for the Same

Wiki Page for the same

Still I am not able to get it. I have written this shell command in PHP

echo $make_movie = "$ffmpeg -framerate 1/5 -i $folder_name/img%03d.png -c:v libx264 -r 25 -pix_fmt yuv420p $folder_name/output.mp4";

This gives output

ffmpeg\bin\ffmpeg.exe -framerate 1/5 -i ankit/img%03d.png -c:v libx264 -r 25 -pix_fmt yuv420p ankit/output.mp4

if(shell_exec($make_movie)){
    echo "<br />Movie Created..<br />";
}
else{
    echo "<br />Movie Creation Error..<br />";
}

The Output is Movie Creation Error that means the Shell Command is not executing?

Questions:

  1. What is wrong?
  2. For future use, any debugging methods for this?

I ran the same command on cmd and it made the video..!!!

  • 写回答

1条回答 默认 最新

  • duanchu2607 2014-12-16 19:55
    关注

    shell_exec is pretty useless when it comes to figuring out why your command failed. use exec() instead:

    $last_line = exec($make_movie, $all_output, $exit_code);
    var_dump($exit_code);
    

    You'll have to look at ffmpeg's docs to determine what the exit code means

    评论

报告相同问题?

悬赏问题

  • ¥15 Macbookpro 连接热点正常上网,连接不了Wi-Fi。
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程
  • ¥20 我要一个分身加定位两个功能的安卓app
  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题
  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析