Log in

View Full Version : fast framerate doubler?


leeperry
30th May 2009, 13:44
hi there,

atm I'm using Yadif(multithreaded on 4 threads) in the Avisynth filter of ffdshow to get double framerate on progressive content(23.976fps@48Hz mostly).

it works amazingly well! talk about perfect Trimension :)

except that it was really meant for deinterlacing in the first place, so credits look interlaced and blinking...

is there any other great looking and FAST framerate doubler for Avisynth?

:thanks:

scharfis_brain
30th May 2009, 14:41
yadif(mode=1) only works for true interlaced.
Also it doesn't double the content's framerate itself.
interlaced contents already have 'twice' the framerate (called the fieldrate)

if you try to make 48fps out of 24fps PROGRESSIVE contents with a fullframerate deinterlacer (also called a bobber)
you won't gain anything except of weirdnesses like flicker, aliasing etc.

In order to truely double the framerate of the content (eg enhance the flow of motion) you need to interpolate or synthesise new frames with avisynth plugins like
motion.dll or mvtools2.dll.

leeperry
30th May 2009, 14:46
ok thanks for the tips, I'll look into them.

well Yadif(3) does seem to improve the smoothness..and so does the framerate doubler in ffdshow...easy to spot on the starwars intros.

the slow panning scenes have twice less judder w/ Reclock in 23.976fps@48Hz using Yadif(3)..and there's no noticeable motion artifacts like w/ the ffdshow framerate doubler...it's a win-win! except for static credits, they look interlaced and blinking :o

scharfis_brain
30th May 2009, 14:59
forget both (yadif & frameratedoubler)
both harm more than they help for progressive framerate interpolation

I suggest you to get Motion_12Dec05.dll
http://forum.doom9.org/showthread.php?p=1100390#post1100390

and paste the following code into the avisynth section of ffdshow:

loadplugin("c:\x\Motion_12Dec05.dll") #of course, alter the path to Motion_12Dec05.dll
fps=75/1.0 #here put in your display's refresh rate. don't use reclock anymore!
wl=warpfast # luma accuracy vs. speed: warp, warpfast,move
wc=move # chroma accuracy vs. speed: warp, warpfast,move

last.combinefps(fps, last.motionfps(fps, wl, wc), last.motionfps(fps, wl, wc, source=next))

ensure to check following boxes:
[X] Add ffdhow video source
3:2 Pulldown [Ignore Pulldown]
Input colorspaces: [X]YV12 [ ]YUY2 [ ]RGB24 [ ]RGB32
[X] Buffer back/ahead: [10] [10]

leeperry
30th May 2009, 17:05
sounds good, but I'm definitely not going to drop Reclock :)

and I need something automatic(2X framerate), that will switch to 47.952/50/59.94 on the fly.

scharfis_brain
30th May 2009, 17:17
replace
fps=75/1.0
with
fps=last.framerate()*2

leeperry
31st May 2009, 14:35
OK I just tried it! that's WAY too much interpolating to my taste :eek:

and the artifacts on fast movements are even worse than Trimension DNM.

Apparently the framerate doubler/YADIF will only create a half interpolated frame....it looks smoother than 24p, but not quite 48p either ?! like a perfect "in between"? you get far less judder at the price of occasional jaggies/blinking static text.

I'll try less drastic interpolating scripts now :)

scharfis_brain
31st May 2009, 14:41
probably you only want simple frame blending:

interleave(last,merge(last,last.deleteframe(0)))

leeperry
31st May 2009, 15:01
almost :)

but Yadif(3) doesn't do any ghosting whatsoever, the slow moving motion blurred objects just look VERY smooth and very controlled! w/ this code, the motion blurred object seem out of control and not synced, like a bad IVTC..

actually YADIF w/o the "interlacing check" would most likely be exactly what I want.

any more suggestion please? http://forum-images.hardware.fr/images/perso/sniperr.gif

scharfis_brain
31st May 2009, 15:22
I don't know what you talking about.
yadif w/o interlacing check would be like displaying all frame twice!

