Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sorry it's taken a while, RL got in the way again.
- And apologies in advance if this a bit higgledy-piggledy....
- I find it's much quicker/easier to have an 'unfiltered' script open in another tab, that way I can just use the wheel thing on my mouse to switch between tabs and make instant comparisons :)
- You've got two too many colour conversions going on. Ideally you want as few of those as possible.
- At the moment you're going from YV12 -> RGB32(?) -> YV12 -> RGB32 -> YV12
- If you must use SpotRemover you should just be doing - YV12 -> RGB32 -> YV12
- If you're losslessly encoding to YV12, make sure you use Fast Recompress in VDub to avoid VDub shifting the colorspace to RGB.
- Which lossless codec are you using?
- I don't do multithreading so it's something I don't know much about.
- Srestore should be called straight after the source (or in this case, straight after a call to trim) and with no other filtering in the script. Srestore will work much better that way :)
- So you should really be losslessly encoding those 7 sections separately. That should work in your favour too, as you'll be able to make use of all your cores and multithread the easier way - line up all the lossless encodes in individual instances of VDub and then encode all of them at once :)
- Do the freezeframe stuff in the final encode.
- Other than freezeframe there's not much can be done with all the bad scene changes. Unless of course you fix them manually in photoshop.
- Don't forget you can make use of the 'dclip' in srestore to speed up the blend and motion detection...
- d=last.bob(-0.2,0.6)
- qtgmc("medium")
- srestore(dclip=d)
- If you do it all it all in one pass though, you'd need to change the way you've scripted for it and make a function to use srestore:
- deinted=qtgmc("medium",fpsdivisor=2)
- deblended=srestored()
- a1=deinted.trim(0,2751)
- a2=deblended.trim(2752,3691)
- a3=deinted.trim(3692,6131)
- a4=deblended.trim(6132,7254)
- a5=deinted.trim(7255,8481)
- a6=deblended.trim(8482,11641)
- a7=deinted.trim(11642,0)
- a1+a2+a3+a4+a5+a6+a7
- function srestored(clip)
- {
- clip
- bobbed = clip.bob(-0.2,0.6)
- qtgmc = clip.qtgmc("medium")
- qtgmc.srestore(dclip=bobbed,24.975)
- assumefps("ntsc_video" )
- }
- You can use qtgmc more safely with srestore if you need to though, just use another bobber for the dclip (as I did in the function above). If you want to use it in a script on it's own though...
- source = last
- bobbed = source.bob(-0.2,0.6)
- qtgmc = source.qtgmc()
- qtgmc.srestore(dclip=bobbed,24.975)
- You shouldn't really be using qtgmc for blended crap anyway though, more so if you're removing dirt/spots - qtgmc will cause some of the dirt/spots to 'bleed' into succeeding frame/s, making removal of them near impossible. I'm sure there was a setting in qtgmc so that didn't happen but I'm buggered if I can remember what it was.
- If you want to use qtgmc on this, then use another bobber for srestore all together and then run qtgmc in one of the progressive modes afterwards. That might or might not work though, often you'll have to use the slow lossless modes.
- I noticed while analysing it that the pattern was constant and can be restored to 25 fps. Try this on a blended section:
- function fixblends(clip,offset)
- {
- clip
- assumetff()
- bob(-0.2,0.6)
- changefps(25*4,linear=false)
- selectevery(4,offset) # The offset is from 0 -> 4
- }
- fixblends(1) deblends the first scene, (3) the second and (2) the third and final one.
- Using that is a much safer way of deblending within a trim script as well.
- It's much faster than using srestore too.
- I've no idea why srestore doesn't lock onto the 25 fps pattern though.
- If you need to deblend/restore something to 24.975 fps, try repal instead of srestore, it can give better results sometimes :)
- A quick way of finding out if the base frame rate is 25 fps or 24.975 fps is to run repal first - If it deblends fully then you know the base frame rate is 24.975 fps :)
- You can make the grain generated by the original GrainFactory3 somewhat stable as well, through the temp_avg setting. Or if you want more control over the stability of the gran in the bright, midtone or dark areas then try the version that taro modded (GrainFactory3mod).
- If you say grainfactory3 sometimes caused some ugly artifacts, then maybe using GrainFactory3mod instead (or GrainFactoryLite) with the f3kdb generated grain instead of granfactory3's will prevent them?
- It's CPU=6 (and qtgmc) that's killing the blocking on this, not LumaDBL.
- It's not the grain in LumaDBL that deblocks (though added grain can hide it somewhat), but the debanding.
- An alternative to LumaDBL is GradFun2DB_MOD - Have you tried that?
- The reason why the CPU=6 postprocessing in DGDecode isn't very good is because it uses Deblock() and that just tends to filter everything rather than say DeblockQED which tries to identify what needs deblocking first.
- You can apply a filter to just the dark areas if that's all you need to filter:
- b=your_filtering()
- mt_merge(last,b,b.mt_invert,luma=true)
- That's not very tweakable though, so you might want to try something like this instead...
- Set up the mask first...
- a=last
- a_low=0
- a_high=50
- mask=a.levels(a_low,1.0,a_high,255,0,false)
- mask.greyscale()
- Change the '50'
- The white parts will get filtered
- And then use those values in the final script...
- a=last
- b=Your filtering here
- a_low=0
- a_high=50
- mask=a.levels(a_low,1.0,a_high,255,0,false)
- a.mt_merge(b,mask,U=3,V=3,luma=true)
- I'm not at all familiar with spotremover so I'd just use avisynth for the dirt/spot removal:
- A very aggressive call to RNMC for the interview scenes RemoveNoiseMC(rdlimit=40,rgrain=2,denoise=0)
- Oh, and morph nicely fixed the bad frame @ frame 698
- Morph.avs -link
- That artefact on the guys jacket looks more like moire to me. Impossible to fix in avisynth though, whatever it is.
- The blended sections are a bit more tricky though as you'll always lose some details when doing dirt removal, specially if you want to catch the bigger spots as well.
- I noticed the way you configured SpotRemover is that it blurs the bigger spots rather than trying to replace the area effected. I don't know if that can be fixed or not?
- As most of the bigger spots are white, I'd probably run an aggressive call of RNMC on just the white and then another, more restrained call of RNMC afterwards on all the image to clean up what's left of the white spots and the rest of the spots...or maybe one of the variants of Removespots - It depends which does the better spot removal and causes the least damage.
- You can run RNMC on just the white using similar to what's above, or something like this:
- clip=last
- white=mt_binarize(170).mt_expand().mt_expand().Blur(1.0)
- overlay(clip,RemoveNoiseMC(rdlimit=40,rgrain=2,denoise=0),mask=white)
- A more restrained call to RNMC would be something like RemoveNoiseMC(rdlimit=6,rgrain=1,denoise=0)
- Anyway, I think I've waffled on enough for the time being lol
- Happy encoding :)
- -------- damascus wrote: --------
- I just comment out filters and refresh to decide if I want to keep them or not. I may do that in a few places. I usually only use smoothuv on trimmed sections like scrolling credits where greyscale doesn't seem to look right, or stuff that is monochromatic like tinted silent film. I really worry about color bleeding with it. I'll try chubbyrain2 next time I run into some rainbowing. I've tried a lot of filters for that with not a lot of success, other than smoothuv which is dangerous.
- I'm using lossless encodes right now with a bunch of short extras which are hybrid sources. AvsPmod crashes if I try to load my full script, so first as a lossless encode
- SetMemoryMax(640)
- SetMTMode(3,8)
- MPEG2Source("F:\1979_Panny z Wilka aka Young Girls Of Wilko\Edward Klosinski.d2v", cpu=6)
- SetMTMode(2)
- qtgmc("medium",edithreads=3)
- a1=trim( 0 , 2751 ).selecteven()
- SetMTMode(5)
- a2=trim( 2752 , 3691 ).srestore(frate=24.975).AssumeFPS("ntsc_video" )
- a3=trim( 3692 , 6131 ).selecteven()
- a4=trim( 6132 , 7254 ).srestore(frate=24.975).AssumeFPS("ntsc_video" )
- a5=trim( 7255 , 8481 ).selecteven()
- a6=trim( 8482 , 11641 ).srestore(frate=24.975).AssumeFPS("ntsc_video" )
- SetMTMode(2)
- a7=trim( 11642 , 0 ).selecteven()
- a1+a2+a3+a4+a5+a6+a7
- FreezeFrame( 1375 , 1375 , 1374 )
- FreezeFrame( 1767 , 1767 , 1766 )
- FreezeFrame( 2988 , 2988 , 2989 )
- FreezeFrame( 4070 , 4070 , 4071 )
- FreezeFrame( 5387 , 5387 , 5388 )
- followed by the final encode as x264
- SetMemoryMax(800)
- SetMTMode(3,8)
- clip1=AVISource("E:\work\Edward Klosinski.avi").ConvertToYV12()
- clip1
- SetMTMode(5)
- LoadVirtualDubPlugin("C:\Program Files\plugins32\SpotRemover.vdf","SpotRemover",11)
- super = MSuper(pel=1, sharp=0)
- b_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=4, overlap=2)
- b_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=4, overlap=2)
- f_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=4, overlap=2)
- f_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=4, overlap=2)
- bf2 = MCompensate(super, b_vec2)
- bf1 = MCompensate(super, b_vec1)
- ff1 = MCompensate(super, f_vec1)
- ff2 = MCompensate(super, f_vec2)
- interleave( bf2, bf1, clip1, ff1, ff2 )
- ConvertToRGB32()
- SpotRemover("SSI:0 SSC:-5 SKW:3 SLI:2 SLC:2 SLD:0 DLS:32 DLC:15 DPC:14 DSF:1 DSD:0 MTX:16 MTY:12 MTL:22 MDX:1 MDY:1 MIH:0","")
- SelectEvery( 5, 3 )
- ConvertToYV12()
- LumaDBL(g1str=10,g1shrp=50,g1size=.7,g1soft=10)
- Crop(10, 34, -10, -34)
- FreezeFrame(0,0,1)
Advertisement
Add Comment
Please, Sign In to add comment