<p>Your understanding of what an encoder does is incorrect. It doesn't make up images to fill in the time between I frames. It does somewhat the opposite: it takes a full series of complete images and decomposes them so that only the I frames and the differences between them remain.</p>

<p>What you're asking for is, in animation terms, called <a href="https://en.wikipedia.org/wiki/Inbetweening" rel="nofollow">tweening</a>. The linked article will point you to some software that can do automated inbetweening, but it's usually not useful for real-life images over the durations you seem to have. For smaller intervals (a frame or two) the process is called <strong>interpolation</strong>.</p>

CC BY-SA 3.0
2014-06-26T11:03:33.630Z
This is much clearer to me now . Thank you my . It still seems to be something that is built into the encoder though .
James Andino
CC BY-SA 3.0
2014-06-26T12:50:47.963Z
no Jim Mack is completely correct, you don't fiddle with the internals of the encoder to *create* a movie. FFmpeg offers a lot of editing capabilities maybe thats the reason why you got confused.
timonsku
CC BY-SA 3.0
2014-06-26T14:00:54.973Z
I generally like this answer, but your description of tweening and interpolation is a bit off.  Interpolation is the process by which an image is grouped in to distinct elements that can be moved and the results are then tweened.  This is generally just called interpolation though.  Tweening is generally used when you already have distinct objects that you are generating in-between positional data for.
AJ Henderson
CC BY-SA 3.0
2014-06-26T10:44:34.180Z
2014-06-26T10:44:34.180Z
Jim Mack
<p>There are three options here.  One is to use a variable framerate format that can play back each frame for different lengths of time, however this would result in each frame jumping from one to the next which might not keep the illusion of motion if the frame rate is too low.  This would also be the smallest file size, but I'm not aware of any easily available encoders that would let you specify the length each frame is exposed.  (Granted, I haven't looked seriously for one.)</p>

<p>The second option is to simply place each frame on a timeline at the appropriate time in an editor and leave it up until the next frame is reached.  This can then use a traditional encoder, however it still requires a fair bit of manual work to layout the frames and results in a larger file than the first option.</p>

<p>The final option is to use interpolation software to interpolate objects out of the frame and generate between frames to smooth the motion.  This is by far the most complicated, but would also produce the smoothest results if done well.  If the gap is too wide, you will probably need to manually define objects in the scene with advanced interpolation software and have it generate the in between frames.  </p>

<p>Note that, as Jim Mack said, this is NOT something an encoder does.  An encoder only encodes the frames it is given, it makes no attempt to interpolate.  The closest to interpolation that an encoder might come is adjusting framerate on the fly (typically using a fixed conversion) or applying a de-interlace filter, but they do not offer a complex or particularly high quality interpolation solution.  Certainly not enough to handle what you are talking about.</p>

CC BY-SA 3.0
2014-06-26T23:46:10.850Z
Cool, I have been looking at image magiks morph and distort options as a way to fill the gaps .
James Andino
CC BY-SA 3.0
2014-06-26T14:08:34.777Z
2014-06-26T14:08:34.777Z
AJ Henderson
<p>I have a set of images that are in time stamped order ( the unit is seconds ) but not in a set interval </p>

<pre><code>012.png
017.png
024.png
</code></pre>

<p>etc.</p>

<p>How can I encode them so that each image is an Iframe at that given interval ?</p>

<p>Also possibly this is not what I want to do . I'm not sure if its mandatory to have videos have their Iframes at a fixed interval ( forgive my naivety about the subject )</p>

<p>Hopefully the images would interpolate between each other smoothly ( with a feel of motion ) . I can imagine a way to do it by just creating my own in-between images by interpolating in some way between two frames ( no chance I do as good a job as encoders already do ). </p>

<p>I feel like though that this is exactly what an encoder does and am trying to figure out if I can leverage it to do this frame generation work for me by handing it a list of Iframes with timestamps . </p>

<p>If this is something that needs to be done at a lower level c++ or by working directly with an encoder ( if thats the right term ) I would certainly be willing to work on that level . I am really unsure of the approach to take . </p>

<p>-------- Additional Information </p>

<p>I took a look at</p>

<p><a href="http://theora.org/doc/libtheora-1.0/group__encfuncs.html#gdbe7dd66b411c2d61ab8153c15308750" rel="nofollow">http://theora.org/doc/libtheora-1.0/group__encfuncs.html#gdbe7dd66b411c2d61ab8153c15308750</a>
But there doesn't seem to be a way to insert a frame at a target position .</p>

