I need to generate a few seconds of video using a single image.
I tried loop
argument:
ffmpeg -loop 1 -t 4.5 -i https://url/to/image.jpg ...
It works but seems like ffmpeg requests the url for each frame. The default framerate
is 25, so it makes 100 requests for 4 seconds of video.
I can't set the framerate
to 1 because I add a text animation, so frames should be changed frequently.
But even if I can I don't want to request the same image for each second.
As a workaround, I can firstly download the image and then use a local version. This way the video generating will be much faster.
But anyway, is it possible to force ffmpeg to cache that image somehow and use it for each frame?
Use the loop and trim filters instead.
ffmpeg -i https://url/to/image.jpg -vf "loop=-1:1:0,trim=duration=4.5" ...