and displaying all frames twice either can be solved by
interleave(last, last)
or by
selectevery(1,0,0)

or if you want to destroy the vertical definition of your progressive source you might even use
bob()


but either way: for progressive sources ANY deinterlacer will hurt the image quality and won't add any motion fluidity!

leeperry
31st May 2009, 15:52
well, as Delerue put it : http://forum.doom9.org/showpost.php?p=1291916&postcount=145

YADIF creates a half-interpolated frame between the 24p frames to turn into a fake 48p(more like 36 actually :confused: )

but of course for the half non-interpolated frame(field actually), you do get jaggies/combing :o

I will try all the scripts you gave me again, because I also use GrainFactory3() to do EE(but not w/ halos, w/ grain!) and I've found out that it looks better in PC range(256 values instead of 219), so maybe it'd look even better in 48fps instead of plain 24fps@48Hz....it makes the grain more "natural", I love this script :)

so interleave(last, last) & selectevery(1,0,0) do the same exact thing? I need the fastest possible way to double each frame I guess.

Didée
31st May 2009, 17:09
YADIF creates a half-interpolated frame between the 24p frames to turn into a fake 48p(more like 36 actually :confused: )

No, NO, NO.
Yadif does nothing like that. When you put it in bob mode, Yadif will interpolate the even frames from the even fields, and interpolate the odd frames from the odd fields. Since you are using it on progressive content, the source's even field shows the same point in time as the odd field shows. And so, necessarily, in Yadif's output the even frames will show the same point in time as the odd frames.

There is absolutely zero motion-compensation done by Yadif, and there is no logical reason why anything "additional" should be produced by Yadif bobbing progressive content.

OK, bypass theory, just let's try it ...

mpeg2source("source.d2v") # this is PAL, progressive
return( Yadif(3) )

then ... ah, indeed: I'm getting output at 50fps that goes like: motion - stop - motion - stop - motion - stop ...


In a word:
I don't know what you talking about.

2Bdecided
1st June 2009, 11:37
convertfps(last.framerate()*2)

leeperry
1st June 2009, 13:46
convertfps(last.framerate()*2)
this is smooth! but quite blurry.

anyway, I don't think we can say that all these script lines would output the SAME exact 24p frames in 48Hz :

FrameDbl(3,3)
Yadif(1)
convertfps(last.framerate()*2)
interleave(last, last)
selectevery(1,0,0)

well yadif is uber-smooth(I'm quite sure that BOB deinterlacing makes one interpolated field between each original frame :o ) but the combing is a showstoppper :(

FrameDbl(3,3) looks good, is smoother than selectevery(1,0,0)...yet doesn't really blur/add artifacts.

I'm doing the test on my old CRT, I'll try again on my DLP projector in 48Hz this evening.

if your display is only 60Hz capable, you could use a 29.97fps slow panning scene...and use Reclock to make it stick to your refresh rate(exact half framerate), then you'd notice the smoothness improvement I think :)

Gavino
1st June 2009, 16:39
Have you tried ChangeFPS(frameRate*2)?

It produces something intermediate between SelectEvery(1,0,0) and Interleave(last, last). :)

leeperry
1st June 2009, 17:05
Have you tried ChangeFPS(frameRate*2)?

It produces something intermediate between SelectEvery(1,0,0) and Interleave(last, last). :)
this looks quite nice! and seems to be really fast in ffdshow :)

scharfis_brain
1st June 2009, 17:09
@gavino: these three should produce an identical output.

Gavino
1st June 2009, 17:11
Yes, I know. ;)

2Bdecided
1st June 2009, 17:12
@gavino: these three should produce an identical output.Didn't you see the smiley? Or are you intentionally being far too kind to leeperry?

Cheers,
David.

scharfis_brain
1st June 2009, 17:16
I think that more the first one than the latter one was the course...

leeperry
1st June 2009, 17:17
haha ok, I fell for placebo http://forum-images.hardware.fr/images/perso/ploumm.gif

