I read a lot of tutorials and I could do this command:
ffmpeg -t 3 -i video.mp4 -vf "fps=15,scale=360:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif
But it won't work to do what I want. I need to read a video.mp4
and create multiple GIFs with two or three seconds for each two or three seconds of the video, until the end.