Avisynth Script for doubling video frame rates - Page 37 - AVS Forum
Forum Jump: 
Reply
 
Thread Tools
post #1081 of 1968 Old 03-13-2011, 02:25 PM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 327
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
AssumeFPS is usually how professionals do it; if you buy a DVD of an American movie or TV show in PAL countries usually they have just used a function similar to AssumeFPS to speed up the video by 4%.
It is the cleanest way to do it because it doesn't require any interpolation.

If you really want to use MVTools2 you could set num to 50 then add SelectEven() below it, that will output 25fps and then you avoid the 4% speedup, but I don't know if it will look good.
The interpolation errors that MVTools2 creates aren't so noticeable because of the high framerate (if there is a bad frame it is only shown for a short time) but lowering the framerate to 25 will make the errors more visible.

I think it's an interesting idea, and last week I tried to see if there would be any difference between doing AssumeFPS from 24 to 25, then MVTools2 from 25 to 50 as opposed to just MVTools from 24 to 50.
In my tests I found that there was hardly any difference so decided against it, since the 4% speedup annoys me because I hear the pitch-shift, especially in TV show theme songs.

I just wish all video was in direct multiples of 29.97FPS. That is a nice framerate. I hate 23.976fps and 25fps
Thankfully most blu-rays in PAL countries are 23.976FPS so they seem to be getting rid of PAL, which is a good step in the right direction
SubJunk is offline  
Sponsored Links
Advertisement
 
post #1082 of 1968 Old 03-13-2011, 03:55 PM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 327
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I can tell clearly which one is stuttering
Interestingly it seems more noticeable in this clip in a place of low-motion; at about 4 seconds in - after frame 270ish when she is slowing down - on the left it looks like the video is struggling to play at full speed (like there are frame drops) but on the right it looks smooth.

I will see if I can make the script stop merging the scene change frames because you're right that is sloppy.
It is hardly noticeable since it appears like a very quick fade, but it would be nice to get rid of it
SubJunk is offline  
post #1083 of 1968 Old 03-13-2011, 04:28 PM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 327
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Sure I can do that.
So do you mean you want it to use the following code?

Code:
video=ffdshow_source()
A=video
B=A.MSuper(pel=2, hpad=8, vpad=8, levels=4, rfilter=2, isse=true)
One=MAnalyse(B, isb=true, blksize=16, levels=4, search=3, searchparam=1, badrange=(-28), isse=true, sadx264=7, dct=8, pnew=450)
Two=MRecalculate(B, One, chroma=false, blksize=16,  blksizev=16, search=3, searchparam=1, isse=true, sadx264=7, dct=8, pnew=450)
three=MAnalyse(B, isb=false, blksize=16, levels=4, search=3, searchparam=0, badrange=(-18), isse=true, sadx264=7, dct=8, pnew=500)
four=MRecalculate(B, three, chroma=false, blksize=16, blksizev=16, search=3, searchparam=0, isse=true, sadx264=7, dct=8, pnew=500)
A.MFlowFps(super, backward_3, forward_3, num=60, den=1, ml=10000)
P.S. You can follow the link in my signature to be able to do these tests yourself.

P.P.S. In your script, two and four are still being ignored, so you may as well remove those lines to make it:

Code:
video=ffdshow_source()
A=video
B=A.MSuper(pel=2, hpad=8, vpad=8, levels=4, rfilter=2, isse=true)
One=MAnalyse(B, isb=true, blksize=16, levels=4, search=3, searchparam=1, badrange=(-28), isse=true, sadx264=7, dct=8, pnew=450)
Two=MAnalyse(B, isb=false, blksize=16, levels=4, search=3, searchparam=0, badrange=(-18), isse=true, sadx264=7, dct=8, pnew=500)
A.MBlockFps(B, One, Two, num=FramerateNumerator(A)*2, den=FramerateDenominator(A)*1, mode=1)
last.blendfps(60, aperture = 0.0)
SubJunk is offline  
post #1084 of 1968 Old 03-13-2011, 06:49 PM
Member
 
mark007's Avatar
 
Join Date: Dec 2006
Posts: 196
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I use madvr but don't recommend straying from it's defaults unless they give trouble. What's causing the problems you notice? If madvr is at fault I think you should let madshi know etc

Why resize in ffdshow when madvr does such a good job? I just use avisynth with ffdshow nothing else and let madvr defaults handle the rest and get great results....
mark007 is offline  
post #1085 of 1968 Old 03-13-2011, 11:35 PM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 327
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by 8:13 View Post
This code:

