Happy Saturday! and thanks in advance for any help . After learning (and forgetting, ha ha) quite a bit in the process of shriveling my Simpsons NTSC DVD's, I'm attacking my Futurama NTSC DVD's and had a couple questions. I figured that Futurama would be a breeze because the source is progressive with pulldown flags instead of interlaced but, while the quality is indeed much improved, there are still annoying artifacts. Here's a small sample:
S1.E1-FuturamaTestClip
My questions:
1) What is this called, combing?
2) Why does this exist in a progressive source?
3) How would I best eliminate this using AviSynth, the TFM portion of TIVTC?
Thanks for your time.
+ Reply to Thread
Results 1 to 30 of 49
-
-
Well there is certainly telecine happening, instead of interlacing. So a field matcher like TFM would correct that. Normally there would be a standard pattern of 3 progressive frames followed by two combed frames, that could be field matched to 4 progressive frames follwed by an extra duplicate. Then using tdecimate() to remove that extra 1 in 5 duplicate frames. But your sample does not seem to follow a simple pattern, as I see it has a long string of none duplicates at the end of the sample (the part with the old man moving his arms)
Code:LoadPlugin(".............\TIVTC.dll") tfm(order=-1)
-
Cartoons are rarely easy to deal with.
DGIndex shows the clip is only 95% film -- so 5% is encoded interlaced. As pointed out by KarMa, you'll need to field match, then decimate to 23.976 fps. But there's something else odd about the pulldown that requires a second pass through TFM. You should use DGIndex in Honor Pulldown Flags mode to build an index then:
Code:Mpeg2Source("S1.E1-FuturamaTestClip.d2v") AssumeTFF() TFM(chroma=false, pp=0) AssumeBFF() TFM(chroma=false) TDecimate()
And beware that cartoons are often a mix of frame rates so decimating to 23.976 fps may not be right for the entire episode. -
-
Thank you all for your answers, I appreciate them and understand them (for the most part, I think). What I don't understand is why once the progressive source, at 23.976 fps, is striped from the pulldown flags that it still needs to be decimated; isn't it already at 23.976 fps, even if it suffers from combing? That is, aren't the pulldown flags simply (soft) instructions for the 23.976 fps progressive source? Apologies for my ignorance.
-
Your video is a mix of progressive frames with pulldown flags and interlaced frames. To properly handle it you need to perform pulldown on the progressive sections (creating interlaced frames to match the interlaced sections), then field match back to progressive frames and decimate.
-
-
http://avisynth.nl/index.php/Tweak
Code:tweak(sat=0) #Any positive number will increase the saturation
-
The Sat command within the built-in Tweak filter. Or the Saturate command within the SmoothTweak portion of the third-party SmoothAdjust filter.
Any positive number greater than 1 increases saturation. Less than 1 and saturation is decreased. 0 greyscales it. -
Or ColorYUV(cont_u=X, cont_v=Y) where positive values of X and Y increase saturation, negative values decrease it. Tweak(sat=2.0) is the same as ColorYUV(cont_u=256, cont_v=256). Tweak(sat=0.5) is the same as ColorYUV(cont_u=-128, cont_v=-128). ColorYUV allows you to change the two color channels independently when necessary.
-
Oops, seems I've a last question, please. Where would I place the color adjustment filter line in the following script:
Code:### Deinterlace-Match Fields-Decimate ### LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\avisynth_plugin\TIVTC.dll") AssumeTFF() TFM(Chroma=False,PP=0) AssumeBFF() TFM(Chroma=False) TDecimate() ### Crop ### Crop(8,0,-8,0) ### Overall Temporal Denoise ### SMDegrain(TR=1,ThSAD=400,ContraSharp=True,RefineMotion=True,Plane=0,PreFilter=2,Chroma=False,Lsb=True,Lsb_Out=True) ### Resize ### LinearResize(640,480,Lsb_In=True,Lsb_Out=True) ### Darken-Thin Lines ### F=DitherPost(Mode=-1) S=F.FastLineDarkenMod(Strength=24,Prot=6).aWarpSharp2(Blur=4,Type=1,Depth=3,Chroma=2) D=MT_MakeDiff(S,F).Dither_Convert_8_To_16() Dither_Add16(Last,D,Dif=True,U=2,V=2) ### Deband ### GradFun3(Radius=16,SMode=2,StaticNoise=True,Lsb_In=True,Lsb=True) Dither_Out()
Last edited by LouieChuckyMerry; 13th Mar 2016 at 03:45. Reason: Information. Information.
-
Pretty please, where's the best place for the color adjustment line? I know that filter order is important, so I'd like to have it in the correct order. Thanks.
-
-
I like to do color/contrast adjustments early in the processing. I'd put it right after TDecimate.
-
Back for more . Using jagabo's kind suggestion in Post #3 above:
Code:AssumeTFF() TFM(Chroma=False,PP=0) AssumeBFF() TFM(Chroma=False) TDecimate()
So I started searching, beginning with vaporeon800's friendly link in Post #4 above, and tried many things that didn't work, including this. Eventually, just because it was also from jagabo and thinking perhaps it referred to the later seasons, I tried this:
Code:Interleave(TFM(Field=1,Mode=1,PP=1),TFM(Field=0,Mode=1,PP=1)) MergeChroma(Blur(0.0,1.0).aWarpSharp(Depth=10)) SRestore(FRate=23.976)
Code:AssumeTFF() TFM(Chroma=False,PP=0) AssumeBFF() Interleave(TFM(Field=1,Mode=1,PP=1),TFM(Field=0,Mode=1,PP=1)) MergeChroma(Blur(0.0,1.0).aWarpSharp(Depth=10)) SRestore(FRate=23.976)
Here's my full working script in case it matters, and thanks for any input:
Code:LoadPlugin("FullPathToDGDecodeNV.dll") DGSource("FullPathToIndexFile.dgi") ### Deinterlace-Match Fields-Decimate ### LoadPlugin("FullPathToTIVTC.dll") AssumeTFF() TFM(Chroma=False,PP=0) AssumeBFF() Interleave(TFM(Field=1,Mode=1,PP=1),TFM(Field=0,Mode=1,PP=1)) MergeChroma(Blur(0.0,1.0).aWarpSharp(Depth=10)) SRestore(FRate=23.976) ### Adjust Color ### SmoothTweak(Saturation=1.06) ### Crop ### Crop(8,0,-8,0) ### Gibbs Noise Block ### Edge=MT_Edge("prewitt",ThY1=20,ThY2=40).RemoveGrain(17) Mask=MT_Logic(Edge.MT_Expand().MT_Expand().MT_Expand().MT_Expand(),Edge.MT_Inflate().MT_Inpand(),"xor") MT_Merge(Minblur(),Mask,Luma=True) ### Overall Temporal Denoise ### SMDegrain(TR=1,ThSAD=200,ContraSharp=True,RefineMotion=True,Plane=0,PreFilter=2,Chroma=False,Lsb=True,Lsb_Out=True) ### Resize ### LinearResize(640,480,Kernel="Bicubic",A1=-0.5,A2=0.25,Lsb_In=True,Lsb_Out=True) ### Darken-Thin Lines ### F=DitherPost(Mode=-1) S=F.FastLineDarkenMod(Strength=24,Prot=6).aWarpSharp2(Blur=4,Type=1,Depth=3,Chroma=2) D=MT_MakeDiff(S,F).Dither_Convert_8_To_16() Dither_Add16(Last,D,Dif=True,U=2,V=2) ### Deband ### GradFun3(Radius=16,ThR=0.55,SMode=2,StaticNoise=True,Lsb_In=True,Lsb=True) ### Preview Source OR Send 16-bit Output To x264 10-bit ### ## Trim() # SelectRangeEvery(1000,66) # DitherPost() Dither_Out()
-
D'oh! Too many links, too many links... anyway, thanks for your patience. After seemingly myriad encoding tests it seems that with the working script at the end of Post #18 above there are three main types of artifacts remaining after encoding:
1) S1.E1-FuturamaTestClip[Combing1]: this source clip encoded with the working script leaves a single frame with extreme combing as the door closes on Fry. This type of artifact appears roughly every 1000 frames across all my tests, and is the problem I'd like to solve most.
Edit: after reading (then rereading several more times) the TIVTC/TFM Wiki, then running many a test, it appears that dropping the two "PP=1"s from the Interleave line in the working script, thus returning the post processing mode to its default of 6, has solved problem 1). But I'll run more tests to be certain...
2) S2.E14-FuturamaTestClip[Combing2]: this source clip encoded with the working script leaves a single frame with subtle combing as the man puts his card in the ATM. This type of artifact appears two or three times as frequently as 1) and is much less annoying, but I still wouldn't mind correcting the problem; however, stepping through the source frame-by-frame this seems to be an unfixable flaw in the source and not an issue with (de)interlacing.
3) S3.E14-FuturamaTestClip[ChromaBlending]: this source clip encoded with the working script leaves a frame with chroma (field?) blending as the second baby's arms extend. I'd love to be able to correct this, if possible.
Given my limited knowledge, it seems to me that with skillful tweaks to the working script 1) and 3) are solvable problems. Of course, I'm counting on someone with skills for suggestions, any of which are most gratefully appreciated .Last edited by LouieChuckyMerry; 27th Apr 2016 at 06:07. Reason: Seeming Slight Success
-
For the IVTC try the following:
Code:Mpeg2Source("S1.E1-FuturamaTestClip[Combing1].d2v", CPU2="ooooxx", Info=3) Interleave(TFM(Field=1,Mode=1,PP=1),TFM(Field=0,Mode=1,PP=1)) TFM(field=1) TDecimate(cycle=10, cycleR=6)
The problem in the first clip was two orphaned fields as the door closes. There is no other field with which to match them. The second clip has a frame with aliasing artifacts. The third clip has a frame where the two fields' chroma are blurred together. -
Thank you very much for the suggestion and the explanations, jagabo. Having poked through more of the sources frame-by-frame I think the frames suffering from aliasing and chroma blending are well beyond my current ability (and patience) to correct; however, as single frames at 23.976 fps they also zip by very very quickly, enough so as to be hardly noticeable. I can live with them. It was the sudden frames with drastic combing that I mostly wanted to cure and your update does the trick. I'll run some tests comparing the working script with either
Code:AssumeTFF() TFM(Chroma=False,PP=0) AssumeBFF() Interleave(TFM(Field=1,Mode=1,PP=1),TFM(Field=0,Mode=1,PP=1)) TFM(Field=1) TDecimate(Cycle=10,CycleR=6)
Code:AssumeTFF() TFM(Chroma=False,PP=0) AssumeBFF() Interleave(TFM(Field=1,Mode=1),TFM(Field=0,Mode=1)) MergeChroma(Blur(0.0,1.0).aWarpSharp(Depth=10)) SRestore(FRate=23.976)
-
Happy Friday! After extensive testing it seems that both the above scripts have limitations, so I made a combination that I hope can be perfected with some help.
This script does a really good job with the combing but the chroma blending is a bit lacking:
Code:AssumeTFF() TFM(Chroma=False,PP=0) AssumeBFF() Interleave(TFM(Mode=1,PP=1,Field=1),TFM(Mode=1,PP=1,Field=1)) MergeChroma(Blur(0.0,1.0).aWarpSharp(Depth=10)) TFM(Field=1,CThresh=17) SRestore(23.976)
while the same script minus the "PP=1"s very much improves the chroma blending but fries (Frys? ) the combing
Code:AssumeTFF() TFM(Chroma=False,PP=0) AssumeBFF() Interleave(TFM(Mode=1,Field=1),TFM(Mode=1,Field=1)) MergeChroma(Blur(0.0,1.0).aWarpSharp(Depth=10)) TFM(Field=1,CThresh=17) SRestore(23.976)
It seems to me there has to be a way to get the best of both scripts, but for the life of me I can't figure it out. Pretty please, can someone guide me to the promised land . Thank you! -
What about this:
Code:Interleave(TFM(Mode=1,PP=0,Field=1),TFM(Mode=1,PP=0,Field=0)) # reverse field args for bff TFM(field=0, cthresh=17) vInverse() # remove small comb artifacts found left in some shots SRestore(23.976)
What's different in S3.E14-FuturamaTestClip2.m1v is the way the titles fade in/out. They fade at 60 fields per second, confusing all the TFM calls. -
-
After running a couple SelectRangeEvery(66,1000)'s for each season, your last update appears to function as well as possible given the source; the combing and chroma blending are minimized, a fine combination of the two earlier scripts. Thank you! I'll run a full episode overnight then reassess. The only issue remaining is the opening title sequences. As you were kind enough to point out, their fade ins-outs are causing trouble. Adding "CThresh=17" fixed this for most of the episodes, including S3.E14-FuturamaTestClip[ChromaBlending] (which happens to include titles). However, S4.E13-FuturamaTestClip[Titles2] needed "CThresh=23" in order to eliminate the combing bursts in the crowd scene, and for S3.E2-FuturamaTestClip[Titles1] I was unable to remove the title sequence combing when the trucker shakes his hips left-to-right no matter how high I set the "CThresh". This leaves me with two questions:
1) Why does raising the "CThresh" work for one clip but not the other? Is it just luck that some of the TFM calls for the 60 fields per second sections leave "fixable" frames?
2) Is there any way in the script to differentiate between the 60 fields per second sections and the rest? That is, can an if-then type statement be added to the script, something along the lines of "If 60 fields per second, then TFM this way. If otherwise, then TFM this other way?"
Now to crawl into bed. Thank you thank you thank you...Last edited by LouieChuckyMerry; 1st May 2016 at 02:02. Reason: Renaming
-
Note that the titles1 test clip contained a file called titles2. It has "hip shaking" so I assumed it was the titles1 clip you referred to. I'm not seeing any residual combing in that shot with the earlier script. But it's BFF where most of the others have been TFF. Swapping the field=N arguments might help. Or you can change the Inteleave() line to:
Code:GetParity() ? Interleave(TFM(Mode=1,PP=0,Field=1),TFM(Mode=1,PP=0,Field=0)) : Interleave(TFM(Mode=1,PP=0,Field=0),TFM(Mode=1,PP=0,Field=1))
Cthresh determines how much combing TFM has to see before it decides a frame is interlaced. The higher you set it the more combing it has to see before it deinterlaces.
Basically, yes.
All of the clips have been 60 fields per second. The issue is whether consecutive fields really contain changes at every field.
I don't see any easy way to detect this. -
I fixed the name, thanks. With the script
Code:AssumeTFF() TFM(Chroma=False,PP=0) AssumeBFF() Interleave(TFM(Mode=1,PP=0,Field=1),TFM(Mode=1,PP=0,Field=0)) TFM(Field=0,CThresh=17) Vinverse() SRestore(23.976)
I read the TIVTC/TFM Wiki repeatedly, and the CThresh section rerepeatedly, and it still confuses me. It seems to me that setting "CThresh=1" would solve any problem because then basically all combing would be eliminated, but that's not the case. I'll read it some more times...
Is there a way to determine whether consecutive fields really contain changes at every field, or is that question absurdly naive?Last edited by LouieChuckyMerry; 1st May 2016 at 02:57. Reason: The Link!
-
I think you're misinterpreting aliasing with combing. When the Rich Moore titles fade in and out the original video has been bob deinterlaced leaving lots of aliasing artifacts. The script does nothing to try to reduce those. You can try using QTGMC(InputType=2) after SRestore() to reduce the aliasing. But it will cause damage to other parts of the video. I think it's going to be hard detecting frames with those aliasing artifacts and fixing only those.
-
Yep, I definitely need to get the artifacts straight . In my dozen SelectRangeEvery(66,1000) tests I only noticed the aliasing twice, and for just a quick couple-four frames at that. So, I'll run some Trim tests with the opening credits and see how bad it is; if it's bearable, great, if not I'll probably pester you some more. As of now, the script
Code:LoadPlugin("SourcePath.dll") DGSource("SourcePath.dgi") ### Deinterlace-Match Fields-Decimate ### LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\avisynth_plugin\TIVTC.dll") AssumeTFF() TFM(Chroma=False,PP=0) AssumeBFF() Interleave(TFM(Mode=1,PP=0,Field=1),TFM(Mode=1,PP=0,Field=0)) TFM(Field=0,CThresh=23) Vinverse() SRestore(23.976) ### Adjust Color ### SmoothTweak(Saturation=1.06) ### Crop ### Crop(8,0,-8,0) ### Gibbs Noise Block ### Edge=MT_Edge("prewitt",ThY1=20,ThY2=40).RemoveGrain(17) Mask=MT_Logic(Edge.MT_Expand().MT_Expand().MT_Expand().MT_Expand(),Edge.MT_Inflate().MT_Inpand(),"xor") MT_Merge(Minblur(),Mask,Luma=True) ### Overall Temporal Denoise ### SMDegrain(TR=1,ThSAD=200,ContraSharp=True,RefineMotion=True,Plane=0,PreFilter=2,Chroma=False,Lsb=True,Lsb_Out=True) ### Resize ### LinearResize(640,480,Kernel="Bicubic",A1=-0.5,A2=0.25,Lsb_In=True,Lsb_Out=True) ### Darken-Thin Lines ### F=DitherPost(Mode=-1) S=F.FastLineDarkenMod(Strength=24,Prot=6).aWarpSharp2(Blur=4,Type=1,Depth=2,Chroma=2) D=MT_MakeDiff(S,F).Dither_Convert_8_To_16() Dither_Add16(Last,D,Dif=True,U=2,V=2) ### Deband ### GradFun3(Radius=16,ThR=0.55,SMode=2,StaticNoise=True,Lsb_In=True,Lsb=True) ### Preview Source OR Send 16-bit Output To x264 10-bit ### ## Trim() # SelectRangeEvery(1000,66) # DitherPost() Dither_Out()
Edit: I remembered that I had a question. Before I learned that it was aliasing, I was using CThresh to eliminate what I thought was residual combing. And it worked! Why would raising the CThresh to 23 eliminate some of the aliasing that I thought was combing?Last edited by LouieChuckyMerry; 2nd May 2016 at 01:17. Reason: A Question
Similar Threads
-
Progressive source has interlacing lines in the video?
By killerteengohan in forum RestorationReplies: 9Last Post: 21st Mar 2015, 22:43 -
Dot Crawl Artifacts from Composite Source?
By Ish Kabibble in forum Capturing and VCRReplies: 9Last Post: 20th Mar 2015, 07:48 -
Progressive Segm.Frame video to real progressive videos in PREMIERE PRO CS5
By Stears555 in forum EditingReplies: 4Last Post: 3rd Mar 2013, 15:43 -
Determine original framerate of progressive source
By bobp127001 in forum Video ConversionReplies: 8Last Post: 2nd Mar 2013, 16:52 -
Removing jagged interlacing artifacts from a progressive file?
By tfolder in forum RestorationReplies: 13Last Post: 17th Mar 2011, 05:19