Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate gif from jpeg images using ffmpeg

Tags:

ffmpeg

I want to create a gif image from a jpeg image list, everything works fine, but how can I slow the animation?

Here is my code:

<?php
exec('ffmpeg -f image2 -i thumb/%001d.jpg -vf scale=480x240  out.gif');
?>
like image 848
wojttaa Avatar asked Oct 17 '22 11:10

wojttaa


People also ask

Can FFmpeg make GIFs?

From FFmpeg v2. 6 and above, it has two important filters which are very useful in creating a high-quality GIF: palettegen and paletteuse. The palettegen filter is a filter that generates a 256-color palette to be used in GIF encoding.

Can FFmpeg work with images?

FFmpeg looks for image files with file names with 'img-' resulting in a two-digit number. In the command section, you will need to define a search pattern for the ffmpeg output file so that you can find the image sequence.


1 Answers

To slow down an image sequence, lower its framerate

ffmpeg -f image2 -framerate 10 -i thumb/%001d.jpg -vf scale=480x240  out.gif
like image 175
Gyan Avatar answered Oct 20 '22 23:10

Gyan