Code:
setmtmode(2, 8)
video=ffdshow_source()
A=video
setmtmode(2)
B=A.MSuper(pel=2, hpad=8, vpad=8, levels=4, rfilter=2, isse=true)
One=MAnalyse(B, isb=true, blksize=16, levels=4, search=3, searchparam=1, badrange=(-28), isse=true, sadx264=7, dct=8, pnew=450)
Two=MRecalculate(B, One, chroma=false, blksize=16, blksizev=16, search=3, searchparam=1, isse=true, sadx264=7, dct=8, pnew=450)
three=MAnalyse(B, isb=false, blksize=16, levels=4, search=3, searchparam=0, badrange=(-18), isse=true, sadx264=7, dct=8, pnew=500)
four=MRecalculate(B, three, chroma=false, blksize=16, blksizev=16, search=3, searchparam=0, isse=true, sadx264=7, dct=8, pnew=500)
A.MFlowFps(B, One, Three, num=FramerateNumerator(A)*2, den=FramerateDenominator(A)*1)
last.blendfps(60, aperture = 0.0)
GetMTMode(false) > 0 ? distributor() : last
I know how to encode and I would ask you for the source but I might get you into trouble, and that by design would get me into trouble. So I ask you to encode the test.
Well I wouldn't get into trouble since I own the blu-ray, I'm encoding from my personal rip
However, feel free to use your own sources to test, I just picked the video at random. Anything but that test pattern, since it is misleading.

OK, I've made 3 new files because I deleted the sources for yesterday's tests so I lost the exact frame cuts. Since you wanted to put them side-by-side I remade them all.

The downloads are:
8:13 - MBlockFPS
8:13 - MFlowFPS
SubJunk

The scripts used are:

8:31 - MBlockFPS:
Code:
video=ffdshow_source()
A=video
B=A.MSuper(pel=2, hpad=8, vpad=8, levels=4, rfilter=2, isse=true)
One=MAnalyse(B, isb=true, blksize=16, levels=4, search=3, searchparam=1, badrange=(-28), isse=true, sadx264=7, dct=8, pnew=450)
Two=MRecalculate(B, One, chroma=false, blksize=16, blksizev=16, search=3, searchparam=1, isse=true, sadx264=7, dct=8, pnew=450)
three=MAnalyse(B, isb=false, blksize=16, levels=4, search=3, searchparam=0, badrange=(-18), isse=true, sadx264=7, dct=8, pnew=500)
four=MRecalculate(B, three, chroma=false, blksize=16, blksizev=16, search=3, searchparam=0, isse=true, sadx264=7, dct=8, pnew=500)
A.MBlockFps(B, One, Three, num=FramerateNumerator(A)*2, den=FramerateDenominator(A)*1, mode=1)
last.blendfps(60, aperture = 0.0)
8:31 - MFlowFPS:
Code:
video=ffdshow_source()
A=video
B=A.MSuper(pel=2, hpad=8, vpad=8, levels=4, rfilter=2, isse=true)
One=MAnalyse(B, isb=true, blksize=16, levels=4, search=3, searchparam=1, badrange=(-28), isse=true, sadx264=7, dct=8, pnew=450)
Two=MRecalculate(B, One, chroma=false, blksize=16, blksizev=16, search=3, searchparam=1, isse=true, sadx264=7, dct=8, pnew=450)
three=MAnalyse(B, isb=false, blksize=16, levels=4, search=3, searchparam=0, badrange=(-18), isse=true, sadx264=7, dct=8, pnew=500)
four=MRecalculate(B, three, chroma=false, blksize=16, blksizev=16, search=3, searchparam=0, isse=true, sadx264=7, dct=8, pnew=500)
A.MFlowFps(B, One, Three, num=FramerateNumerator(A)*2, den=FramerateDenominator(A)*1)
last.blendfps(60, aperture = 0.0)
8:31 - SubJunk:
Code:
ffdshow_source()
super = MSuper(pel=2, hpad=16, vpad=16, rfilter=4)
backward_1 = MAnalyse(super, isb=true, blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24), dct=5)
forward_1 = MAnalyse(super, isb=false, blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24), dct=5)
backward_2 = MRecalculate(super, backward_1, blksize=8, searchparam=1, search=3, dct=5)
forward_2 = MRecalculate(super, forward_1, blksize=8, searchparam=1, search=3, dct=5)
backward_3 = MRecalculate(super, backward_2, blksize=4, searchparam=0, search=3, dct=5)
forward_3 = MRecalculate(super, forward_2, blksize=4, searchparam=0, search=3, dct=5)
MFlowFps(super, backward_3, forward_3, num=60, den=1, ml=10000)
I think it would be better to just watch videos with no script than that one, at least then the motion would be constant.
I think all the stuttering could cause headaches for people even if they don't notice it, so please be careful.
SubJunk is offline  
post #1086 of 1968 Old 03-14-2011, 02:43 AM
Member
 
