Log in

View Full Version : Is it possible to create plugin which can change framerate?


Victoire
24th March 2004, 17:34
subj
More detailed: External plugin has input video with 25 fps. Can this plugin output treated video with doubled or tripled framerate (50 or 75 fps, with the same resolution and duration). How I can realize that?

Bidoche
24th March 2004, 19:44
There are no constraints between input and output video.

That is to say a plugin can do exactly what you said (and more)

If your filter inherit from GenericVideoFilter, you do it by directly altering the value of herited VideoInfo member vi (in your filter constructor).
vi.framerate = ...
vi.framecount = ... //I may have mismaned the properties to alter, but the idea is thereOf course, you have to respect the promise you do in vi and output the correct number of frames.

SoonUDie
24th March 2004, 19:55
What do you mean by doubled framerate? There are a couple ways to do this:
1. Duplicated Frames (a, b) -> (a, a, b, b)
2. Blended Frames (a, b) -> (a, [(a+b)/2], b, [(b+c)/2])
3. Interpolated Frames (a, b) -> (a, I(a,b), b, I(b,c))

I assume you mean interpolated. Unfortunately, that's really hard to do. There are commercial programs out there that do this pretty well, though they cost hundreds of dollars.
http://www.revisionfx.com/rstwixtor.htm
http://www.borisfx.com/products/RED/index_3gl.php


A free, but not-as-great alternative is trbarry's FrameDbl filter (www.trbarry.com)

sh0dan
24th March 2004, 22:00
You are all right!

You can have a look at the ChangeFPS (http://cvs.sourceforge.net/viewcvs.py/avisynth2/avisynth/src/filters/fps.cpp?view=auto&rev=1.1&sortby=date&only_with_tag=MAIN) source. It implements a simple frameduplication.

Victoire
17th April 2004, 15:58
Thank you for the help! ChangeFPS source is the best explanation.
I think this thread may be closed...

mf
17th April 2004, 16:13
Originally posted by Victoire
Thank you for the help! ChangeFPS source is the best explanation.
I think this thread may be closed...
It doesn't work that way. The thread stays until someone has something to add :).

scharfis_brain
20th April 2004, 11:57
for some kind of easy motioncompensation, have a look in the genmotion-thread :)