well my CRT is not THAT smooth to begin w/...my DLP pj is far less forgiving.

anyway, FrameDbl(3,3) does work...yes? and it doesn't have that TV look.

scharfis_brain
1st June 2009, 17:24
FrameDbl() itself clains mocomped frameinterpolation, but is more or less like a frameblender.

leeperry
1st June 2009, 17:33
hehe OK, I'm a victim of collective hallucination I guess...I'm not the only one on another forum who thought that these things actually created interpolated frames somehow.

I've done frame-by-frame examination in KMPlayer, and that's not quite the case :rolleyes:

fact is that it helps GrainFactory3() to give a more true-to-life result w/ 48fps/256 levels(in PC range) instead of 24/219(on the stock content)...so it still looks better :)

and ChangeFPS(frameRate*2) does play nicer than the others I think w/ ffdshow+Reclock(HR's jitter's far more stable apparently in 48Hz), will run more tests!

:thanks:

thetoof
1st June 2009, 23:20
The only reason I see why grainfactory3 would look "better" with frame doubling is that the grain is refreshed twice for every single frame.

Changefps may look "better" since it blends two frames to create the intermediate one, creating a less stuttery look, but imo blends are a nuisance that I want to get rid of.

leeperry
1st June 2009, 23:34
Well, when I do frame-by-frame inspection in KMPlayer, there's always 2 identical frames in a row w/ all these framerate doublers :confused:

It sounds like they're just doubled, there doesn't seem to be any blending taking place(w/ 23.976fps@47.952fps, accelerated to 48fps@48.000Hz by Reclock)...if there were some actual "new" interpolated content, it would instantly get a Trimension/TV look I think.

well GrainF3 already looks better in PC range than TV...my displays are 0-225 anyway, I guess the grain is not poorly interpolated but is actually using the whole luma range...so going 48fps is the same thing, it just gives an even more "true to life" analog grain :)

Gavino
1st June 2009, 23:34
Changefps may look "better" since it blends two frames to create the intermediate one
No, it's ConvertFPS that does that - ChangeFPS just repeats frames.

leeperry
1st June 2009, 23:37
...and this one looked blurry indeed!

thetoof
2nd June 2009, 00:52
Woopsie, I was thinking about convertfps after reading David's post but answered to leeperry's changefps comment. Anyways, thanks Gavino for spotting this one.

2Bdecided
2nd June 2009, 12:12
haha ok, I fell for placebo http://forum-images.hardware.fr/images/perso/ploumm.gifMaybe, maybe not. What refresh rate are you running your monitor at? It could be 24p and 48p get handled differently when bumped up to 60Hz, 72Hz or whatever - though in a situation where there was a real difference due to this, you wouldn't expect the frame-duplicated 48p to necessarily be better.

Cheers,
David.

leeperry
2nd June 2009, 12:22
I ran all the tests in 48.000Hz w/ Reclock+HR on XP SP3, I find the SW3 intro smoother...sometimes :D

it doesn't hiccup as much w/ some of these script lines :o

2Bdecided
2nd June 2009, 13:47
I think you need to fully understand / debug what's happening on your system - AFAIK if ReClock was working properly there should be absolutely no difference.

It's not always easy to figure it all out, e.g. ...
http://forum.slysoft.com/showthread.php?t=21863

Cheers,
David.

leeperry
2nd June 2009, 14:02
don't worry, I'm quite aware of Reclock's mechanism ;)

it's just that going 48fps gives twice more footage to GrainF3()...which makes the picture somewhat nicer to look at :)

then I've prolly got a bad case of placebo on top of it, I know I can't trust my brain for audio...it's prolly identical for video, up to some point :rolleyes:

several other ppl on HCFR find the ffdshow framerate doubler to improve smoothness(w/ Reclock and a perfectly matched refresh rate), and that just isn't true if you do frame-by-frame examination :o