rinorho's Avatar
 
Join Date: Jun 2004
Location: italy
Posts: 188
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Hei Guys,
Just a pair of questions...

All know to run 1080p Avsynth scripts we need one Rock Solid overclocked top level CPU. ( like i7 )

-Have you in your Overclocked Systems enabled Intel Hyper Threading?

-Which are your temperatures in CORE TEMP or Real Temp, monitoring softwares?

They are very important issues!

Thanks a lot

bye
rinorho is offline  
post #1087 of 1968 Old 03-14-2011, 04:37 AM
Senior Member
 
widezu69's Avatar
 
Join Date: Feb 2010
Posts: 319
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I have been following your conversation and I have my own analyses: 8:13's script is decent. Provides good performance but upon frame by frame analysis some things like the person walking across the crowd, it is not as accurate. What 8:13's script does do better in some cases is the cuts from one shot to another but that is probably due to the use of searchparam=1 in the first pass, SubJunk's uses searchparam=3 which I use because some scenes aren't smooth enough with anything lower. The only thing I can say is that both scripts are pretty good now. I and using blksize=8 in my MSuper line and I would advise Sub to take a look at this as I think it is better than 16.
widezu69 is offline  
post #1088 of 1968 Old 03-14-2011, 05:21 AM
Member
 
mark007's Avatar
 
Join Date: Dec 2006
Posts: 196
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
8:13, does madshi know about the issue you reported regarding frame stepping and the madvr settings required? If not I think you should let him know. Perhaps madVR just doesn't support mpc-hc framestepping, madshi should be able to explain and perhaps implement a fix in the next madVR? Might be of benefit to most users that way.

When you say certain scripts add blur, I think to have the scripts emulate what most movies are shot with, a hd camera, some motion blur should appear. Even 3d tools like 3dsmax have advanced camera motion blur filters to correctly emulate the blur seen when images are shot with the cameras. I think any script that shows no blur at all should be disregarded. For me I'm trying to have interpolated frames appear as if they were shot with a camera, not created by an artificial source with no blur whatsoever.. just my 2c

FYI: tal.aloni has reverted the changes added in ffdshow 3358 in the new build 3775 so hopefully that should get rid of the avisynth stability issues people were having post 3358.
http://ffdshow-tryout.svn.sourceforg...&revision=3775
mark007 is offline  
post #1089 of 1968 Old 03-14-2011, 12:20 PM
Member
 
travolter's Avatar
 
Join Date: May 2009
Posts: 162
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by mark007 View Post

FYI: tal.aloni has reverted the changes added in ffdshow 3358 in the new build 3775 so hopefully that should get rid of the avisynth stability issues people were having post 3358.
http://ffdshow-tryout.svn.sourceforg...&revision=3775

thanks for the info pal! I hope no more crashes after loading several files in these new FFDshow updates
travolter is offline  
post #1090 of 1968 Old 03-14-2011, 01:28 PM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 327
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by 8:13 View Post

And here is the sample clips stacked side by side:

Mine, Blockfps is on the left and flowfps is on the right

Subjunks is on the left and my flowfps is on the right

That's a great comparison video to use, nice level of motion. Not too fast but fast enough to show artifacts.

The scripts both do well in that video, I agree with Widezu, but there are some places where I think you can see the benefits of mine:

At about 14 seconds in, watch the man's arm as he is walking. On the left it is kept intact but on the right it keeps getting broken apart. I haven't frame-stepped it so I'm just going by watching the video at full speed.

Also at about 25 as he reveals himself from under the cloak the same thing happens, while on the left it is more precise. Not as obvious as the first example but still there.

Quote:
Originally Posted by widezu69 View Post

I and using blksize=8 in my MSuper line and I would advise Sub to take a look at this as I think it is better than 16.

Is that 8-4-4 now? or 8-8-4? or no 3rd pass?
SubJunk is offline  
post #1091 of 1968 Old 03-14-2011, 03:05 PM
Member
 
travolter's Avatar
 
Join Date: May 2009
Posts: 162
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by widezu69 View Post

I and using blksize=8 in my MSuper line and I would advise Sub to take a look at this as I think it is better than 16.

Since a week Im using blksize=8 in msuper too. The movement is more fluid than 16. Maybe some artifacts are produced (Im using 1 recalculate with blksize=4, and no 3rd pass), but I cannt go back to blkzise=16 again. The image is more fluent now.

