Hello!
I need to remove these white spots in this DVD. I tried "RemoveSpotsMC2x" but didn't remove it, any idea?
Code:LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\DGDecode.dll") LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\mt-masktools-25.dll") LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\mvtools2.dll") LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\nnedi3.dll") LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\RemoveDirtS.dll") LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\RemoveGrainS.dll") LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\RepairSSE2.dll") LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\masktools2.dll") LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\RgTools.dll") Import("C:\Program Files (x86)\AviSynth\plugins\Srestore.avs") Import("C:\Program Files (x86)\AviSynth\plugins\RemoveSpotsMC.avs") Import("C:\Program Files (x86)\AviSynth\plugins\QTGMC-3.32.avs") SetMTMode(5, 3) SetMemoryMax(512) MPEG2Source("D:\VIDEO\VIDEO_TS\Test01.d2v", cpu=0) SetMTMode(2) AssumeTFF() QTGMC( Preset="Fast", Sharpness=0.3, EdiThreads=1) Srestore(frate=25) AssumeFPS(23.976) Greyscale() a=last e=a.SelectEven().RemoveSpotsMC2x() o=a.SelectOdd().RemoveSpotsMC2x() Interleave(e,o) Crop(2, 0, -2, -8)
		
			+ Reply to Thread
			
		
		
		
			
	
	
				Results 1 to 11 of 11
			
		- 
	
- 
	Maybe it's too big for RemoveSpotsMC. RemoveDirtMC gets rid of it: 
 
 MPEG2Source("test.d2v")
 QTGMC()
 Srestore()
 RemoveDirtMC(last, 55, false)
 
 I forget what it needs besides the function itself. Probably the same as RemoveSpotsMC. The error message will tell you. Here's the function:
- 
	
- 
	Try keeping the limit argument of RemoveDirtMC() as low as possible. The higher it gets the more likely you are to see artifacts (smearing or blurring during motion, removal of spots that are supposed to be there, etc.). Of course, if you set it very low fewer spots will be removed. So you need to strike a balance between spot removal and artifacts. 
 
 If you want to spend the time, after calling RemoveDirtMC(), you can locate individual frames with remaining spots and replace them with the frame before, the frame after, or a motion interpolated frame.
- 
	
- 
	I believe the RemoveGrainT link at the bottom of this page is the one you want: 
 http://avisynth.nl/index.php/Removegrain
 
 You can use ReplaceFramesMC() to replace individual frames or several frames in a row. It replaces the frames with motion interpolated frames from the surrounding frames.
 
 This is a slight variation of someone else's function with a different name -- RX() I think it was.Code:###################################################### function ReplaceFramesMC(clip Source, int N, int "X") { # N is number of the 1st frame in Source that needs replacing. # X is total number of frames to replace, 1 if not specified #e.g. RX(101, 5) would replace 101,102,103,104,105 , by using 100 and 106 as reference points for mflowfps interpolation X = Default(X, 1) start=Source.trim(N-1,-1) #one good frame before, used for interpolation reference point end=Source.trim(N+X,-1) #one good frame after, used for interpolation reference point start+end AssumeFPS(1) #temporarily FPS=1 to use mflowfps super = MSuper(pel=2, hpad=0, vpad=0, rfilter=4) backward_1 = MAnalyse(super, chroma=false, isb=true, blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24)) forward_1 = MAnalyse(super, chroma=false, isb=false, blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24)) backward_2 = MRecalculate(super, chroma=false, backward_1, blksize=8, searchparam=1, search=3) forward_2 = MRecalculate(super, chroma=false, forward_1, blksize=8, searchparam=1, search=3) backward_3 = MRecalculate(super, chroma=false, backward_2, blksize=4, searchparam=0, search=3) forward_3 = MRecalculate(super, chroma=false, forward_2, blksize=4, searchparam=0, search=3) MBlockFps(super, backward_3, forward_3, num=X+1, den=1, mode=0) AssumeFPS(FrameRate(Source)) #return back to normal source framerate for joining Trim(1, framecount-1) #trim ends, leaving replacement frames Source.trim(0,-N) ++ last ++ Source.trim(N+X+1,0) } ######################################################
 
 You call it like:
 
 Beware that this type of motion interpolation doesn't always work well. It sometimes leads to weird distortions.Code:ReplaceFramesMC(100) # replace frame 100 ReplaceFramesMC(205,3) # replace three consecutive frames: 205, 206, and 207 
 
 I have two other functions for replacing a frame with a copy of the frame before or the frame after:
 
 I recently saw an easier way to do this. I think there is a built in function now. But I don't remember what it is.Code:###################################################### function ReplaceFrameNext(clip Source, int N) { # Replace frame at N with frame at N+1 # N is the frame to replace # with frame at N+1 loop(Source, 0, N, N) loop(last, 2, N, N) } ###################################################### function ReplaceFramePrev(clip Source, int N) { # Replace frame at N with frame at N-1 # N is the frame to replace # with frame at N-1 loop(Source, 0, N, N) loop(last, 2, N-1, N-1) } ######################################################
- 
	
- 
	You can call the function as many times as needed. 
 
 
 As with any AviSynth function, include them in the body of your code, or save them as an AVS file and import them into your script, or save them as an AVSI file in AviSyth's plugins folder and they'll automatically import every time AviSynth is started. Then call them with:
 
 Call them as many times as needed.Code:ReplaceFrameNext(123) # replace frame 123 with a copy of frame 124 ReplaceFramePrev(234) # replace frame 234 with a copy of frame 233 
- 
	You can also use ReplaceFramesMC over just a part of a frame by cropping off what you don't want interpolated. For the frame in your sample, something like this works: 
 
 Yadif(Mode=1)#or QTGMC or your favorite bobber
 SRestore()
 A=Last
 B=ReplaceFramesMC(250,2)###the crud in your sample
 B=B.Crop(450,0,0,-400)
 Overlay(A,B,450,0)
 
 That way, parts that might be moving and which might get artifacted by frame interpolation (Dharmendra moving), aren't affected.
- 
	
Similar Threads
- 
  DV footage is giving me yellow/blue spots, any way to remove it?By CZbwoi in forum RestorationReplies: 32Last Post: 16th May 2016, 16:47
- 
  Remove White Christmas Logo from VHSBy matthewjohn23 in forum RestorationReplies: 1Last Post: 16th Jul 2014, 21:36
- 
  How can I remove the yellow spots from the video?By TeNSoR in forum Newbie / General discussionsReplies: 6Last Post: 6th Jun 2014, 09:00
- 
  How can I remove the dirt and green spots from this video?By TeNSoR in forum Newbie / General discussionsReplies: 6Last Post: 23rd May 2014, 10:14
- 
  How to remove scratches and spots in videoBy arun28 in forum EditingReplies: 8Last Post: 24th Feb 2013, 10:25


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			 
			

 Quote
 Quote
