Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
9th January 2012, 20:35 | #261 | Link |
Registered User
Join Date: Jun 2009
Location: UK
Posts: 263
|
OK, just a casual question here... why is the "placebo" preset called "placebo"?
The word placebo implies "It doesn't really do anything, but you'll *think* it helps!" But looking at the code, it seems to me the placebo preset does actually do something! 8-) [IS CONFUSED] |
28th January 2012, 20:13 | #263 | Link |
Registered User
Join Date: Jan 2012
Location: Toulon France
Posts: 249
|
Hello,
Thanks for InterFrame I wanted to use InterFrame to change Super 8 movies' FPS from 16.667 to 25. In some part of clip, with MFlowFPS, i get mad pictures like in this clip. http://www.youtube.com/watch?v=geO_I0sHv0E With InterFrame, with Algo=13 and SadML=50, i can get this clip. http://www.youtube.com/watch?v=MnLFVnPBAeY It is not perfect, but the look is better in the first part. But in the middle, Algo and SadML' tuning must be changed. So i have written this mod of InterFrame script in the joint zip file. The changes are : Add new "Preset", "Add masque", to proceed motion analyse on one mask made by MaskTools v2 cf. http://manao4.free.fr/mt_masktools.html (It is a try) Add new item "Mode" to indicate if necessary the MaskTools mode. Add new item "Tuning_Manuel" with default "False" to keep the original InterFrame process and if shift to "True", it enable the two new functions "Algo_manuel" and "SadML_manuel". Add "blend" shift from "True" to "False", in accordance with old movies restoring scripts. Do you agree this mod ? Do you know other MSmoothFps' tunings can be used for Super 8 or 8 mm movies ? Thanks Bernard |
28th January 2012, 23:26 | #265 | Link |
Registered User
Join Date: Jan 2012
Location: Toulon France
Posts: 249
|
Hi SubJunk
The script is not to big, so i copy it below. Quote #------------------------------------------------------------------------------# # # # InterFrame 1.12.3 by SubJunk # # # # A frame interpolation script that primarily uses MVTools2 for making # # accurate estimations about the content of non-existent frames # # Its main use is to give videos higher framerates like newer TVs do # #------------------------------------------------------------------------------# # For instructions and further information see the included InterFrame.html # For news go to spirton.com function InterFrame(clip Input, string "Preset", string "Tuning",int "NewNum", int "NewDen", \ string "FlowPath", bool "GPU", string "InputType", string "Mode", bool "Tuning_manuel", string "Algo_manuel", int "SadML_manuel",\ bool "blend") { # Defaults Preset = default(Preset , "Medium" ) NewNum = default(NewNum , 0 ) NewDen = default(NewDen , 0 ) Tuning = default(Tuning , "Film" ) FlowPath = default(FlowPath , "Undefined") GPU = default(GPU , false ) InputType = default(InputType, "2D" ) Mode = default(Mode, "sobel") Tuning_manuel = default(Tuning_manuel, true) Algo_manuel = default(Algo_manuel , "23" ) SadML_manuel = default(SadML_manuel , 150 ) blend = default(blend , true) # Validate inputs Assert(Preset == "Placebo" || Preset == "Medium" || Preset == "Fast" || Preset == "Faster" || Preset == "Very Fast" || Preset == "Super Fast" || Preset == "Ultra Fast" || Preset == "Add Masque", "'"+Preset+"' is not a valid preset. Please check the documentation for a list of the valid presets.") Assert(Tuning == "Film" || Tuning == "Smooth" || Tuning == "UltraSmooth" || Tuning == "Animation" || Tuning == "Weak" || Tuning == "Manuel","'"+Tuning+"' is not a valid tuning. Please check the documentation for a list of the valid tunings.") Assert(InputType == "2D" || InputType == "SBS" || InputType == "OU" || InputType == "HSBS" || InputType == "HOU", "'"+InputType+"' is not a valid InputType. Please check the documentation for a list of the valid InputTypes.") Assert(FlowPath != "Undefined", "You must specify FlowPath. Please check the documentation for details.") Assert(Mode == "sobel" || Mode == "roberts" || Mode == "laplace" || Mode == "hprewitt" || Mode == "prewitt" || Mode == "cartoon" || Mode == "min/max", "'"+Mode+"' is not a valid preset. Please check the documentation for a list of the valid modes.") Assert(Algo_manuel == "23" || Algo_manuel == "22" || Algo_manuel == "21" || Algo_manuel == "13" || Algo_manuel == "12" || Algo_manuel == "11"\ || Algo_manuel == "1" || Algo_manuel == "2","'"+Algo_manuel+"' is not a valid tuning. Please check the documentation for a list of the valid Algo_manuels.") # Get either 1 or 2 clips depending on InputType InputType == "SBS" ? Eval(""" FirstEye = InterFrameProcess(Input.crop(0 , 0, -Input.Width/2, 0), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType) SecondEye = InterFrameProcess(Input.crop(Input.Width/2, 0, 0 , 0), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType) StackHorizontal(FirstEye, SecondEye) """) : InputType == "OU" ? Eval(""" FirstEye = InterFrameProcess(Input.crop(0, 0 , 0, -Input.Height/2), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType) SecondEye = InterFrameProcess(Input.crop(0, Input.Height/2, 0, 0 ), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType) StackVertical(FirstEye, SecondEye) """) : InputType == "HSBS" ? Eval(""" FirstEye = InterFrameProcess(Input.crop(0 , 0, -Input.Width/2, 0).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType) SecondEye = InterFrameProcess(Input.crop(Input.Width/2, 0, 0 , 0).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType) StackHorizontal(FirstEye.Spline36Resize(Input.Width/2, Input.Height), SecondEye.Spline36Resize(Input.Width/2, Input.Height)) """) : InputType == "HOU" ? Eval(""" FirstEye = InterFrameProcess(Input.crop(0, 0 , 0, -Input.Height/2).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType) SecondEye = InterFrameProcess(Input.crop(0, Input.Height/2, 0, 0 ).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType) StackVertical(FirstEye.Spline36Resize(Input.Width, Input.Height/2), SecondEye.Spline36Resize(Input.Width, Input.Height/2)) """) : Eval(""" InterFrameProcess(Input, Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType,\ Mode=Mode, Tuning_manuel=Tuning_manuel, Algo_manuel=Algo_manuel, SadML_manuel=SadML_manuel,\ blend=blend) """) } function InterFrameProcess(clip Input, string "Preset", string "Tuning", int "NewNum", int "NewDen", \ string "FlowPath", bool "GPU", string "InputType", string "Mode", bool "Tuning_manuel", string "Algo_manuel", int "SadML_manuel",\ bool "blend") { # Create processed clip for slower presets Preset == "Placebo" || Preset == "Medium" || Preset == "Fast" || Preset == "Faster" ? Eval(""" ProcessedSource = Input.RemoveGrain(mode=17) """) : Preset == "Add_Masque" ? Eval(""" ProcessedSource=Input.RemoveGrain(mode=17).MT_Edge(mode=Mode) """) : Eval(""" # Don't want ProcessedSource """) # Set variables controlled by Tuning BlockSize = (Tuning == "Film" || Tuning == "Animation") ? 16 : \ (Tuning == "Weak") ? 32 : 16 Overlap1 = (Tuning == "Animation") ? 0 : 4 Overlap2 = (Tuning == "Animation") ? 0 : 2 Tuning_manuel == false ? Eval(""" Algo = (Tuning == "Smooth" || Tuning == "Animation") ? 23 : 13 SadML = (Tuning == "Smooth" || Tuning == "Animation") ? 150 : 0 """) : Eval(""" Algo = (Algo_manuel == "23") ? 23 : \ (Algo_manuel == "22") ? 22 : \ (Algo_manuel == "21") ? 21 : \ (Algo_manuel == "13") ? 13 : \ (Algo_manuel == "12") ? 12 : \ (Algo_manuel == "11") ? 11 : \ (Algo_manuel == "128") ? 128 : \ (Algo_manuel == "1") ? 1 : \ (Algo_manuel == "2") ? 2 : 13 SadML = SadML_manuel """) # Create super clip/s SuperRegular = MSuper(Input, hpad=BlockSize, vpad=BlockSize, rfilter=4) Preset == "Placebo" ? Eval(""" CustomLuma = EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input), src_left=0.25 ) CustomChroma = EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input), src_left=0.5 , src_top=0.5) CustomPelClip = MergeChroma(CustomLuma, CustomChroma, 1) Super = MSuper(ProcessedSource, hpad=BlockSize, vpad=BlockSize, rfilter=4, pelclip=CustomPelClip) """) : Preset == "Medium" || Preset == "8_mm" ? Eval(""" Super = MSuper(ProcessedSource, hpad=BlockSize, vpad=BlockSize, rfilter=4) """) : Eval(""" Super = MSuper(Input, hpad=BlockSize, vpad=BlockSize, rfilter=4) """) # Make interpolation vector clip Preset == "Ultra Fast" ? Eval(""" backward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=true , lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, chroma=false) forward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=false, lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, chroma=false) """) : Preset == "Super Fast" ? Eval(""" backward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=true , lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1) forward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=false, lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1) """) : Preset == "Very Fast" ? Eval(""" backward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=true , lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1) forward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=false, lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1) backward = MRecalculate(Super, backward, blksize=8, overlap=Overlap2) forward = MRecalculate(Super, forward, blksize=8, overlap=Overlap2) """) : Preset == "Faster" ? Eval(""" backward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=true , lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1, search=3, pelsearch=3) forward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=false, lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1, search=3, pelsearch=3) backward = MRecalculate(Super, backward, blksize=8, overlap=Overlap2, search=3) forward = MRecalculate(Super, forward, blksize=8, overlap=Overlap2, search=3) """) : Preset == "Fast" ? Eval(""" backward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=true , lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1, search=3, pelsearch=3) forward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=false, lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1, search=3, pelsearch=3) backward = MRecalculate(Super, backward, blksize=8, overlap=Overlap2, search=3) forward = MRecalculate(Super, forward, blksize=8, overlap=Overlap2, search=3) """) : Eval(""" backward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=true , lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1, search=3, pelsearch=3, dct=5) forward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=false, lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1, search=3, pelsearch=3, dct=5) backward = MRecalculate(Super, backward, blksize=8, overlap=Overlap2, search=3, dct=5) forward = MRecalculate(Super, forward, blksize=8, overlap=Overlap2, search=3, dct=5) backward = MRecalculate(Super, backward, blksize=4, overlap=Overlap2, search=3, dct=5) forward = MRecalculate(Super, forward, blksize=4, overlap=Overlap2, search=3, dct=5) """) # Determine new framerate NewNum != 0 ? Eval(""" # Use user values """) : Input.Framerate == 25 ? Eval(""" NewNum = 50 NewDen = 1 """) : Input.Framerate == 30 ? Eval(""" NewNum = 60 NewDen = 1 """) : Eval(""" NewNum = 60000 NewDen = 1001 """) # See whether to use GPU-acceleration or not svp_flow_lib = GPU == true ? FlowPath+"libflowgpu.dll" : FlowPath+"libflowsse.dll" Finest = GPU == true ? SuperRegular : MFinest(Input, SuperRegular) # Put it together MSmoothFps(Input, SuperRegular, backward, forward, finest=Finest, num=NewNum, den=NewDen, algo=Algo, ml=0, sadml=SadML, sadgamma=2, block=false, blend=blend) } Unquote |
1st February 2012, 12:09 | #270 | Link |
Registered User
Join Date: Jun 2010
Posts: 443
|
I just finished looking over and testing your mod.
I don't know if MT_Edge offers any quality benefits, it seems almost identical with or without it. The other changes are just adding more options so that users can tweak things manually, which I have no problem with. I will include more customisation in the next version, thanks. |
2nd February 2012, 11:25 | #271 | Link |
Registered User
Join Date: Jan 2012
Location: Toulon France
Posts: 249
|
Hi SubJunk,
I agree with you MT_Edge is not yet necessary. I have try it, before i read your post http://www.svp-team.com/forum/viewtopic.php?id=73 and i see the magic work of YFRC-06dd-01mm-2011yyyy.avsi by RunForLife(Oleg Yushko). Since 28 of january, i have try to adust too Blocksize. With BlockSize = 32, Algo = 2 and SadML = 0, so i get frame without blend, but small morphing. There is a link to one 25 frames HUFFYUV video file, which compare on left InterFrame (blocksize 32, Algo 2, SadML 0) with on right the ouput of MFlow FPS and InterFrame (default) (same ouput for this two process on my video clip). http://www.sendspace.com/file/t0bk0h When you play this clip frame by frame, you can see the process difference. I am happy, you will include more customisation in the next version. I think that will be useful for some chirurgical frame process. Thank you |
3rd February 2012, 21:02 | #272 | Link |
Registered User
Join Date: Mar 2005
Location: Israel
Posts: 162
|
So I tried running InterFrame 1.12.3 with this scipt:
Code:
SetMTmode(2,7) ffdshow_source() SetMTMode(2) InterFrame(Preset="Very Fast", Tuning="Film", NewNum=48000, NewDen=1001, GPU=true, FlowPath="C:\Program Files (x86)\AviSynth 2.5\plugins\") GetMTMode(false) > 0 ? distributor() : last After some time the player crashes with this error: Tried MPC-HC and Pot Player. Same thing happens with both. Some hardware info: Intel i5 750 Quad Core @3663Mhz 4GB 1600Mhz RAM HD5770 1GB 1000/1387Mhz Windows 7 x64 Any ideas what is wrong here? |
3rd February 2012, 21:32 | #274 | Link | |
Registered User
Join Date: Mar 2005
Location: Israel
Posts: 162
|
Quote:
Trying "SetMTmode(2,3)" Look like this happens when the CPU reaches close to 100% in some heavy scenes. Edit: With "SetMTmode(2,3)" the frame rate drops below 35fps. Not all CPU threads are fully used I'm guessing. Also testing SVP and even with i7 preset it runs 1080p at 60fps no problem. Edit2: ok, so it's doesn't crash with "SetMTmode(2,3)" But even with "Super Fast" preset the frame rate drops below 35fps in some scenes. And the CPU cores are only about 30~70% loaded. Last edited by FDisk80; 3rd February 2012 at 21:47. |
|
3rd February 2012, 22:22 | #275 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Disclaimer: I've zero experience with InterFrame or SVP.
Regarding Avisynth and MT, your script should start with setmtmode(5,x), like Code:
SetMemorMax(666) SetMTmode(5,6) ffdshow_source() SetMTMode(2) InterFrame(..... Then, I'm not sure if MT can be successful when you set GPU=true. My experience with other GPU-filters is that they cannot run multithreaded. You can MT CPU filters, but not GPU filters. Is InterFrame/SVP any different in this respect? In any case, try with GPU=false, too.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
3rd February 2012, 22:58 | #276 | Link | |
Registered User
Join Date: Mar 2005
Location: Israel
Posts: 162
|
Quote:
And isn't "setmtmode(5,x)" will make things even slower? Code:
Mode 1 is the fastest but only works with a few filters. Mode 2 should work with most filters but uses more memory. Mode 3 should work with some of the filters that don't work with mode 2 but it is slower. Mode 4 is a combination of mode 2 and 3 and should work with even more filters but is both slower and uses more memory. Mode 5 is the slowest (slower than not using SetMTMode) but should work with all filters that don't require linear frameserving (that is the frames come in order: frame 0,1,2,...,last). Mode 6 is a modified mode 5 that might be slightly faster. Last edited by FDisk80; 3rd February 2012 at 23:01. |
|
3rd February 2012, 23:16 | #278 | Link | |
Registered User
Join Date: Mar 2005
Location: Israel
Posts: 162
|
Quote:
Also tried: SetMemoryMax(600) SetMTmode(5,6) Now mvtools2.dll crashed. Even with SetMTMode(2,5) it crashed after some time. And with SetMTMode(2,5) the frame rates are very low. |
|
3rd February 2012, 23:33 | #279 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
"works" is good. But "works correctly" is so much better. Did you verify if the results still are correct? Checking "if it doesn't crash" isn't sufficient. Back when I played with FFT3dGPU, I first thought all is okay (it didn't crash and looked okay). Only after closer checking it became clear that the results of FFT3dGPU were all-funky-wrong when the script was multithreaded.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
3rd February 2012, 23:54 | #280 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
To continue Didée's theme: "slow" is bad. But "crashing" is even worse.
Most source filters don't work multithreaded, so you have to run them in mode 5, before switching to mode 2 for the rest of the script. |
Tags |
48fps, 60fps, framedoubling, interframe, smooth motion |
Thread Tools | Search this Thread |
Display Modes | |
|
|