widezu69, how many recalculates are you using? what values?.
If you wrote a new script to use blcksize=8 and get rid of max number of artifacts plz post
travolter is offline  
post #1092 of 1968 Old 03-14-2011, 03:19 PM
Member
 
mark007's Avatar
 
Join Date: Dec 2006
Posts: 196
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Guys does anyone know how mvtools generates the final / output timestamps. I have some files which are badly marked as 23.976hz when they are actually 24.000 hz in reality. When playing these back in evr-cp in mpc-hc, even at 24.000hz, the evr ctrl-J graph is very erratic, I can only assume due to some messy timestamps within the file itself...

But when using avisynth / mvtools to convert to 50fps, I imagine the output would have perfectly smooth timestamps but evr-cp again shows a very rough looking green line in its graph. So my question is, does mvtools generate timestamps from scratch itself or are they calculated on the fly as some function of the original timestamps which might explain the effect I am seeing in evr-cp graphs even after being passed through mvtools.
mark007 is offline  
post #1093 of 1968 Old 03-14-2011, 03:23 PM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 327
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I think MVTools will take the timestamps from AviSynth
Try putting AssumeFPS(24) after the video input line but before the MVTools2 lines
SubJunk is offline  
post #1094 of 1968 Old 03-14-2011, 03:28 PM
Member
 
mark007's Avatar
 
Join Date: Dec 2006
Posts: 196
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Thanks for that SubJunk. I was actually trying that this morning but to no avail. Maybe its an issue with my pc but its only a few files that exhibit this erratic graph in evr-cp.

If anyone is interested in having a look please do, its lady gaga's new music video, 1080p.
http://www.megaupload.com/?d=EPF2JCYM

I assume it was recorded from TV or something, but for the life of me I can't get those evr-cp graphs to look smooth with this file, at 23.976, 24.000 hz or at 50.000 hz with my avisynth scripts in operation... If you get a chance to try it out with evr-cp I'd appreciate your feedback.. If I could workaround the issue with some avisynth trickery I would be happy because as I say, I was surprised to find many files on my that exhibit this behaviour, independent of splitters / decoders..

eg of the type of wavy graph I'm seeing with evr-cp but the avisynth mvtools scripts don't seem to smooth it out



Playback of other content like blu-rays etc is perfectly flat / smooth. These problem files show much more frame drops than others when using avisynth scripts.
mark007 is offline  
post #1095 of 1968 Old 03-14-2011, 03:47 PM
Senior Member
 
widezu69's Avatar
 
Join Date: Feb 2010
Posts: 319
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
@Sub no i mean the MSpuer line. The three passes should still stay 16/8/4.

Here is my script. 3 passes 16/8/4 with blksize=8 in the MSuper line. I don't use dct etc. too hard on my processor. Got rid of badrange as it defaults to those values. I'm sticking with this for now.

SetMTMode(1,16)
V = ffdshow_source()
SetMTMode(2)
S = V.MSuper(pel=2, hpad=8, vpad=8, rfilter=4)
A = S.MAnalyse(isb=true, blksize=16, plevel=0, search=3, searchparam=3)
B = S.MAnalyse(isb=false, blksize=16, plevel=0, search=3, searchparam=3)
C = S.MRecalculate(A, blksize=8, blksizev=8, search=3, searchparam=2)
D = S.MRecalculate(B, blksize=8, blksizev=8, search=3, searchparam=2)
E = S.MRecalculate(C, blksize=4, blksizev=4, search=3, searchparam=1)
F = S.MRecalculate(D, blksize=4, blksizev=4, search=3, searchparam=1)
V.MFlowFps(S, E, F, num=FramerateNumerator(V)*2, den=FramerateDenominator(V)*1, mask=2, ml=10000)
GetMTMode(false) > 0 ? distributor() : last

BTW this is best for 720p video.
widezu69 is offline  
post #1096 of 1968 Old 03-14-2011, 04:06 PM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 327
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by mark007 View Post

Thanks for that SubJunk. I was actually trying that this morning but to no avail. Maybe its an issue with my pc but its only a few files that exhibit this erratic graph in evr-cp.

If anyone is interested in having a look please do, its lady gaga's new music video, 1080p.
http://www.megaupload.com/?d=EPF2JCYM

I assume it was recorded from TV or something, but for the life of me I can't get those evr-cp graphs to look smooth with this file, at 23.976, 24.000 hz or at 50.000 hz with my avisynth scripts in operation... If you get a chance to try it out with evr-cp I'd appreciate your feedback.. If I could workaround the issue with some avisynth trickery I would be happy because as I say, I was surprised to find many files on my that exhibit this behaviour, independent of splitters / decoders..

eg of the type of wavy graph I'm seeing with evr-cp but the avisynth mvtools scripts don't seem to smooth it out



