Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

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 .

share|improve this question
    
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? –  Professor Sparkles Jun 25 at 15:18
    
@ProfessorFartSparkle I hopefully improved my question a bit . –  James Andino Jun 26 at 1:24

2 Answers 2

up vote 1 down vote accepted

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 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.

share|improve this answer
    
Cool, I have been looking at image magiks morph and distort options as a way to fill the gaps . –  James Andino Jun 26 at 23:46

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. 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.

share|improve this answer
    
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 Jun 26 at 11:03
1  
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. –  Professor Sparkles Jun 26 at 12:50
    
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 Jun 26 at 14:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.