user34184: I have this one jpg image which changes approx. every 4 seconds.
Based on this image, I want to make a 60 second long video.
I tried this.
ffmpeg -t 60 -loop 1 -r 1 -i input.jpg -r 1 output.mp4
This code makes a 60 second long video of the current image...
But I want a video of how the image has changed in the 60 seconds.
How can i do this with FFmpeg ?
Alternatively, I thought maybe I might be able to stream the image while grabbing this stream.

user4943: I do not think it would be practical to expect FFMpeg to do something like this. However, we can note, that there is no way to actually finish this task in less than 4 minutes anyhow, so the slight overhead needed to encode the video after grabbing all the images is minor.
Therefore, i would approach it in two steps:
First, grab all the frames:
for i in {01..60}; do cp input.jpg $i.jpeg; sleep 4; done

And only then do we encode:
ffmpeg -r 1 -i %02d.jpeg [other encoding options you may need] [output]

Once you are satisfied, simply remove the temporary files.

34184: <p>I have this one jpg image which changes approx. every 4 seconds.
Based on this image, I want to make a 60 second long video.</p>
<p>I tried this.</p>
<p><code>ffmpeg -t 60 -loop 1 -r 1 -i input.jpg -r 1 output.mp4</code></p>
<p>This code makes a 60 second long video of the current image...</p>
<p>But I want a video of how the image has changed in the 60 seconds.</p>
<p>How can i do this with FFmpeg ?</p>
<p><em>Alternatively, I thought maybe I might be able to stream the image while grabbing this stream.</em></p>
 4943: <p>I do not think it would be practical to expect FFMpeg to do something like this. However, we can note, that there is no way to actually finish this task in less than 4 minutes anyhow, so the slight overhead needed to encode the video after grabbing all the images is minor.</p>
<p>Therefore, i would approach it in two steps:</p>
<p>First, grab all the frames:</p>
<pre><code>for i in {01..60}; do cp input.jpg $i.jpeg; sleep 4; done
</code></pre>
<p>And only then do we encode:</p>
<pre><code>ffmpeg -r 1 -i %02d.jpeg [other encoding options you may need] [output]
</code></pre>
<p>Once you are satisfied, simply remove the temporary files.</p>