Playback of other content like blu-rays etc is perfectly flat / smooth. These problem files show much more frame drops than others when using avisynth scripts.

I checked the file and it uses variable framerate, which is a feature of AVC that allows greater compressibility.
It's typically used in cartoons but considering the inexact nature of TV rips (broadcast errors, etc.) I guess it makes sense to use it with live action content sometimes, too.

I don't think MVTools2 supports variable framerate inputs. When I've used them in the past the audio has gone out of sync with the converted video, so I just stay away from VFR videos, though maybe someone could figure them out if they tried.

Quote:
Originally Posted by widezu69 View Post

@Sub no i mean the MSpuer line. The three passes should still stay 16/8/4.

Here is my script. 3 passes 16/8/4 with blksize=8 in the MSuper line. I don't use dct etc. too hard on my processor. Got rid of badrange as it defaults to those values. I'm sticking with this for now.

SetMTMode(1,16)
V = ffdshow_source()
SetMTMode(2)
S = V.MSuper(pel=2, hpad=8, vpad=8, rfilter=4)
A = S.MAnalyse(isb=true, blksize=16, plevel=0, search=3, searchparam=3)
B = S.MAnalyse(isb=false, blksize=16, plevel=0, search=3, searchparam=3)
C = S.MRecalculate(A, blksize=8, blksizev=8, search=3, searchparam=2)
D = S.MRecalculate(B, blksize=8, blksizev=8, search=3, searchparam=2)
E = S.MRecalculate(C, blksize=4, blksizev=4, search=3, searchparam=1)
F = S.MRecalculate(D, blksize=4, blksizev=4, search=3, searchparam=1)
V.MFlowFps(S, E, F, num=FramerateNumerator(V)*2, den=FramerateDenominator(V)*1, mask=2, ml=10000)
GetMTMode(false) > 0 ? distributor() : last

BTW this is best for 720p video.

Oh I was confused because you said blksize when it seems you meant hpad and vpad.
I think the general rule of the paddings is that they should be equal to the blksize of MAnalyse. I've found 16 to be better than 8.
SubJunk is offline  
post #1097 of 1968 Old 03-14-2011, 06:45 PM
Senior Member
 
widezu69's Avatar
 
Join Date: Feb 2010
Posts: 319
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
yeah sorry I meant hpad. I figured that hpad should be the average size of all the passes. Oh well different logic different preference
widezu69 is offline  
post #1098 of 1968 Old 03-15-2011, 01:23 AM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 327
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Maybe you're right. Either way I don't think it makes a big difference
SubJunk is offline  
post #1099 of 1968 Old 03-15-2011, 02:28 AM
Member
 
travolter's Avatar
 
Join Date: May 2009
Posts: 162
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by 8:13 View Post

The patch was only useful for one thing: to make jumping from one section to another section smooth. Sure, now you can open ten files in mpc (whatever that means), but will you have fun jumping to sections you want to see?

Talk to sET over at doom9 to make another patch that fixes the jumping to sections problem I mentioned and fixes your loading Ten Files, or Twenty Files problem.

Your patch was a nice improvement 8:13 I know the problem of jumping to sections, but video players were crashing after 3 or 4 files loaded.. not ten or twenty! (I could live with ten or twenty). When something is unstable you can become crazy trying to find the reason: "its my script?" "low setmemorymax value?" "the MT values?"

If you write a new patch without that loading files problem I would be glad to test for bugs
travolter is offline  
post #1100 of 1968 Old 03-15-2011, 02:45 AM
Member
 
travolter's Avatar
 
Join Date: May 2009
Posts: 162
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by widezu69 View Post

@Sub no i mean the MSpuer line. The three passes should still stay 16/8/4.

Here is my script. 3 passes 16/8/4 with blksize=8 in the MSuper line...


Confusion here I thought you mean blksize=8 in MAnalyse line

This is my current script.. really fluid. Im an user that prefer soap opera over image quality:

.- 75hz monitor
.- assumefps(24.97) so mvtools2 do 24.97x3=74.9fps. No matter if source is 24, 25 or 30.. all is converted to 24.97)
.- using pnew=50 (Default is 0 for truemotion=false and 50 for truemotion=true). I dont know if this is placebo effect.. but my eyes notice the difference with this script.
.- using high value of thscd1 (things seem to move smoother)
.- chroma=false & MBlockFps (my quad cpu is not enough)

