我正在使用ffmpeg
从多个视频文件中获取图像。我ffmpeg
准备好我的代码,但是当我编写代码时出现以下错误exec
。
ffmpeg version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
built on Apr 2 2013 17:02:36 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
//files info...
//files info...
Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yuvj420p'
//file info...
[buffer @ 0x1513c40] Buffering several frames is not supported. Please consume all available frames before adding a new one.
Last message repeated 75 times
[image2 @ 0x1513460] Could not open file : /test/project
av_interleaved_write_frame(): Input/output error
我只显示颜色突出显示的错误消息。我的代码:
$ffmpeg ="/usr/bin/ffmpeg";
$image_source_path = '/test/project/test.mp4';
$ALL_PLACE_WIDTH = 300;
$ALL_PLACE_HEIGHT = 300;
$image_cmd = " -r 1 -ss 00:00:10 -t 00:00:01 -s ".$ALL_PLACE_WIDTH."x".$ALL_PLACE_HEIGHT." -f image2 " ;
$dest_image_path = '/test/project';
$str_command= $ffmpeg ." -i " . $image_source_path . $image_cmd .$dest_image_path;
shell_exec($str_command);
看来我的 Linux 想让我切换到avconv
. 我不确定如何修复这些错误。有人可以给我一个提示吗?