$frame->addFrame(ffmpeg_frame frame_to_add) //Add a frame to the end of the animated gif.
frame_to_add - The ffmpeg_frame object to add to the end of the animated gif.
То есть функция addframe добавляет кадр в конец анимированного gif
Только не просто кадр а ffmpeg_frame-объект. который он берет из
$frame = getNextKeyFrame($filename)
Документация:
$movie->getNextKeyFrame() //Returns the next key frame from the movie as an ffmpeg_frame object. Returns false if the frame was not found.
так, посмотрел еще
$movie = new ffmpeg_movie(String path_to_media, boolean persistent) - видимо вот тут подставляется параметр $filename, а уже в getNextKeyFrame идет без параметра...
Вот так не работает почему то...
$filename определяется раньше. грубо говоря это video/1.avi
CODE (
text):
скопировать код в буфер обмена
$frame = new ffmpeg_movie($filename);
$gif = new ffmpeg_animated_gif(1, 120, 90, 3, 0);
while ($frame -> getNextKeyFrame())
{
$gif->addFrame($frame);
}
imagegif (1, $gif);
if (!isset($gif))
echo "ашыпко!!";
else
echo "Ашипки нету )";
в смысле не пишет ни есть ли ошибка ни нету ли...
Warning: Can't open movie file video\origin\The-Rasmus-In-The-Shadows.avi in {path}\tmp\upload1.php on line 25
Fatal error: Call to a member function getNextKeyFrame() on a non-object in {path}\tmp\upload1.php on line 28