Code:
SetMTMode(2,16)
ffdshow_source()
assumefps(24.97)
SetMTMode(2)
super=MSuper(pel=2, hpad=0, vpad=0,  rfilter=4)
backward_1=MAnalyse(super,  chroma=false,  isb=true, blksize=8, searchparam=3, plevel=0, search=3,badrange=(-24), pnew=50)
forward_1=MAnalyse(super, chroma=false, isb=false, blksize=8, searchparam=3, plevel=0, search=3,badrange=(-24), pnew=50)
backward_2=MRecalculate(super, chroma=false, backward_1, blksize=4, searchparam=1, search=3, pnew=50)
forward_2=MRecalculate(super, chroma=false, forward_1, blksize=4, searchparam=1, search=3, pnew=50)
Setmemorymax(256)
MBlockFps(super, backward_2, forward_2, num=75000, den=1001, mode=0, thscd1=1050)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last
the script can be modified to 60hz.. the movement is amazing, totally fluid (maybe the best script that Im using since 2 years) but I have some artifacts problems.
Anyone have ideas.. other params that I could add/edit to finetune it?
travolter is offline  
post #1101 of 1968 Old 03-15-2011, 03:37 AM
Member
 
mark007's Avatar
 
Join Date: Dec 2006
Posts: 196
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Guys, I was thinking about trying to improve my scripts, rather than having seperate chunks of script for <720p , >=720p and <1080p, and finally >=1080p, would it even be possible to have timers built into the script to see how long a certain block of avisynth code took.

This could then be used to decide whether to use a different section of code for the next frame, iteratively, until the timed piece of code executes in less than a defined value. If this sort of logic isn't possible then I won't even try, but if you guys think it could be done, I would like to have a stab at implementing a dymanic quality script. Does anyone know if this type of timing of blocks of code would be possible, and if that timed value could be stored and used in the next run through of the script so that it could be used to determine which pieces of script are used next time around.... Just a wild thought..

I have asked Fizick to look at supporting vfr if possible and am willing to test any updates he may make in that area.
mark007 is offline  
post #1102 of 1968 Old 03-15-2011, 05:42 AM
Member
 
travolter's Avatar
 
Join Date: May 2009
Posts: 162
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by mark007 View Post

Guys, I was thinking about trying to improve my scripts, rather than having seperate chunks of script for <720p , >=720p and <1080p, and finally >=1080p, would it even be possible to have timers built into the script to see how long a certain block of avisynth code took.

I use a resize to 1280x720 before the avisynth script.. so I dont have to write a long script for for <720p , >=720p etc..

If you are using a computer monitor.. 1280x720 is pretty decent.. and resized image from 1080 to 720 conserve enough quality to dont notice differences
travolter is offline  
post #1103 of 1968 Old 03-15-2011, 10:01 AM
Member
 
travolter's Avatar
 
Join Date: May 2009
Posts: 162
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Nice script 8:13. In both examples the face looks less "deformed"
travolter is offline  
post #1104 of 1968 Old 03-15-2011, 10:50 AM
Member
 
rinorho's Avatar
 
Join Date: Jun 2004
Location: italy
Posts: 188
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by mark007 View Post

Guys, I was thinking about trying to improve my scripts, rather than having seperate chunks of script for <720p , >=720p and <1080p, and finally >=1080p, would it even be possible to have timers built into the script to see how long a certain block of avisynth code took.

This could then be used to decide whether to use a different section of code for the next frame, iteratively, until the timed piece of code executes in less than a defined value. If this sort of logic isn't possible then I won't even try, but if you guys think it could be done, I would like to have a stab at implementing a dymanic quality script. Does anyone know if this type of timing of blocks of code would be possible, and if that timed value could be stored and used in the next run through of the script so that it could be used to determine which pieces of script are used next time around.... Just a wild thought..

I have asked Fizick to look at supporting vfr if possible and am willing to test any updates he may make in that area.


I think that's a good idea...
In the past I had asked a long scprit for this issue. Remember you?

However, my questions is very simple:
Which CPU use you in the HTPC case to process one 1080p Avsynth's Script?

I'm i7-950@3.7Ghz with Intel Hyper Threading enabled Rock Solid, but Core Temp give me 80°C under LINX session!
Whitout Hyper Threading Core temp give me 70°C, but it's impossible process good 1080p script!

How have you solved it?

thanks a lot

bye
rinorho is offline  
post #1105 of 1968 Old 03-15-2011, 11:06 AM
Senior Member
 
widezu69's Avatar
 
Join Date: Feb 2010
Posts: 319
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
@8:13 I wonder what values affect the scene changes. Shed some light? Is it levels?
And I have to say, using just one pass, your script does remarkably well.
widezu69 is offline  
post #1106 of 1968 Old 03-15-2011, 12:17 PM
Member
 
mark007's Avatar
 
Join Date: Dec 2006
Posts: 196
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by rinorho View Post