CC BY-SA 3.0
2014-06-25T15:18:58.317Z
Well, you should not know what exactly it is you want, otherwise no one can really help you with your issue.
Do you want the specific images to be still frames until the next image shows?
timonsku
CC BY-SA 3.0
2014-06-26T01:24:02.873Z
@ProfessorFartSparkle I hopefully improved my question a bit .
James Andino
<ffmpeg>
FFmpeg encod set of time stamped images as Iframes
James Andino
# FFmpeg encod set of time stamped images as Iframes

(Asked by: username_0 on 2014-06-25)

I have a set of images that are in time stamped order ( the unit is seconds ) but not in a set interval 
012.png
017.png
024.png

etc.
How can I encode them so that each image is an Iframe at that given interval ?
Also possibly this is not what I want to do . I'm not sure if its mandatory to have videos have their Iframes at a fixed interval ( forgive my naivety about the subject )
Hopefully the images would interpolate between each other smoothly ( with a feel of motion ) . I can imagine a way to do it by just creating my own in-between images by interpolating in some way between two frames ( no chance I do as good a job as encoders already do ). 
I feel like though that this is exactly what an encoder does and am trying to figure out if I can leverage it to do this frame generation work for me by handing it a list of Iframes with timestamps . 
If this is something that needs to be done at a lower level c++ or by working directly with an encoder ( if thats the right term ) I would certainly be willing to work on that level . I am really unsure of the approach to take . 
-------- Additional Information 
I took a look at
http://theora.org/doc/libtheora-1.0/group__encfuncs.html#gdbe7dd66b411c2d61ab8153c15308750
But there doesn't seem to be a way to insert a frame at a target position .

**Tags:** ffmpeg

> **Comments:**
> **username_1**: Well, you should not know what exactly it is you want, otherwise no one can really help you with your issue. Do you want the specific images to be still frames until the next image shows?  
> **username_0**: @ProfessorFartSparkle I hopefully improved my question a bit .  

---

## 2 answers

### Answer by username_3 on 2014-06-26. Score: 1 | Accepted answer

There are three options here. One is to use a variable framerate format that can play back each frame for different lengths of time, however this would result in each frame jumping from one to the next which might not keep the illusion of motion if the frame rate is too low. This would also be the smallest file size, but I'm not aware of any easily available encoders that would let you specify the length each frame is exposed. (Granted, I haven't looked seriously for one.)

The second option is to simply place each frame on a timeline at the appropriate time in an editor and leave it up until the next frame is reached. This can then use a traditional encoder, however it still requires a fair bit of manual work to layout the frames and results in a larger file than the first option.

The final option is to use interpolation software to interpolate objects out of the frame and generate between frames to smooth the motion. This is by far the most complicated, but would also produce the smoothest results if done well. If the gap is too wide, you will probably need to manually define objects in the scene with advanced interpolation software and have it generate the in between frames.

Note that, as username_2 said, this is NOT something an encoder does. An encoder only encodes the frames it is given, it makes no attempt to interpolate. The closest to interpolation that an encoder might come is adjusting framerate on the fly (typically using a fixed conversion) or applying a de-interlace filter, but they do not offer a complex or particularly high quality interpolation solution. Certainly not enough to handle what you are talking about.

> **Comments:**
> **username_0**: Cool, I have been looking at image magiks morph and distort options as a way to fill the gaps .  

---

### Answer by username_2 on 2014-06-26. Score: 2

Your understanding of what an encoder does is incorrect. It doesn't make up images to fill in the time between I frames. It does somewhat the opposite: it takes a full series of complete images and decomposes them so that only the I frames and the differences between them remain.

What you're asking for is, in animation terms, called [tweening](https://en.wikipedia.org/wiki/Inbetweening). The linked article will point you to some software that can do automated inbetweening, but it's usually not useful for real-life images over the durations you seem to have. For smaller intervals (a frame or two) the process is called **interpolation**.

> **Comments:**
> **username_0**: This is much clearer to me now . Thank you my . It still seems to be something that is built into the encoder though .  
> **username_1**: no username_2 is completely correct, you don't fiddle with the internals of the encoder to *create* a movie. FFmpeg offers a lot of editing capabilities maybe thats the reason why you got confused.  
> **username_3**: I generally like this answer, but your description of tweening and interpolation is a bit off.  Interpolation is the process by which an image is grouped in to distinct elements that can be moved and the results are then tweened.  This is generally just called interpolation though.  Tweening is generally used when you already have distinct objects that you are generating in-between positional data for.  

---

