POV-Ray : Newsgroups : povray.advanced-users : inserting an interval between 2 frames in a MPEG file Server Time
29 Jul 2024 10:32:14 EDT (-0400)
  inserting an interval between 2 frames in a MPEG file (Message 1 to 3 of 3)  
From: Herman Serras
Subject: inserting an interval between 2 frames in a MPEG file
Date: 15 Aug 2002 09:29:38
Message: <3D5BAD1B.14CA1DC@pandora.be>
Using a program (ex. movgear) to construct animated giffiles starting
with a series of giffiles it's possible to change the time interval
between any 2 succesive gif images. In this way it's possible to insert
a larger time interval at one point of the animation.
Using TMPPGenc to construct a mpeg file the framerate has to been
choosen. So I can't obtain the same effect as in an animated giffile:
ex. an interval in the middle of the animation, or a non constant
interval between the successive images.
Is there a possibility to do this? 
-- 
Herman Serras
http://cage.rug.ac.be/~hs/


Post a reply to this message

From: Le Forgeron
Subject: Re: inserting an interval between 2 frames in a MPEG file
Date: 16 Aug 2002 06:05:17
Message: <3D5CCE6F.1030601@free.fr>
Herman Serras wrote:

> Using a program (ex. movgear) to construct animated giffiles starting
> with a series of giffiles it's possible to change the time interval
> between any 2 succesive gif images. In this way it's possible to insert
> a larger time interval at one point of the animation.
> Using TMPPGenc to construct a mpeg file the framerate has to been
> choosen. So I can't obtain the same effect as in an animated giffile:
> ex. an interval in the middle of the animation, or a non constant
> interval between the successive images.
> Is there a possibility to do this? 
> 

Gif file contains active code directive (display first image for a 
number of tic, then display that one over for another tic counts... and 
so on, they even have a loop a finite/infinite number of time).

Mpeg is a stream. The stream has a rate of frame per second.
There is different kind of frames:
  I : full picture
  P : forward prediction (forward delta)
  B : backward prediction  (more subtle)
and maybe a fourth kind...
Whatever the kind, the number of frame per second should be followed.

The content of the streams must be made of frames, but which kind is 
nearly free (or but you need at least an I to start for).
Of course, that what the standard says.
Many encoders just use a fixed patterns for frames, IPPBPPBPP being the 
probably the mostly used.
If you had full control of the encoders, you could just have a I frame 
when you change the picture, followed by enough (empty)-P frames (no 
change) until you want to change again the picture.

The most obvious ways to trick an encoder to make something like that is 
to duplicate each image the number of frames you want it, leaving the 
encoder to discover that there is very little change when it use its 
preferred sequence. Of course, being able to predict the I frame 
position allow to have a better encoding.


Post a reply to this message

From: Hugo
Subject: Re: inserting an interval between 2 frames in a MPEG file
Date: 16 Aug 2002 13:47:48
Message: <3d5d3ac4$1@news.povray.org>
> duplicate each image the number of frames you want it,
> leaving the encoder to discover that there is very little
> change when it use its preferred sequence.

When a number of successive frames are duplicates (FULLY similar), only the
first frame will contain the actual picture, and the rest won't take up
memory at all, until the next "I frame" appears (called "I frame" in mpeg1
and otherwise called "key frame". It always contains all data for the entire
picture).

Normally key-frames comes with a fixed interval, meaning between a fixed
amount of frames, but usually the amount can be adjusted by the user.. Good
encoders also search for significant changes in a movie, for example
switches between cameras in a talking sequence, and when found, it places a
key-frame there because the whole picture changes anyway.

It's possible with at least DivX to have 300 frames between key-frames. With
a rate of 25 pr sec, that means you could have 12 seconds holding the same
picture, without loosing memory.

Regards,
Hugo


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.