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 |
26th August 2014, 19:55 | #22 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
As it says at bottom of 1st post in ClipClop thread, "Available via Sig, mediafire.", also available via SendSpace.
See sig below this post (or any other of my posts) .
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
5th October 2014, 14:52 | #23 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
@Jenyok, Did you get it working OK ?
@gnol009 (replying to your PM) You could have posted that spreadsheet thing in thread, no need for PM. ClipClop(), is intended to replace ranges in one clip with the same range from another, just like ReplaceFramesSimple but with up to 255 replacement clips. For your purpose where you are wanting to trim and splice ranges from two or more non frame synced clips, you would need to use Prune which does just that. Prune: http://forum.doom9.org/showthread.ph...ighlight=Prune Good Luck.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
9th October 2014, 12:17 | #25 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Any clue as to what doesn't works ?
You just talking about the DoctorFrames.avs ? Did you try with SetMemoryMax(256) ?
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 9th October 2014 at 12:20. |
18th November 2014, 05:20 | #26 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
ClipClop() v1.21 new version see 1st post.
Code:
18/Nov/2014 - ver 1.21 - Fixed, was showing R%x hex Rx Clip instead of R%d decimal. I guess thats what comes about with continually referring to the replacement clips as Rx clips. Here Example script added to doc, too big for 1st post text. Code:
Example usage script using NickNames: ### Avisource("D:\avs\test.avi") ORG=Last V1 = FFT3DFilter(Plane=0,Sigma=1.6) # Light Luma V2 = FFT3DFilter(Plane=0,Sigma=2.0) # Med Luma V3 = FFT3DFilter(Plane=0,Sigma=4.0) # High Luma V4 = FFT3DFilter(Plane=3,Sigma=1.6) # Light Chroma V5 = FFT3DFilter(Plane=3,Sigma=2.0) # Med Chroma V6 = FFT3DFilter(Plane=3,Sigma=4.0) # High Chroma V7 = FFT3DFilter(Plane=4,Sigma=1.6) # Light Luma+Chroma V8 = FFT3DFilter(Plane=4,Sigma=2.0) # Med Luma+Chroma V9 = FFT3DFilter(Plane=4,Sigma=4.0) # High Luma+Chroma V10= FlipHorizontal() # Flip-H V11= FlipVertical() # Flip-V V12= Invert() # Invert NickNames =""" # Psuedonyms for clips L0 = 1 # Light Luma L1 = 2 # Med Luma L2 = 3 # High Luma C0 = 4 # Light Chroma C1 = 5 # Med Chroma C2 = 6 # High Chroma LC0 = 7 # Light Luma + Chroma LC1 = 8 # Med Luma + Chroma LC2 = 9 # High Luma + Chroma FH = 10 # Flip-H FV = 11 # Flip-V INV = 12 # Invert """ SCMD=""" # Clip editing commands in string, can also use commands in file C0 0,99 # Light Chroma frames @ 0 -> 99 L0 100,-200 # Light Luma frames @ 100, 200 frames ie frames 100->299 INV 300,399 # Invert 300->399 L0 400,499 # Light Luma frames 400->499 FH 500,599 # Flip-H 500->599 LC2 600,699 # High Luma + Chroma C1 800 # Med Chroma, Single frame 1 900,999 # Light Luma, We used the clip number instead of a NickName FV 1000,1099 # Flip-V LC1 2000,0 # Med Luma + Chroma, 2000 -> lastframe """ SHOW=True ClipClop(ORG,V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,scmd=SCMD,nickname=NickNames,show=SHOW) EDIT: Displays metrics for frame 300 in above example script, R12 is the generic name for (replacement) clip 12. Code:
300 ] ClipClop: Using Clip INV{R12}[300]
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 20th November 2014 at 17:53. |
27th November 2014, 20:02 | #27 | Link |
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
|
I'm using ClipClop to apply interpolation only on certain scenes and apply convertFPS() on the other scenes. My source files are transfered 8mm films, 18fps progressive.
This simple script works like a charm: Code:
source=Avisource("L:\CanocapsVDPspoel_#4.0_gekuist.avi").converttoYV12() converted = source.ConvertFPS(25) V0 = converted V1 = InterFrame(source,Newnum=25,Newden=1,Cores=8,GPU=true) NickNames =""" # Psuedonyms for clips I = 1 """ SCMD=""" I 1723,2312 I 3032,3202 I 3915,4456 """ SHOW=True ClipClop(V0,V1,scmd=SCMD,nickname=NickNames,show=SHOW) Does anyone has an idea how to solve this? Thank you in advance, Fred.
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest |
27th November 2014, 21:10 | #28 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Fred, I think maybe try Prune instead for your purpose as they will really be two different clips.
http://forum.doom9.org/showthread.ph...ighlight=prune Code:
Prune() v1.10, Trim/Splice Plugin for Avisynth v2.5+ by StainlessS. http://forum.doom9.org/showthread.php?t=162446 Video:- Planar, YUY2, RGB32, RGB24. Audio:- FLOAT, INT16, INT32, for Audio Fade, ALL types supported if NOT fading (Pass through untouched). Prune is a simple plugin to trim() multiple source clips and splice the results into a new clip. Supports up to 256 source clips, with unlimited number of trims/splices into output clip. Prune can fade Audio (to reduce clicks between splices) for supported audio formats. The plugin will do AlignedSplice only. v1.10, Implements 'Nickname's, Pseudonyms for the source clips, ie instead of '17 1000,2000' you could use eg 'Holidays_Aug_2011 1000,2000', to splice frames 1000 to 2000 of the clip 17 into the output clip. Supports Nicknames of up to 31 characters in length so you could use eg 'UncleBobsBirthdayBash 10000,14560', or 'Fred_And_Bobs_Wedding_Part_1 3485,6023'. Prune(Clip R0, clip R1, ... , clip R255, string 'Cmd',string 'SCmd', bool 'Show', bool 'Ver',int 'dv', bool 'NoErr', float 'Fade', bool 'FadeIn', bool 'FadeSplice', bool 'FadeOut', String 'Nickname') http://forum.doom9.org/showthread.ph...light=framesel Code:
FrameSel/Rep() Plugins for Avisynth v2.58/v2.6 by StainlessS. FrameSel() is a simple plugin to select individual frames from a clip. Can select frames numbers by direct arguments to filter, or in a string, or in a command file. Video:- Planar, YUY2, RGB32, RGB24. Audio:- Returns NO AUDIO (Does not really make sense for individual frames, although now supports ranges). FrameSel(Clip, int F1, ... , int Fn, string 'scmd',string 'cmd', bool 'show', bool 'ver',bool "reject",bool "ordered", \ bool "debug", int "Extract"=1) ... Reject bool, Default False. If true then selects frames NOT specified rather than specified frames. eg if you have a 5 frame clip (0->4) and have commands to select 4,2 and 0, then reject=true would actually select frames 1 and 3 instead. If reject=true, then orderering occurs no matter whether Ordered is set true or false and the frames are returned in sequential order. Reject might be of use to view all frames NOT in a frames command set. Ordered bool, Default true. No effect if reject is true, where Ordered will ALWAYS be as if set true. If true then all selected frames are sequentially ordered and only unique frames are selected and returned in sequential order. If Ordered is set false, no frame number ordering is done and eg if frames 10,20,30,20,10 were selected in commands, then it would select 5 frames; 10 and 20 and 30 and 20 and 10, are returned and in that order. If Ordered is set default true, then for same example it would return 10 and 20 and 30, in that sequential order. So, the purpose of Ordered=true (default), is to remove duplicates and return sequential frames. Only change Ordered to false if you are convinced you know what you are doing. Debug bool, Default false. If true sends a little debug info to debugview window during Plugin initialization. (Google DebugView). Extract Int, Default 1, MUST be ODD, 1 to 11. Error if not default 1 AND neither Ordered nor Reject == True. Let us call the UNIQUE resultant frames after Ordered and/or Reject Processing 'Target' frames. The number of frames pulled out on either side of Target frame is Extract / 2 (integer divide), so when Extract=3, it will extract 1 frame before target, the Target frame, and 1 frame after target, for each and every Target frame. This arg allows you to select eg 3 frames for each Target frame, the previous frame, Target frame and next frame. May be of use to extract bad frames together with eg 1 frame either side for saving as bitmaps and editing in some kind of RotoScope editor to repair bad frames using image from adjacent frames. The edited frames could then be re-loaded, middle one selected via SelectEvery(3,1), and then put back into original source clip via FrameRep(). Another simple use could be when you have a clip where each frame before a scene change is bad, with Ordered=True and Extract=3, you pull out 3 frames, a SelectEvery(3,0) would select the frames previous to the bad frames and then use Framerep() to replace the bad frames with those previous to them. A SelectEvery(3,2) would select the frames after Target frames. The total number of frames pulled out of the source clip will be (Extract * number of Target frames). Reject is less likely to be of use with Extract, unless frame select commands specify good frames rather than bad, where Reject in FrameRep should also be true (same as in FrameSel, as always). See FrameRep() for example uses of Extract. Code:
FrameRep(Clip c,Clip c2 int F1, ... , int Fn, string 'scmd',string 'cmd', bool 'show', bool 'ver',bool "reject",bool "debug") Video:- Planar, YUY2, RGB32, RGB24. Audio:- Returns source clip c audio. Args identical to FrameSel, with exception of the compulsory 2nd clip arg which is a clip of frames to replace into the 1st source clip, and also does not have an Ordered argument, as it is ALWAYS Ordered, and FrameRep, does not have the Extract arg. See FrameSel() description for other arguments. FrameRep() is complimentary to FrameSel, whereas FrameSel extracts frames, FrameRep replaces or reseats them (from the c2 clip) back from whence they came (into the c clip) and using the EXACT same arguments and commands (whether directly supplied or in string command or file command). If you wish to extract some frames and later replace back into the source clip, you MUST use the default Ordered=True in FrameSel or the frames may not be replaced back into the positions they originally came from. The number of Unique Selected frames in the combined frames commands MUST EQUAL the number of frames in the c2 clip (after taking Reject into account), or it WILL throw an error, (will not know where to put the remainder or frame shortage). This is the reason you should use the same frame commands in both FrameSel and FrameRep so that there will be an identical number of unique frames and Ordered sequential. If Debug is set true, it will show a little info in DebugView (Google), eg number of unique frames in a command set. Code:
FrameSel_CmdReWrite(Clip c,String ofn, int F1, ... , int FN, String "SCmd"="", String "Cmd"="", \ Bool "Reject"=False, Bool "Ordered"=True, Bool "Debug"=False, Bool "Range"=True, Bool "Space"=False, Bool "Prune"=False) FrameSel_CmdReWrite, takes either Frame numbers as direct arguments, or in the SCmd string, or in the Cmd file (at least one must be specified). If more than one command method is used, will process Cmd file first, then SCmd string second and lastly directly supplied frame numbers. The command frames will be acted upon via the Reject, and Ordered, args (as in FrameSel) and then re-written to the output command file. Any comments in SCmd string or Cmd file will not be written to the output command file. The FrameSel_CmdReWrite() function returns the total number of frames written to the output file (including ranges). This function could have several uses:- To combine multiple frame specifying command methods into a single command file, and if Ordered, then remove duplicates. Convert single frame command files to frame range command files, (smaller and perhaps easier to peruse). Convert frame range command files to single frame command files, for use in another plugin that expects only frame numbers. Convert a Reject=True command set to Reject=False command file, and vice versa. Convert a command file of single frames/ranges to reject from a clip, into a Prune command file (Prune does not itself have a Reject arg but it does fadein/out audio at splices and can also coalesce single frames into ranges before splicing so that it does not fadein/out at every single individually specified frame). Perhaps more uses. (ClipClop crash, I am on 32bit 4GB). EDIT: You would need to use the output frame numbers of the speed altered clips. EDIT: Perhaps you could send highest framerate clip through Scriptclip, where you could calc and Subtitle output and orig frame numbers, eg Source TLHS, ConvertFPS MidLHS and Interpolated BLHS. (or maybe better to use source clip rather than hi framerate clip)
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 27th November 2014 at 21:48. |
27th November 2014, 22:56 | #29 | Link | ||
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
|
Quote:
Quote:
Anyhow, I will have a look at your suggestions and it seems I will have a lot to learn PS: I'm on Win7 64bits and everything runs fine but my clips are always below 30.000 frames. Fred.
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest |
||
27th November 2014, 23:34 | #30 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Thank you Fred, I'm guessin that you also have more than 4GB of RAM and so am at a loss as to what the problem is that is affecting Jenyok and Hotte.
Midway re-installing 6 systems together with all tweaks and such, then gotta install VS Express 2008 and try that out before I can try to figure out where my problem lies. EDIT: No, I mean 8 systems, I forgot a couple
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 27th November 2014 at 23:47. |
21st December 2014, 23:00 | #31 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
@Jenyok,
Are you using an old version of Avisynth v2.6, If so, you need to update as ClipClop uses new AvisynthPluginInit3() only available in Alpha 4+ ? (Or alternatively use the v2.58 dll).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 21st December 2014 at 23:43. |
29th March 2015, 19:50 | #32 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
ClipClop v1.22, new version see 1st post.
Code:
17/Aug/2014 - ver 1.20 - Versions 2.5 and 2.6. Added Magic. 18/Nov/2014 - ver 1.21 - Fixed, was showing R%x hex Rx Clip instead of R%d decimal. 29/Mar/2015 - ver 1.22 - Recompile with VS 2008 and v2.6 dll with Avisynth 6 Header(EDIT: from RC1).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 29th March 2015 at 21:04. |
1st April 2015, 19:14 | #33 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
ClipClop v1.23, see 1st post.
Minor mod, Display NickNames in original casing when Show=true (was all uppercased).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
16th April 2016, 18:59 | #34 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Here much reduced size DoctorFrames script, with bug fix.
First the bug fix Code:
Return c.ClipClop( \ CP, \ CN, \ I01_01, \ I02_01,I02_02, \ I03_01,I03_02,I03_03, \ I04_01,I04_02,I04_03,I04_04, \ I05_01,I05_02,I05_03,I05_04,I05_05, \ I06_01,I06_02,I06_03,I06_04,I06_05,I06_06, \ I07_01,I07_02,I07_03,I07_04,I07_05,I07_06,I07_07, \ I08_01,I08_02,I08_03,I08_04,I08_05,I08_06,I08_07,I08_08, \ I09_01,I09_02,I09_03,I09_04,I09_05,I09_06,I09_07,I09_08,I09_09, \ I10_01,I10_02,I10_03,I10_04,I10_05,I10_06,I10_07,I10_08,I10_09,I10_10, \ I11_01,I11_02,I11_03,I11_04,I11_05,I11_06,I11_07,I11_08,I11_09,I11_10,I11_11, \ I12_01,I12_02,I12_03,I12_04,I12_05,I12_06,I12_07,I12_08,I12_09,I12_10,I12_11,I12_12, \ I13_01,I13_02,I13_03,I13_04,I13_05,I13_06,I13_07,I13_08,I13_09,I13_10,I13_11,I13_12,I13_13, \ I14_01,I14_02,I14_03,I14_04,I14_05,I14_06,I14_07,I14_08,I14_09,I14_10,I14_11,I14_12,I14_13,I14_14, \ I15_01,I15_02,I15_03,I15_04,I15_05,I15_06,I15_07,I15_08,I15_09,I15_10,I15_11,I15_12,I15_13,I15_14,I15_15, \ I16_01,I16_02,I16_03,I16_04,I16_05,I16_06,I16_07,I16_08,I16_09,I16_10,I16_11,I16_12,I16_13,I16_14,I16_15,I16_16, \ I17_01,I17_02,I17_03,I17_04,I17_05,I17_06,I17_07,I17_08,I17_09,I17_10,I17_11,I17_12,I17_13,I17_14,I17_15,I17_16,I17_17, \ I18_01,I18_02,I18_03,I18_04,I18_05,I18_06,I18_07,I18_08,I18_09,I18_10,I18_11,I18_12,I18_13,I18_14,I18_15,I18_16,I18_17,I18_18, \ I19_01,I19_02,I19_03,I19_04,I19_05,I19_06,I19_07,I19_08,I19_09,I19_10,I19_11,I19_12,I19_13,I19_14,I19_15,I19_16,I19_17,I19_18,I19_19, \ I20_01,I20_02,I20_03,I20_04,I20_05,I20_06,I20_07,I20_08,I20_09,I20_10,I20_11,I20_12,I20_13,I20_14,I20_15,I20_16,I20_17,I20_18,I20_19,I20_20, \ I21_01,I21_02,I21_03,I21_04,I21_05,I21_06,I21_07,I21_08,I21_09,I21_10,I21_11,I21_12,I21_13,I21_14,I21_15,I21_16,I21_17,I21_18,I21_19,I21_20,I21_21, \ I22_01,I22_02,I22_03,I22_04,I22_05,I22_06,I22_07,I22_08,I22_09,I22_10,I22_11,I22_12,I22_13,I22_14,I22_15,I22_16,I22_17,I22_18,I22_19,I22_20,I22_21,I22_22, \ scmd=SCMD,cmd=CMD,nickname=NICKNAME,show=SHOW,dv=DV) """) } Here update, Reduced maximum possible number of frames interpolated to 20 (from 22, about 43 fewer clips generated and more stable). Still best to use SetMemoryMax(256) if using max 20. Here update, Code:
Function DoctorFrames(clip c, String "Scmd",String "Cmd",bool "Show",int "dv",Int "MaxInterp", \ int "pel",int "sharp",int "rfilter",Float "ml") { /* # DoctorFrames() by StainlessS. Req ClipClop, RT_Stats, GSCript, MvTools. # Replace damaged frames using commands in a either command string or file. Commands:- Eg, "CP 100" CopyFromPrevious ie replace frame 100 with frame 100 - 1. Eg, "CN 200" CopyFromNext ie replace frame 200 with frame 200 + 1. Eg, "I2 300" Interpolate 2 frames at frames 300 and 301 (using 299 and 302 as source frames). Eg, "I20 400" Interpolate 20 frames at frames 400 to 419 (using 399 and 420 as source frames). NOTE, You specify the first frame number that is to be interpolated eg "I3 45" specifies 3 frames interpolated starting at frame 45. */ Scmd = Default(Scmd,"") # User supplied list of newline or semicolon separated commands. Cmd = Default(Cmd,"") # User supplied Filename containing newline separated commands. Show = Default(Show,false) # Show Info on frame dv = Default(dv,0) # ClipClop DebugView level (0 - 4, Need DebugView utility) MaxInterp= Default(MaxInterp,9) # Default 9. Maximum number of Interpolation frames replaced. Max possible 20. # When 20 (or close), will likely need eg SetMemoryMax(256) to avoid 'Out of Memory' Errors. # A MaxInterp of 20, requires in excess of 200 clips, and hits system resources heavily. pel = Default(pel,2) # Default as for MSuper(), ie 2, range=1 or 2 or 4 sharp = Default(sharp,2) # Default as for MSuper(), ie 2, range=0 -> 2 rfilter= Default(rfilter,2) # Default as for MSuper(), ie 2, range=0 -> 4 ml = Float(default(ml,100.0)) # Default as for MFlowInter(), ie 100.0, range=greater than 0.0. Assert(MaxInterp >= 1 && MaxInterp<=20,"MaxInterp 1 -> 20") ### CP = c.DeleteFrame(c.Framecount()-1).DuplicateFrame(0) CN = c.DuplicateFrame(c.Framecount()-1).DeleteFrame(0) ### ALLNICKS=""" # Define Command mnemonics allowed in command string and file. CP =1 # CopyFromPrevious (frame n replaced with frame n-1) CN =2 # CopyFromNext (frame n replaced with frame n+1) I1 =3:1 # Interpolate 1 I2 =4:2 # Interpolate 2 I3 =6:3 # Interpolate 3 I4 =9:4 # Etc I5 =13:5 # I6 =18:6 # I7 =24:7 # I8 =31:8 # I9 =39:9 # I10=48:10 # I11=58:11 # I12=69:12 # I13=81:13 # I14=94:14 # I15=108:15 # I16=123:16 # I17=139:17 # I18=156:18 # I19=174:19 # I20=193:20 # """ GSCript(""" NICKNAMES="" For(i=0,MaxInterp+2) {NICKNAMES=RT_TxtAddStr(NICKNAMES,RT_TxtGetLine(ALLNICKS,i))} thSCD1=(8*8)*255 thSCD2=255 BLEND=False bs=(CP.width>960) ? 16 : 8 supFilt = CP.Blur(0.6).MSuper(pel=2,sharp=sharp,rfilter=rfilter,hpad=16, vpad=16) sup = CP.MSuper(pel=2,sharp=sharp,rfilter=rfilter,hpad=16, vpad=16, levels=1) For(Bad=1,MaxInterp) { Eval(RT_String("I%0.2d_bv=supFilt.MAnalyse(isb=true ,delta=%d, blksize=bs, overlap=bs/2)",Bad,Bad+1)) Eval(RT_String("I%0.2d_fv=supFilt.MAnalyse(isb=false,delta=%d, blksize=bs, overlap=bs/2)",Bad,Bad+1)) Eval(RT_String("I%0.2d_bv=MRecalculate(sup,I%0.2d_bv, blksize=bs/2, overlap=bs/4, thSAD=100)",Bad,Bad)) Eval(RT_String("I%0.2d_fv=MRecalculate(sup,I%0.2d_fv, blksize=bs/2, overlap=bs/4, thSAD=100)",Bad,Bad)) for(i=1,Bad) { Eval(RT_String("I%0.2d_%0.2d=CP.MFlowInter(sup,I%0.2d_bv,I%0.2d_fv,time=100.0*%d/%d,ml=ml,Blend=BLEND,thSCD1=thSCD1,thSCD2=thSCD2)", \ Bad,i,Bad,Bad,i,Bad+1)) } } SSS="c.ClipClop(CP,CN," For(i=1,MaxInterp) {S=" \ " for(j=1,i) {S=S+RT_String("I%0.2d_%.02d,",i,j)} SSS=RT_TxtAddStr(SSS,S)} SSS=RT_TxtAddStr(SSS," \ scmd=SCMD,cmd=CMD,nickname=NICKNAMES,show=SHOW,dv=DV)") """) Eval(SSS) } Code:
Avisource("...") SCMD=""" CP 100 # Copy frame 100 from frame 99 CN 200 # Copy frame 200 from 201 I1 300 # Interpolate frame 300 using 299 and 301 as source frames. I2 400 I3 500 I4 600 I5 700 I6 800 I7 900 I8 1000 I9 1100 I10 1200 I11 1300 # Interpolate 11 frames at 1300 using frames 1299 and 1300 as source frames. """ SetMemoryMax(256) MaxInterp=15 # Maximum 15 frame interpolations. DoctorFrames(last, Scmd=SCMD,Show=True, MaxInterp=MaxInterp) Return Last
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 16th April 2016 at 19:09. |
20th December 2018, 14:18 | #35 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
What were you replying to, and what has ClipClop got to do with it, thanx.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
21st December 2018, 02:25 | #36 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,352
|
Hello StainlessS, just trying to bring attention to some key plugins still lacking avs+ support in case there were new ways to do things. Just updated to avs+ x64 from avs x86 and I'm still trying to wrap my head around it.
|
21st December 2018, 08:53 | #37 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
I'll post an update Clipclop soon.
(I actually use x64 ClipClop, forgot it was not upped yet)
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
22nd December 2018, 12:30 | #38 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
ClipClop v1.26, new version see first post.
Moved to VS2008, Added Version resource, added x64. Docs in 2 parts, first post has a few lines removed to fit single post. Part 1 of 2 Code:
ClipClop() Range/Frame Replacement Plugins for Avisynth v2.58 and v2.6 x86 & x64, by StainlessS. Requires VS 2008 CPP Runtimes. http://forum.doom9.org/showthread.php?t=162266 Planar, YUY2, RGB32, RGB24. Does NOT affect Audio (as source clip). Clipclop is a simple plugin to replace ranges in a source clip with the same range, from a replacement clip. Supports up to 255 replacement clips, with unlimited number of replacements into output clip. If you wanted to do 1000 single frame replacements in script, that would require 3 trims and 2 splices for each replaced frame, ie 3000 trims and 2000 splices. This would involve 5000 'zero cost' filters which together will cost a little more than zero. With ClipClop(), this is reduced to 1 single filter with an overhead of approx 1 trim or splice filter. There is a small overhead setting up the filter (before the very 1st frame is fetched) while parsing the file/string commands, but then parsing and setting up 5000 trim/splice filters in a script would not be without cost either. Clipclop can parse in the region of 40,000 commands (from file) in about 1 second [guessed, based on timing the sister plugin Prune(), a trim/splice plugin]. v1.10, Implements 'Nickname's, Pseudonyms for the replacement clips, ie instead of '17 100,200' you could use eg 'dn 100,200', in this case it might be to replace frames 100 to 200 of the source clip with the same frames of a denoised clip (clip 17). OR, 'cp 345' to replace frame 345 with a clip where frame n was copied from frame n-1 of the source clip, ie CopyFromPrevious [this could be generated via 'SelectEvery(1,-1)', or 'CopyFromNext' clip by 'SelectEvery(1,1)]. Supports Nicknames of up to 31 characters in length so you could use eg 'PredictFromPrevious 1234', or 'FlippedVertical 666,999'. Nicknames allow you to think in terms of functionality rather than to keep looking up which clip index holds a modified clip and you could actually write your command file/string before you even know how many clips you need, what clip index they will be, or even how you will actually create/process the clip. Once you've tried ClipClop(), you will wonder why you spent all those years doing it the hard way. (Repeat after me, "I dooo believe in Fairies!".) DebugView (Highly recommended, allows viewing of info and warnings from the plugin.) http://technet.microsoft.com/en-gb/sysinternals/bb545027 ClipClop(clip source, clip R1, ... , clip R255, string 'Cmd',string 'SCmd', bool 'Show', bool 'Ver',int 'dv', bool 'NoErr',string "Nickname",bool "Purge") Compulsory args: Source, clip, No default [AKA (also known as) R0 in commands]. Rx, clip, No Default Replacement clips, at least one required, The first clip R1, up to R255 are supported, 255 clips in all. Optional args: Cmd, string, Default= "", Not set. Command file, use eg "Clop.txt" for command file in your *.avs script directory. SCmd, string, Default= "", Not set. Command String, as for command file, but commands supplied in a string rather than a file. Show bool, Default= false. true = Show info. v2.6 plugin only required for Show or Ver args with v2.6 colorspace. ver bool, Default=false. true = Show version. v2.6 plugin only required for Show or Ver args with v2.6 colorspace. dv int, Default 0, possible values, 0 - 4 (Out of range values will default to 4==Debug==FULL) Generates info/warning/error messages during the filter setup stage (before 1st frame is displayed). 0 = No info 1 = Errors sent to DebugView window (Need DebugView Utility) 2 = Warnings & Errors sent to DebugView window 3 = Parsing Info, Warnings & Errors sent to DebugView window. 4 = Debug info, Parsing Info, Warnings & Errors sent to DebugView window (dll Testing, or just for your curiosity). In DebugView, filter for "ClipClop:" to skip all the extraneous stuff generated by other plugins/programs. (On "Menu:Edit-Filter/Highlight", and enter "ClipClop:", all ClipClop messages are prefixed by "ClipClop:". http://technet.microsoft.com/en-gb/sysinternals/bb545027 NoErr, bool, Default false false = Stop on ANY command error. (usual mode) You will be informed in DebugView which (if any) errors can be ignored if switched to NoErr==true. true = Suppress trivial errors where possible. Only use after you have viewed and dismissed as unimportant any DebugView errors displayed when NoErr==false. Not all errors are ignorable. Nickname, String, default "" (not set) [Added v1.10]. Nicknames representing a clip index eg 'cp 37' instead of '5 37'. Purge, bool, default True. (New v1.20) False, do not Purge un-used clips. True (Default), Purge unused clips. Set all un-used clips to NULL within ClipClop, so if they are not used anywhere else, then clips can be released from memory. Purged clips shown when dv==3 or 4, ie INFO or DEBUG. Clipclop is a simple plugin to replace ranges in a source clip with the same range, from a selection of up to 255 replacement clips, unlimited range replacements. The source clip must be supplied and at least one of the replacement clips must also to be supplied or it will throw an error. Also, the replacement clips must be in the same colorspace, same size as the source clip. If the Rx clips are longer than the source clip, then the framecount will be truncated to that of the source clip and will not produce an error (the clip itself will not be touched, the plugin will consider it to have the same frame count as the source). ClipClop will accept up to 255 replacment (Rx) clips, they are not named and must follow the source clip. (Hopefully that is enough for those of you who are very demanding [You know who you are]) ;) Replacement clips start at R1 and go up to R255. Either the command file (Cmd) or the Command string (SCmd) must also be supplied, if both are supplied, the commands in the Command File are processed first followed by those in the Command String. Where replacements are done more than once, the later one will take effect. The Command file (Cmd) and the Command String (SCmd) will have a series of ranges to 'clop' (ie replace) and will have the below format. Rx(s,e) Where the 'R' is optional and can be omitted. where x is the replacement clip index number eg R7 is replacement clip 7, (the first one is R1). Where the '(' and ')' are optional and if skipped then the opening '(' must be replaced by Comma ',' or ' ' (SPACE). Where the ',' (COMMA) can be replaced with a ' ' (SPACE) [only needed if 'e' is specified]. Where the ')' is strictly speaking, unnecessary, whether the '(' is used or not. s is the start frame and MUST be supplied. e is optional and if missing, then the range will consist of only 1 frame. If e=0, then the range will continue to the last frame of the REPLACEMENT CLIP (Rx) , it will not produce an error if the replacement clip is shorter than the source clip. (would be limited to the length of the shorter clip, either source or replacement). If e is -ve (negative) then it will represent a -ve frame count eg -2 means 2 frames. These are all valid: R1 (35,42) # This is a comment R1 65 374 2 1000 3 3700 5000 4 (36734,0) # My helicopter is full of penguins 5,23644,-3 R6,20,30) R6(56,123 If the command file contained the above commands then clips R1 to R6 have all to be supplied to ClipClop. The Cmd file commands MUST be line separated (ie one command per line). The SCmd commands can be either Line Separated as the CMD commands or use a ';' SEMICOLON separator, as in SCMD="R1(35,42) # My Zeppelin is full of lead ; R1 65 374 R2,1000,1200; R2(1400,1500) R3(2000,-100) # My Spaceship is replete with aardvarks" In SCmd, A SEMICOLON ';' would NOT be acceptable in a COMMENT, it would signify a new line and command pending (ie PARSE error, it would look for a command following the ';'). R0 can be used in the commands to mean replace with the source clip, might be of use to reset parts of a replaced range, back to how it originally was before previous clopping. Might be useful where eg denoised clip used to replace a range, produced several unacceptable frames that need to be restored from the original source. -----------------------
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
22nd December 2018, 12:31 | #39 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Part 2 of 2
Code:
v1.10, Nickname string is roughly the same format as SCMD, SEMICOLON (;) separated if on same line or line separated, and can also contain comments. A Nickname, MUST start with either an underscore ('_'), or an Alphabetic character ('A' -> 'Z' or 'a' -> 'z'). The remainder of the nickname can contain underscore, alphabetic or numeric ('0' - '9') characters, as in "_Testing_123_Testing" or "AnyOldName_432" or "Fred". The length limit on Nicknames is 31 characters. There are a set of RESERVED names that CANNOT be redefined by Nickname, "Rnnn" or "rnnn" where 'nnn' represents 1 or more numeric digits. In a command file/string, you can use eg "R0" (or '0') to refer to the source clip and "R1" to "R255" (or '1' to '255') to refer to the replacement clips whether or not they have nicknames applied. As well as "(", "," and SPACE " " separators, a nickname allows "=". Below some valid examples:- NickName = " CopyFromPrevious=1 # Comment ; PredictFromNext,2 # another comment ; DN 3 CO=4 ZX(5) QP (6) XXX 7 # Patient: My hand hurts when I do this. ; ttt = 8 # Doctor: Then stop doing that! ds123dgsdg__dld 9 ww(10 yy=11) " Nicknames do not have to be in ascending order, but might be best to keep them that way. Using above Nickname example, "dn 2000,3000" would replace source frames 2000 to 3000 with clip 3 frames 2000 to 3000, when used in a command file or command string. Nicknames are case insignificant ('A' == 'a'). ---------------------- If NoErr is true, then the plugin will try to avoid throwing an error for 'suspect' commands, not all errors will be ignored. Commands that do not fit in the valid formats described above will not be ignored (PARSE error). -ve start frame will not be ignored (PARSE error, it could be clipped to 0, but I REFUSE to allow it). If an Rx clip has been omitted (missed out) then all Rx commands can be ignored. If a range fully or partially falls outside of either the source or Rx clips, then those can be ignored (invalid part of the range). It is recommended that you DO use the linked DebugView utility, to check out warnings, ClipClop() will try to warn you if you need to re-evaluate your,,, evaluations. It will warn of things like source and replacement clips being of different number of frames, there is no need to be alarmed by the NoErr option, you do not have to use it. Dont always use NoErr = true, unless you really really know what you are doing [or your name is 'Cretindesalpes' :) ]. --------------------------------------------------------------------------------------------- Almost all of the hard work of ClipClop is done during setting up the filter. During the rendering stage, ClipClop() does not do anything terribly clever, it just selects the frame to use from a pre-calculated array or uses the source frame instead, but what it does do, it does fast as possible. How can ClipClop be used, well if your source is mostly OK, but one range needs some sort of denoising, and another range needs color correction and a third needs both, then you could eg create a denoised clip, and create a color corrected clip, and a third with both denoising and color correction and specify the ranges to 'clop' with the altered clips, Only the ranges that are actually used with have the denoising/color correction done, and the source clip will be used most of the time and those parts will be very fast. Be warned, if you create a replacement clip using some ULTRA slow motion compensated function and eg replace 1 in 10 frames then it will fly like the wind for 9 frames and jerk to an almost halt for 1, repeatedly, this is not a problem in ClipClop(), it cannot make your ULTRA slow function go faster (It will be a little disturbing if you do that but you could always use eg "AssumeFPS(0.001)" to smooth out the jerks it might however take a little longer :) --------------------------------------------------------------------------------------------- GetParity is implemented in the plugin as requested by Cretindesalpes (Thanks). --------------------------------------------------------------------------------------------- Sister, Trim/splice plugin Prune() [v1.10 with Nicknames too]. http://forum.doom9.org/showthread.php?t=162446 --------------------------------------------------------------------------------------------- v1.20, NickName's are extended to allow MAGIC CLIPS. Magic clips are handled more strictly and cannot be overwritten or redefined, and also cannot be used with a clip range, the range (or more specifically the number of clips [or frames]) is fixed in the NickName definition of the Magic Clip. Magic clips were added for a particular application and it is not expected that you will want to use them yourself, the application is included in the AVS folder by name DoctorFrames.avs. A Magic Clip is a series of associated clips which are treated as a special group, the number of clips in the group is indicated by being preceded by a colon (':'). In NickName string, NICKNAME=""" I3=6:3 # Interpolate 3 frames. Clips start at index 6, 3 clip group. Clip index's 6 to 6 + 3 - 1. """ In above case, the Magic group starts at clip 6 and consists of 3 clips (ie clip 6 to clip 8). With a command of "I3 100" in either Cmd file or SCmd string, Source_Frame Replaced_With R0(100) R6(100) R0(101) R7(100) R0(102) R8(100) You must use the NickName to do Magic Clip replacement, you cannot eg specify in SCMD "6 100", you must use eg "I3 100". You cannot overwrite a Magic Clip replacement, it will produce an error. --------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------- Example usage script using NickNames: ### Avisource("D:\avs\test.avi") ORG=Last V1 = FFT3DFilter(Plane=0,Sigma=1.6) # Light Luma V2 = FFT3DFilter(Plane=0,Sigma=2.0) # Med Luma V3 = FFT3DFilter(Plane=0,Sigma=4.0) # High Luma V4 = FFT3DFilter(Plane=3,Sigma=1.6) # Light Chroma V5 = FFT3DFilter(Plane=3,Sigma=2.0) # Med Chroma V6 = FFT3DFilter(Plane=3,Sigma=4.0) # High Chroma V7 = FFT3DFilter(Plane=4,Sigma=1.6) # Light Luma+Chroma V8 = FFT3DFilter(Plane=4,Sigma=2.0) # Med Luma+Chroma V9 = FFT3DFilter(Plane=4,Sigma=4.0) # High Luma+Chroma V10= FlipHorizontal() # Flip-H V11= FlipVertical() # Flip-V V12= Invert() # Invert NickNames =""" # Psuedonyms for clips (clip index number) L0 = 1 # Light Luma L1 = 2 # Med Luma L2 = 3 # High Luma C0 = 4 # Light Chroma C1 = 5 # Med Chroma C2 = 6 # High Chroma LC0 = 7 # Light Luma + Chroma LC1 = 8 # Med Luma + Chroma LC2 = 9 # High Luma + Chroma FH = 10 # Flip-H FV = 11 # Flip-V INV = 12 # Invert """ SCMD=""" # Clip editing commands in string, can also use commands in file C0 0,99 # Light Chroma frames @ 0 -> 99 L0 100,-200 # Light Luma frames @ 100, 200 frames ie frames 100->299 INV 300,399 # Invert 300->399 L0 400,499 # Light Luma frames 400->499 FH 500,599 # Flip-H 500->599 LC2 600,699 # High Luma + Chroma C1 800 # Med Chroma, Single frame 1 900,999 # Light Luma, We used the clip number instead of a NickName FV 1000,1099 # Flip-V LC1 2000,0 # Med Luma + Chroma, 2000 -> lastframe """ SHOW=True ClipClop(ORG,V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,scmd=SCMD,nickname=NickNames,show=SHOW) --------------------------------------------------------------------------------------------- StainlessS.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 22nd December 2018 at 12:38. |
Tags |
remapframes editing range |
Thread Tools | Search this Thread |
Display Modes | |
|
|