I think that's a good idea...
In the past I had asked a long scprit for this issue. Remember you?

However, my questions is very simple:
Which CPU use you in the HTPC case to process one 1080p Avsynth's Script?

I'm i7-950@3.7Ghz with Intel Hyper Threading enabled Rock Solid, but Core Temp give me 80°C under LINX session!
Whitout Hyper Threading Core temp give me 70°C, but it's impossible process good 1080p script!

How have you solved it?

thanks a lot

bye

Hi rinorho, yeah I have 3 sections in my script at the moment and am just finished tweaking. I can watch movies in each three resolution types with 0 frame drops with the current settings... I don't like the artifacts brought by searchparam being greater than 1 so you might not think my scripts are smooth enough. I'm more concerned with keeping possible artifacts down.

Code:
SetMTMode(1,0)
ffdshow_source()
SetMTMode(2)
(Framerate >=23 && Framerate <= 30 && Height(last) < 720) ? Eval("""
super = MSuper(pel=2,hpad=16, vpad=16, rfilter=4)
backward_1 = MAnalyse(super, isb=true, blksize=16, searchparam=1, plevel=0, search=3,dct=5, sadx264=7)
forward_1 = MAnalyse(super, isb=false, blksize=16, searchparam=1, plevel=0, search=3,dct=5, sadx264=7)
backward_2 = MRecalculate(super, backward_1, blksize=8, searchparam=1, search=3,dct=5,sadx264=7)
forward_2 = MRecalculate(super, forward_1, blksize=8, searchparam=1, search=3,dct=5, sadx264=7)
backward_3 = MRecalculate(super,backward_2, blksize=4, searchparam=1, search=3 ,dct=5,sadx264=7)
forward_3 = MRecalculate(super, forward_2, blksize=4, searchparam=1, search=3, dct=5,sadx264=7)
Framerate >=23 && Framerate <= 24 ? MFlowFps(super, backward_3, forward_3, num=50, den=1) : last
Framerate > 24 && Framerate <= 30 ? MFlowFps(super, backward_3, forward_3, num=FrameRateNumerator(last)*2, den=FrameRateDenominator(last)) : last
""")  : (Framerate >=23 && Framerate <= 30 && Height(last) >= 720 && Height(last) < 1080) ? Eval("""
super = MSuper(pel=2, hpad=16, vpad=16, rfilter=4)
backward_1 = MAnalyse(super,isb=true, blksize=16, searchparam=1, search=3,plevel=0, sadx264=7,dct=5)
forward_1 = MAnalyse(super, isb=false, blksize=16, searchparam=1, search=3, plevel=0, sadx264=7,dct=5)
backward_2 = MRecalculate(super, backward_1, blksize=8, searchparam=1, search=3, sadx264=7,dct=5)
forward_2 = MRecalculate(super, forward_1, blksize=8, searchparam=1, search=3, sadx264=7,dct=5)
backward_3 = MRecalculate(super, chroma=false,backward_2, blksize=4, searchparam=1, search=3 ,sadx264=7)
forward_3 = MRecalculate(super,chroma=false, forward_2, blksize=4, searchparam=1, search=3, sadx264=7)
Framerate >=23 && Framerate <= 24 ? MBlockFps(super, backward_3, forward_3, num=50, den=1, mode=2) : last
Framerate > 24 && Framerate <= 30 ? MBlockFps(super, backward_3, forward_3, num=FrameRateNumerator(last)*2, den=FrameRateDenominator(last), mode=2) : last
""")  : (Framerate >=23 && Framerate <= 30 && Height(last) >= 1080) ? Eval("""
super = MSuper(pel=2, hpad=16, vpad=16, rfilter=4)
backward_1 = MAnalyse(super,chroma=false,isb=true, blksize=16, searchparam=1, search=3,plevel=0, sadx264=7,dct=5)
forward_1 = MAnalyse(super,chroma=false, isb=false, blksize=16, searchparam=1, search=3, plevel=0, sadx264=7,dct=5)
backward_2 = MRecalculate(super, backward_1, chroma=false, blksize=8, searchparam=1, search=3, sadx264=7)
forward_2 = MRecalculate(super, forward_1, chroma=false,blksize=8, searchparam=1, search=3, sadx264=7)
Framerate >=23 && Framerate <= 24 ? MBlockFps(super, backward_2, forward_2, num=50, den=1, mode=0) : last
Framerate > 24 && Framerate <= 30 ? MBlockFps(super, backward_2, forward_2, num=FrameRateNumerator(last)*2, den=FrameRateDenominator(last), mode=2) : last
""") : last
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last
I'm using back buffer 0, forward buffer 12, "add ffdshow video source" disabled.

