I've recently noticed that using QTGMC when the Srestore plugin has also been loaded causes certain "stationary" areas of certain shots to "bounce" instead of staying stationary. This seems to only happen when the shot itself is predominately stationary (no panning or zooming, and relatively little change in the frame itself), and even then, only sometimes. Otherwise, the majority of the video looks perfect (or at least, as perfect as it can look). Changing the QTGMC presets has no effect.
Does anyone know how to keep the stationary parts of these shots from bouncing?
My current script:
Video source:Code:LoadPlugin("C:\DGDecode.dll") LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\masktools2.dll") Import("C:\Program Files (x86)\AviSynth\plugins\Srestore_27h.avsi") clip1 = MPEG2Source("C:\DVD\1\VTS_01_1.d2v") clip2 = MPEG2Source("C:\DVD\2\VTS_01_1.d2v") clip2.Trim(21,2716).FadeOut0(19) + clip1.Trim(2696,0) QTGMC( Preset="Placebo" ) Srestore(Frate=23.976)
It's encoded interlaced and has interlaced frames, and there's field blending.
Software:
VirtualDub-1.10.4
AviSynth 2.6
Srestore 2.7h
Masktools2 2.2.14
MVTools2 2.7.25 with-depans
NNEDI3 0.9.4.48
QTGMC 3.357
RgTools 0.96
SMDegrain 3.1.2.93s
FFT3DFilter 2.4
GRunT 1.0.1
Specs:
Windows 7 Professional, 64-bit
AMD Phenom(tm) II X6 1090T Processor 3.21 GHz
AMD 6870
AMD 6850
8.00 GB RAM
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 14 of 14
Thread
-
-
use some of the deshimmering settings in QTGMC. Like tr2=1 or tr=2 or 3 if it's really bad.
-
Maybe the wrong field order. Try AssumeTFF() or AssumeBFF() before QTGMC(). Or maybe SwapFields(). Or post a sample of the source.
-
Probably nothing to do with the problem, but wouldn't it be better to de-interlace and deblend the clips before combining them?
clip1 = MPEG2Source("C:\DVD\1\VTS_01_1.d2v").QTGMC( Preset="Placebo" ).Srestore(Frate=23.976)
clip2 = MPEG2Source("C:\DVD\2\VTS_01_1.d2v").QTGMC( Preset="Placebo" ).Srestore(Frate=23.976)
clip2.Trim(21,2716).FadeOut0(19) + clip1.Trim(2696,0)
Of course the frame numbers for trimming would change, but appending scripts can't mess with SRestore's deblending that way. -
Thanks for those suggestions, but none of them made the issue better, and even more of the shot bounces with SwapFields(). Attached is a sample of the source.
Thanks! In what way might I notice Srestore's deblending being messed with? I only only combined the clips after QTGMC and Srestore because skipping around in the video to find the right spots for the cuts is a lot easier that way in VirtualDub. But I would much rather do things the proper way than the easy way.
Thanks for the suggestion, but TR2=1 and TR2=2 have no effect in my case. -
All those thin horizontal lines are confusing QTGMC. And there's essentially no motion in the clip making it hard to really analyze. Can you provide a clip with some real motion? Or, if this is the only part you're having problems with there are other ways to deal with it.
-
Yes, I can provide a clip with more motion, what kind of motion would be most helpful? A steady pan? If that's the case, it almost certainly won't be one of the shots that is giving me problems, which are all mostly still. Also, those thin lines are mimicking a monitor, so they're unique to that shot. But the problem I'm having does extend beyond that to shots without the lines.
Unfortunately, this isn't the only part I'm having problems with. There are multiple DVDs I'm working with, each one with a handful of episodes. I haven't gone through and done a thorough check, but a cursory search indicates that there seems to be an average of one problem shot per episode. I suspect there are more though.Last edited by lomaidala; 13th May 2018 at 02:04.
-
Something with mixed motion would be best, moderate speed panning, character motion, etc.
That particular shot will probably have to be special cased. Something like this works because the only thing that needs deinterlacing is the bright white text:
Code:# build a mask of bright white areas, sum frame before, frame, and frame after mask = last.Trim(1,0).mt_binarize(180) mask = Overlay(mask, last.mt_binarize(180), mode="lighten") mask = Overlay(mask, last.loop(2,0,0).mt_binarize(180), mode="lighten") mask = mask.mt_expand().Blur(1.0).Blur(1.0).Blur(1.0) # expand and soften edges Overlay(last, Blur(0.0, 1.0), mask=mask) # vertical blur (cheap deinterlace) only the masked areas
-
Okay thanks, see attachment.
Thank you. I tried integrating your code into my script, but I came up with this error:
VirtualDub Error
Avisynth open failure:
Script error: Invalid arguments to function "Blur"
(line 15)
Current script:
Code:LoadPlugin("C:\DVD\DGDecode.dll") LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\masktools2.dll") Import("C:\Program Files (x86)\AviSynth\plugins\Srestore_27h.avsi") clip1 = MPEG2Source("C:\DVD\1\VTS_01_1.d2v").QTGMC( Preset="Placebo" ).Srestore(Frate=23.976) clip2 = MPEG2Source("C:\DVD\2\VTS_01_1.d2v").QTGMC( Preset="Placebo" ).Srestore(Frate=23.976) mask = ImageSource("C:\Images\1.png") mask = mask.ConvertToRGB32 mask = clip1.Trim(6665,7300).mt_binarize(180) mask = Overlay(mask, clip1.mt_binarize(180), mode="lighten") mask = Overlay(mask, clip1.loop(2,0,0).mt_binarize(180), mode="lighten") mask = mask.mt_expand().Blur(1.0).Blur(1.0).Blur(1.0) clip2.Trim(11,2178).FadeOut0(15) + \ clip1.Trim(2169,6664) + \ clip1.Trim(6665,7300).Overlay(clip1, Blur(0.0, 1.0), mask=mask) + \ clip1.Trim(7301,0)
Good to know. I'm definitely happier using a deinterlacer with its imperfections than I am leaving the video interlaced.Last edited by lomaidala; 14th May 2018 at 09:57.
-
The problem with Blur() in your script is that you aren't specifying what video to blur. AviSynth uses the name "last" whenever you don't specify a clip for input and output. So a script like this:
Code:Mpeg2Source("filename.d2v") Blur(1.0)
Code:last = Mpeg2Source("filename.d2v") last = Blur(last, 1.0) return(last)
Code:clip1.Trim(6665,7300).Overlay(clip1, Blur(0.0, 1.0), mask=mask)) + clip1.Trim(7301,0)
Code:special = clip1.Trim(6665,7300) special = Overlay(special, Blur(special, 0.0, 1.0), mask=mask) special + clip1.Trim(7301,0)
The new clip you provided is in really poor shape. If you look at individual fields you'll see that many are torn -- the top part of the field comes from one field, the bottom part from another (usually a blend of two fields). Normally one would use TFM().TDecimate() on a film source like this but this problem requires something different. Fortunately, it looks like there are enough clean fields that you can do this:
Code:Mpeg2Source("VTS_01_1.demuxed(1).d2v", CPU2="xxxxxx", Info=3) QTGMC(preset="fast") SRestore(frate=23.976)
There's also a lot of ghosting from an overly strong temporal noise reduction filter. But there's not a lot you can do about that. -
hey So i have an issue with the Srestore.avsi script... as i'm using it with the d2v it keeps giving me an error "No Function named GScriptClip" thinking may not be the correct sRestore Script??
-
You need GRunt: http://avisynth.nl/index.php/GRunT
SRestore requires other filters that you may not have: http://avisynth.nl/index.php/Srestore#Required_PluginsLast edited by jagabo; 15th May 2018 at 16:08.
-
Thank you jagabo for pointing out my mistake with Blur(). And thank you for pointing out CPU2="xxxxxx" and Info=3! I had no idea my source video could benefit from those.
My latest script now loads without an error, but something isn't right because the video looks the same as before.
Current script:
Code:LoadPlugin("C:\DVD\DGDecode.dll") LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\masktools2.dll") Import("C:\Program Files (x86)\AviSynth\plugins\Srestore_27h.avsi") clip1 = MPEG2Source("C:\DVD\1\VTS_01_1.d2v", CPU2="xxxxxx", Info=3).QTGMC( Preset="Placebo" ).Srestore(Frate=23.976) clip2 = MPEG2Source("C:\DVD\2\VTS_01_1.d2v", CPU2="xxxxxx", Info=3).QTGMC( Preset="Placebo" ).Srestore(Frate=23.976) mask = ImageSource("C:\Images\1.png") special = clip1.Trim(6665,7300) special = Overlay(special, Blur(special, 0.0, 1.0), mask=mask) mask = special.Trim(6665,7300).mt_binarize(180) mask = Overlay(mask, clip1.mt_binarize(180), mode="lighten") mask = Overlay(mask, clip1.loop(2,0,0).mt_binarize(180), mode="lighten") mask = mask.mt_expand().Blur(1.0).Blur(1.0).Blur(1.0) clip2.Trim(11,2178).FadeOut0(15) + \ clip1.Trim(2169,6664) + \ special + clip1.Trim(7301,0)
Last edited by lomaidala; 17th May 2018 at 01:21.
-
thank you for pointing out CPU2="xxxxxx" and Info=3!
Some general notes:
Code:LoadPlugin("C:\DVD\DGDecode.dll") LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\masktools2.dll") Import("C:\Program Files (x86)\AviSynth\plugins\Srestore_27h.avsi")
Code:mask = ImageSource("C:\Images\1.png") special = clip1.Trim(6665,7300) special = Overlay(special, Blur(special, 0.0, 1.0), mask=mask)
Code:mask = special.Trim(6665,7300).mt_binarize(180) mask = Overlay(mask, clip1.mt_binarize(180), mode="lighten") mask = Overlay(mask, clip1.loop(2,0,0).mt_binarize(180), mode="lighten") mask = mask.mt_expand().Blur(1.0).Blur(1.0).Blur(1.0)
What I think you're trying to do is apply QTGMC().SRestore() to the bulk of your videos but apply the special deinterlacing (blurring only bright white parts of the frame) to frames 6675 though 7500 of clip1, the portion where QTGMC causes parts of the picture to bounce up and down. Aside from the other errors in the script, you need to perform that special deinterlacing on the video before QTGMC has been applied.
Code:LoadPlugin("C:\DVD\DGDecode.dll") LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\masktools2.dll") Import("C:\Program Files (x86)\AviSynth\plugins\Srestore_27h.avsi") rawclip1 = MPEG2Source("C:\DVD\1\VTS_01_1.d2v", CPU2="xxxxxx", Info=3) clip1 = rawclip1.QTGMC( Preset="Placebo" ).Srestore(Frate=23.976) clip2 = MPEG2Source("C:\DVD\2\VTS_01_1.d2v", CPU2="xxxxxx", Info=3).QTGMC( Preset="Placebo" ).Srestore(Frate=23.976) special = rawclip1.Trim(6665,7300) # get the special part of rawclip1 mask = special.Loop(2,0,0).mt_binarize(180) # build a mask from the previous frame of special mask = Overlay(mask, special.mt_binarize(180), mode="lighten") # add to the mask from the current frame of special mask = Overlay(mask, special.Trim(1,0).mt_binarize(180), mode="lighten") # add to the mask from the next frame of special mask = mask.mt_expand().Blur(1.0).Blur(1.0).Blur(1.0) # expand and blur the mask special = Overlay(special, Blur(special, 0.0, 1.0), mask=mask) # deinterlace (blur) only the bright areas of special special = special.TDecimate() #convert to 23.976 fps like the rest of the clips # now append all the wanted segments clip2.Trim(11,2178).FadeOut0(15) + \ clip1.Trim(2169,6664) + \ special + \ clip1.Trim(7301,0)
Similar Threads
-
How to improve chances of SRestore blend detection?
By ndjamena in forum Video ConversionReplies: 51Last Post: 24th Aug 2020, 07:59 -
srestore and framerates?
By killerteengohan in forum RestorationReplies: 11Last Post: 30th Jan 2018, 18:13 -
A/V sync issues: MeGUI + AVISynth - PAL to 23.976 w/ QTGMC + Srestore
By U2Joshua in forum Video ConversionReplies: 6Last Post: 17th Dec 2016, 11:29 -
How do I use SRESTORE
By DaneClark in forum EditingReplies: 2Last Post: 4th Oct 2016, 21:32 -
My second DVD conversion - use SRestore or not?
By pooksahib in forum Video ConversionReplies: 10Last Post: 16th Apr 2016, 08:28