Let's say I have an 8 frame animated GIF that is 2 seconds long. I would like to build a video file (codec not important at this point) that is 30 seconds long that consists of the source GIF repeating over and over.
Is it possible to do this using only ffmpeg
? Answers that use convert
or some other pre-processing utility do not count [The reason being that I would like to use this on PandaStream, which does not have that utility]. Let's also assume that shell scripts are out of the question as well, though it can be multiple ffmpeg commands.
Things I have tried that did not work (though maybe I did them wrong, I'm not terribly familiar with ffmpeg):
Using the
-loop_input
,-loop_output
options present in the ffmpeg docs. Using both ffmpeg 1.2 and 2.0, I get aUnrecognized option 'loop_[input|output]'
error message. I might be using this wrong though since the error is about not recognizing the option, though the docs say it is deprecated.-loop
option. Does not seem to do anything with GIF -> Video. I think this flag and the above flag are related to generating animated GIFs as the output.Concat. Doing something like:
ffmpeg -i "concat:image.gif|image.gif|image1.gif|image2.gif|image3.gif|image4.gif" image-long.gif
Results in a 16 frame gif (so two gifs are concatenated) which is progress, though the output gif is of much lower quality.
I'm a bit at my wits end here (I have tried many other permutations of the above concepts), I'm at the point now of 'poking it with a stick', hopefully someone out there has done this!