Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 31 to 44 of 44
Thread
-
I looked up StackHorizontal and Overlay and am unsure how I'd used them for this. Assuming I want to process a horizontal line the entire film runtime, would I crop the video height above/below the line, filter that with Devcr, etc., then overlay it somehow at the correct location on the original?
-
yes , you can use the x,y coordinates for overlay() to position the filtered horizontal strip
(in your case you probably just want y coordinates, because x=0)
http://avisynth.org/mediawiki/Overlay -
-
These are the settings I posted earlier in the thread: DeSpot(p1=41, p2=13, mthres=16, pwidth=23, pheight=3, p1percent=10)
I don't have the project on my PC any more, but as I recall the specks and streaks I was getting were only affecting single frames. DeSpot (& DeVCR) could therefore use temporal information (from surrounding frames) to identify & repair the damage.
You mentioned that your problem involves "a horizontal line the entire film runtime". Could that be why DeSpot isn't working on your problem? It can't find any temporal variation that identifies the line as damage. -
it varies from just speckling to speckling with white dropout. But I guess you're right that it's not finding a better normal frame to compare. DeVcr worked slightly with the white dropout, but caused major artifacts with the rest of the video when there was motion. I tried DeScratch but didn't seem to have any effect.
Is there a way to set DeSpot to borrow (or clone) from above/below problem areas within the same frame (rather than temporally)? -
descratch is for vertical scratches, so if you have horizontal "speckles" it won't work, unless you flip the picture, then flip it back
other filters you could try for the "speckling" (I'm not sure if everyone is calling it the same thing - maybe you can post a sample) are removedirt, removedirtmc , removedust . Despot is usually for blob like artifacts, removedust for thin horizontal speckles, removedirt/mc for larger artifacts. RemoveDirt is usually the most damaging (causes the most blurring and detail loss) -
Not sure about that. It sounds like you may be looking for something that works like a logo removal filter: http://avisynth.org/mediawiki/External_plugins#Logo_removal
E.g., InpaintFunc which is for "restoring destroyed parts of an image by using information of valid parts of the image in a way, so that the human eye does not recognize the damaged areas". -
yep, I made sure to rotate the video when DeScratching.
I attached a video sample. It's from a 3 hour movie with most of the dropout happening in the first 30 minutes. Sometimes it looks fine, even no speckling, but then you get flickering black streaks. Basically there's issues with it for the entire film.
I remember manono mentioned Inpaint was incredibly slow, so I've never tried it for logo removal. But the logo removal approach might be a good idea.
word.demuxed.m2v -
One approach is to use a lightly filtered base clip (to get rid of the dirt , white & black horizontal specs) , then overlay a heavily filtered clip onto the persistent stripe. If you were to use the same heavy settings on the whole video frame, it would damage & soften the whole frame too much.
The "side effect" of all variations of the dust/dirt/spot removal filters is that they remove some good things and soften the picture - so beware. eg. things like pupil highlights, stripes on a shirt etc.... may be "mistaken" for dirt. (if you flip back & forth in the 2nd series, you will notice parts of the actor's hair is missing, some facial wrinkles are softer, in addition to the removal of some dustspots & dirt flecks). So make sure you adjust the filters to your taste , and preview the script (maybe base filter is too strong and picture too soft for you, or maybe it's too weak, and it misses detecting some dust specs or dirt flakes) . Note: In these examples, I didn't bother to fix the borders or anything else - so you might want to do other filtering as well
There are some residual defects left over from the avs script and discoloration in the area of the band repair. If you want to improve the repair, I think you would need better tools, some sort of cloning or inpainting - I'm not sure how to do that with avisynth , but there are some inpaint avisynth functions (I've never used them, maybe manono can help you out).
One way to improve these results use special effects software like AE, nuke - that have wire & rig removal tools (think of stunts where actors are suspended by wires) . That horizontal noise band is essentially a thick persistent wire .
I didn't use devcr stack in this, because I found it causes some problems with scene changes. You might have better luck stacking other filters or fiddling with devcr settings. Also, there are updated RemoveDirtMC functions as well (based on mvtools2.x) - you can find those on Doom9 forums , but the script example below use the older mvtools. There are other requirements like removegrain as well.
(I've uploaded the screeshots, in case the image host dies or if you want to flip back & forth to compare).
original
avs script
avs scrpt + nuke
original
avs script
avs script + nuke
mpeg2source("word.demuxed.d2v")
tfm().tdecimate()
a=last
#baseclip
a
RemoveDirtMC(10,false)
base=last
#denoised overlay strip
a
RemoveDirtMC(10,false)
RemoveDirt()
RemoveDust(3)
crop(0,300,0,-148,true)
top=last
Overlay(base,top,y=300)
function RemoveDirt(clip input, int limit, bool _grey)
{
clensed=input.Clense(grey=_grey, cache=4)
alt=input.RemoveGrain(2)
return RestoreMotionBlocks(clensed,input,alternative=alt, pthreshold=4,cthreshold=6, gmthreshold=40,dist=1,dmode=2,debug=false,noise=li mit,noisy=12,grey=_grey)
}
function RemoveDirtMC(clip,int limit, bool "_grey")
{
_grey=default(_grey, false)
limit = default(limit,6)
bvec = clip.MVAnalyse(isb=false, blksize=8, delta=1, pel=2, truemotion=true, idx=1)
fvec = clip.MVAnalyse(isb=true, blksize=8, delta=1, pel=2, truemotion=true, idx=1)
backw = clip.MVFlow(bvec)
forw = clip.MVFlow(fvec)
clp=interleave(backw,clip,forw)
clp=clp.RemoveDirt(limit,_grey)
clp=clp.SelectEvery(3,1)
return clp
}
function RemoveDust(clip input, int _mode)
{
repmode = 16
clensed = Clense(input)
rep=Repair(clensed, input, mode=repmode)
return RemoveGrain(rep, mode=_mode)
} -
I'm not getting anywhere with the different versions of MVtools and Removegrain I've downloaded (keep getting "Clense not found," Removedirt not found", etc). Thanks anyways.
Last edited by spiritgumm; 21st Sep 2010 at 20:34.
-
I know I'm graverobbing but looking to cleanup a few VHS tapes I've transferred. Only been learning avisynth for a week and my head's burst
I've ran script but the "result.avi" file contains the original, filtered, diff?
I'd be grateful if someone could help on how I can just save the filtered file to "result.avi" without the original & diff being included?
Edit:
here's the script, I know I should import the function but I'm just trying to workout the above so I've put it all in a single avs..
Code:#import("C:\AvisynthRepository\AVS260_MT\plugins\DeVCR.avs") function DetectVCRLines(clip c,int threshold) { spacial_data = GeneralConvolution(ConvertToRGB(c),0,"0 -1 0 0 2 0 0 -1 0") bar_data = ConvertToRGB(BilinearResize(spacial_data,16,c.height)) st_data = Overlay(bar_data,Trim(bar_data,1,0),mode = "subtract") st_data2 = Greyscale(Levels(st_data,threshold,10.0,threshold+1,0,255,coring = false)) st_data3 = Greyscale(Levels(st_data2,127,10.0,128,0,255,coring = false)) st_data4 = Overlay(st_data3,st_data3,y = -1, mode = "add") return PointResize(st_data4,c.width,c.height) } function deVCR(clip c,int threshold) { mybars = DetectVCRLines(c,threshold) return Overlay(c,Trim(c,1,0), mask = mybars,greymask = true) } myclip = AVISource("D:\Docs\_rips\dvd\Rips\source.avi").ConvertToYV12() fixedclip = deVCR(myclip,15) StackHorizontal(myclip,fixedclip,Overlay(myclip,fixedclip,mode = "subtract"))
Last edited by bar72; 20th Oct 2018 at 14:48.
-
1. Comment out (#) the StackHorizontal line (or just delete it).
2. Make the last statement:
Code:Return fixedclip
Last edited by johnmeyer; 20th Oct 2018 at 15:54. Reason: format
Similar Threads
-
New AVISynth UI
By tin2tin in forum Latest Video NewsReplies: 23Last Post: 19th Jan 2012, 01:53 -
avisynth
By sportflyer in forum Newbie / General discussionsReplies: 1Last Post: 16th Feb 2010, 04:36 -
Using avisynth
By bsuska in forum Video ConversionReplies: 8Last Post: 16th Jul 2009, 08:32 -
AVIsynth help!
By helper in forum Newbie / General discussionsReplies: 11Last Post: 15th Oct 2008, 03:35 -
Avisynth 3.0
By nbi in forum LinuxReplies: 1Last Post: 30th Oct 2007, 16:50