2Bdecided
2nd June 2009, 14:10
Well, apart from the grain, it's probably placebo.

However, single rate image + double rate grain could also slightly improve the perception of movement - our eyes are funny things - if that's what's happening, that isn't placebo - it's a useful psycho visual trick that you've discovered!

Cheers,
David.

THX-UltraII
2nd October 2009, 11:46
I read this thread a few times now but still wondering what I should use best when I want:

Some kind of 'Frame Interpolation' for 23,976fps material without having artifact so I don t have to buy a new Epson projector or something similar :)

My equipment:

Software:
Windows7, latest MPC-HC with EVR custom output, latest ffdshow tryout, Haali Media Splitter and Reclock as audio renderer. I use both LPCM (decoded signal eg. .ACC) and DTS (not decoded by PC but send digital over HDMI).

Hardware:
HTPC with ATI HD4350, JVC RS2 projector

leeperry
2nd October 2009, 11:53
Some kind of 'Frame Interpolation' for 23,976fps material without having artifact
not possible...fake in-between frames give nasty visible artifacts.

try "ChangeFPS(frameRate*2)", I like it a lot...it's said to not change anything, so YMMV :D

It might have at least one merit...forcing the video renderer to actually play these 48fps smoothly.

THX-UltraII
2nd October 2009, 12:04
not possible...fake in-between frames give nasty visible artifacts.

try "ChangeFPS(frameRate*2)", I like it a lot...it's said to not change anything, so YMMV :D

It might have at least one merit...forcing the video renderer to actually play these 48fps smoothly.

thanks for your quick reply m8.

So you re saying that a HTPC can never do what eg. the new Epson projector can do?

How do I make this ''ChangeFPS(frameRate*2)'' thing work?

leeperry
2nd October 2009, 12:09
install avisynth then put it in the ffdshow Avisynth filter.

prolly your Epson pj does DNM Trimension-like? everything's upconverted to 60fps? it takes too much CPU power to do that on HD....but you can use WinDVD's video decoder on DVD if you like, very nice on slow movements...ugly as sin on fast ones.

THX-UltraII
2nd October 2009, 12:34
but for HD it is possible to do this thing you say ChangeFPS(frameRate*2) if my PC is fast enough?

leeperry
2nd October 2009, 12:41
yes, but it won't create additional frames...it will simply force your video renderer to display twice more frames in a tighter way, maybe. Reclock is mandatory anyway if you wanna try it.

THX-UltraII
2nd October 2009, 12:45
yes, but it won't create additional frames...it will simply force your video renderer to display twice more frames in a tighter way, maybe. Reclock is mandatory anyway if you wanna try it.

ok, so Reclock is needed for this? Thats good for me since I use this. What do you mean when you say MAYBE?

Is this the way it should work?

http://img198.imageshack.us/img198/1217/naamloosjf.jpg (http://img198.imageshack.us/i/naamloosjf.jpg/)

leeperry
2nd October 2009, 12:50
yep!

"maybe" coz everything says it should be placebo, but it looks smoother to me(w/ GrainFactory3 on 48fps so that's a nice combo)...which is all that matters :D

THX-UltraII
2nd October 2009, 13:01
yep!

"maybe" coz everything says it should be placebo, but it looks smoother to me(w/ GrainFactory3 on 48fps so that's a nice combo)...which is all that matters :D

what do you mean with COMBO? Do I just add an extra line called ''GrainFactory3'' in the AviSynth script area?

Another question:
I it also possible to use AviSynth with MPC-HC WITHOUT the need to use ffdshow?

82ross
8th October 2009, 20:22
not possible...fake in-between frames give nasty visible artifacts.

try "ChangeFPS(frameRate*2)", I like it a lot...it's said to not change anything, so YMMV :D

It might have at least one merit...forcing the video renderer to actually play these 48fps smoothly.

Im currently using the method described here in post #87

http://www.avsforum.com/avs-vb/showthread.php?t=1025800&page=3

It hardly ever gives me any artifacts. Im very happy with the results.