Still a bit of tweaking to go here and there but this works fine on core i7 920 ~ 3.7ghz, and I'm fairly happy with the quality overall. The only clips it can't keep with are wvc1 blu-rays where I can't find a multithreaded decoder thats fast enough so I get frame drops there.

Of course if someone knows if its possible to time certain pieces of code, and pass that onto the next iteration of the script, I think we could get rid of having to have certain sections for each resolution etc, maybe have some sort of iterative quality script that changes quality based on performance.
mark007 is offline  
post #1107 of 1968 Old 03-15-2011, 12:50 PM
Senior Member
 
widezu69's Avatar
 
Join Date: Feb 2010
Posts: 319
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
You know you can also use the ffdshow preset functions for even more customisability for different videos. I have different profiles for different sizes videos with other different post processing settings.
widezu69 is offline  
post #1108 of 1968 Old 03-15-2011, 02:17 PM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 327
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by 8:13 View Post

I willl now post some screen captures, in both pictures my code is the picture on the right:

If we say scenes change on average every two minutes that means at 60fps 1 in every 7,200 frames is a scene change, which is 0.0138% (or 0.01%) of the frames, so it's not a very good assessment of the scripts in general.
In my opinion the better script is the one that gets 99.99% of frames better, not just 0.01%

However it's a good point and maybe we can tweak the thSCD1 value to deal with that better.

By default our scripts already detect scene changes very well; I was looking for a video to test and I couldn't find the error after examining dozens of scene-changes.
For that reason, could you either send me a cut of the original clip so I can test, or could you test it yourself?

If you test it, could you try adding thSCD1=350 on the MFlowFPS line? and if that doesn't fix it, try 300 or 250.
Probably shouldn't go lower than that or it will start detecting everything as a scene change

Good job on testing

Edit: At 48fps that percentage from the first paragraph is 0.017% instead of 0.014% so it could be changed to say 0.02% are scene changes, but that is hardly different hehe

Edit 2: By the way, changing thSCD1 to a lower value will improve all of our scripts for that video, not just mine. However we just need to be careful with balancing it because if it gets too low it can have negative consequences, too; it could make scenes with a lot of action very choppy because they are detected as scene-changes and therefore not interpolated.
SubJunk is offline  
post #1109 of 1968 Old 03-15-2011, 02:17 PM
Senior Member
 
widezu69's Avatar
 
Join Date: Feb 2010
Posts: 319
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Cool thanks for clearing that up. Yeah to be honest you have to have eyes like a pigeon to see the scene change (pigeons see at around 6000fps rather than our ~60-100). Most people (not us as we are elite) will perceive 24fps film motion as movement but a pigeon will see it as a slideshow!

Anyways here is my script for people that want it:

SetMTMode(1,16)
V = ffdshow_source()
SetMTMode(2)
S = V.MSuper(pel=2, hpad=8, vpad=8, rfilter=4)
A = S.MAnalyse(isb=true, blksize=16, plevel=0, search=3, searchparam=3)
B = S.MAnalyse(isb=false, blksize=16, plevel=0, search=3, searchparam=3)
C = S.MRecalculate(A, blksize=8, blksizev=8, search=3, searchparam=2)
D = S.MRecalculate(B, blksize=8, blksizev=8, search=3, searchparam=2)
E = S.MRecalculate(C, blksize=4, blksizev=4, search=3, searchparam=1)
F = S.MRecalculate(D, blksize=4, blksizev=4, search=3, searchparam=1)
V.MFlowFps(S, E, F, num=FramerateNumerator(V)*2, den=FramerateDenominator(V)*1, mask=2, ml=10000)
GetMTMode(false) > 0 ? distributor() : last

And here is the version of avisynth.dll that causes absolutely zero crashes for me works great with any version of ffdshow:
http://www.mediafire.com/?rrt2fcmrdjzw0rc
widezu69 is offline  
post #1110 of 1968 Old 03-15-2011, 02:40 PM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 327
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by widezu69 View Post

Cool thanks for clearing that up. Yeah to be honest you have to have eyes like a pigeon to see the scene change (pigeons see at around 6000fps rather than our ~60-100). Most people (not us as we are elite) will perceive 24fps film motion as movement but a pigeon will see it as a slideshow!

Imagine how much more incredible sports would become if we could also perceive motion as accurately as that. Imagine martial arts, car racing, all those sports that require very quick perceptions

Do you know if it's their eyes or brains that limit it? I wonder if a pigeon would still see at high framerates if they had our eyes because their brains are optimised for it.
SubJunk is offline  
Reply Home Theater Computers

User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off