TFM won't do that because the frame appears as two fields within the VOB file. It will always pair those fields. You can come close to reproducing the VLC frames with Yadif(mode=1).LanczosResize(2456,1826).
What you can do is blur those blemishes away with something like:
After TDecimate(). That does cause some loss of color saturation of small objects though. Try varC=0.5 or other values to find good compromise.Code:MergeChroma(last, BinomialBlur(varC=1.0, U=3, V=3).aWarpSharp2(depth=10))
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 61 to 82 of 82
Thread
-
Last edited by jagabo; 1st Aug 2022 at 18:56.
-
Yeah that seems to fix those frames, but like you said there's a big loss of saturation for small objects. Looks like going below varC=0.5 causes issues, but that value still causes way too much saturation loss.
-
Those artefacts originate from a badly done MPEG2 encoding. Thus a good deblocking is the vital first step (I feel like I said that before).
If you don't want to use the standard DGDecode.dll that does support deblocking within MPEG2Source, Deblock_QED_i must be put right after MPEG2source. -
deblock QED doesn't help this issue no matter where its put. And those artifacts don't appear in VLC like I'd shown before so its something happening in Avisynth.
-
-
-
If you use TFM(chroma=true) , that frame 28665 (in decimated frame numbers) will be deinterlaced
You can use display=true to debug threshold values and other settings . You don't want to deinterlace and degrade good frames where a clean match is found. For example , decimated frame 4378 is detected as combed when using default settings, and deinterlaced instead of matched, leading to avoidable degredation. Raising cthresh to 11 lets it pass through undegraded (there are other settings you can adjust for detection, you might have to adjust blockx,blocky or MI) . And you have to check other sections to see if those settings are ok
It's possible to use another deinterlacer with TFM's clip2 setting. eg. clip2=yadif(mode=0, order=1) , or clip2=qtgmc.selecteven, etc... -
Dang, you really resist taking advice, don't you?
It's not happening in AviSynth. Sorry, that's BS! It's already in the source. You don't seem to believe that because of how it looks in VLC. VLC just deinterlaces with whatever method is selected, completely different approach. Maybe you should just recreate that in AviSynth if you like it.
If you were to look at the unfiltered fields and frames of the MPEG2 source, you would see these same artefacts. It's not "chroma telecining". The MPEG2 artefacts make any IVTC filter have wrong decisions and show you the uglyness of the source. Thus the solution is to fight those compression artefacts and not ignore this fact. Anyways, I'm out of here. -
I think everyone already knows the problem is in the source. The issue is how to alleviate it...
I found that Santiag() of the chroma after TFM alleviates a lot of the chroma artifacts, with less blurring (loss of saturation) of small objects and corners (compared to BinomialBlur).
Code:Mpeg2Source("VTS_01_1.d2v") TFM(d2v="VTS_01_1.d2v", slow=0, pp=0) MergeChroma(last, last.Santiag(1,1).aWarpSharp2(depth=10).Subtitle("cblur", x=10, y=30)) vinverse() TDecimate(Cycle=6,CycleR=1) #ColorMatrix(mode="rec.601->rec.709") deblock_qed(quant1=30,quant2=30)
Code:# Absolute value of the difference between YUV channels. function AbsSubtractY(clip v1, clip v2) { mt_lutxy(v1, v2,"x y - abs", chroma="-128") } function AbsSubtractU(clip v1, clip v2) { AbsSubtractY(v1.UtoY(), v2.UtoY()) } function AbsSubtractV(clip v1, clip v2) { AbsSubtractY(v1.VtoY(), v2.VtoY()) } function AbsSubtractUV(clip v1, clip v2) { StackVertical(AbsSubtractU(v1, v2), AbsSubtractV(v1, v2)) } ########################################################################## Mpeg2Source("VTS_01_1.d2v") l = TFM(d2v="VTS_01_1.d2v", chroma=false, slow=0, pp=0) c = TFM(d2v="VTS_01_1.d2v", chroma=true, slow=0, pp=6) testclip = AbsSubtractUV(l, c) blurclip = MergeChroma(l, l.Santiag(1,1).aWarpSharp2(depth=10)).Subtitle("cblur", x=10, y=30) ConditionalFilter(testclip, blurclip, l, "YPlaneMax", "greaterthan", "50.0", show=false) vinverse() TDecimate(Cycle=6,CycleR=1) #ColorMatrix(mode="rec.601->rec.709") deblock_qed(quant1=30,quant2=30)
Subtitle() is there just to make it easy to see which frames have the blurred chroma.
Oh, I forgot to mention this screws up the opening shots with all the horizontal lines. You'll have to treat those differently.Last edited by jagabo; 2nd Aug 2022 at 22:28.
-
You must be a magician because this fixes all the issues I've mentioned and also processes faster. And when I upscale it with nnedi3 more detail seems to be retained. I didn't see any issues with the opening shots with the horizontal lines, at least compared to my original script. Any frames specifically?
-
If A/B swap between frames you can see horizontal stripes in the cblur frames are a little blurrier.
Code:v1 = LWLibavVideoSource("old script.mkv", cache=false, prefer_hw=2).ShowFrameNumber(x=10, y=20) v2 = LWLibavVideoSource("new script.mkv", cache=false, prefer_hw=2).ShowFrameNumber(x=10, y=20) Interleave(v1, v2)
-
Ah I see, its hardly apparent though, I had to really stare to see the differences.
One thing I did notice though, and probably the only "issue" I see at this point, is that vinverse() causes a fairly noticeable amount of blurring and detail loss.
As an example, with it on, in frame 1540 the yellowish windowsills become alot blurrier, and at 5310 the decal on the spoiler of the car in the desert. These are just 2 examples but it seems to affect pretty much everything,
These are frames which do not have any residual telescining artifacts (unlike frame 4634 with his figure in the window).
Is there anyway to have vinverse() only activate on frames with visible telescining artifacts, or have it only apply on the new frames generated from merging the original telescined frames with TFM since those are the ones most likely to have the artifacts?
EDIT: Also, for TFM I made slow=1 again, because I noticed with slow=0 some scenes were extremely aliased (frame 5232 for example). I'd rather have a random duplicate frame here and there than a very aliased image.Last edited by nikkmann; 4th Aug 2022 at 18:25.
-
To counteract the blurring by vinverse try adding a little vertical sharp after, Sharpen(0.0, 0.3).
-
That definitely helps with the overall image blurriness caused by vinverse() , but not with the loss of detail that could otherwise be avoided.
So there's no way to have vinverse() selectively apply to telescine-artifacted footage? If not then thats ok, this is still miles better than what I originally had. -
Another think you can try is using a motion mask. In theory, you only have comb artifacts where there is motion. So only blurring moving areas may help. Instead of just vinverse() try:
Code:mmask = mt_motion(thy1=10, thy2=10).mt_expand().Blur(1.0) Overlay(last, vinverse, mask=mmask)
It might work better after decimation.Last edited by jagabo; 4th Aug 2022 at 20:10.
-
You could always use manual overrides or specify frame numbers . You probably have to anyways if you want better results - you'd need to filter frames differently since the noise and quality is quite variable. If you use 1 set of filters and/or 1 setting of VEIA - good frames will be degraded with more detail loss than there should be, or noisy frames will remain too noisy .
-
@jagabo Thats a great step in the right direction. The yellow windowsills on frame 1540 are no longer blurred, but stuff like the spoiler decal on 5310 still are (since the camera is moving).
Tried messing with those thy values but going above 10 makes the telescine artifacts start to appear again, so don't really wanna change that.
In addition to that mask, is there anyway to have it only apply to the new "merged" frames generated by TFM? Feel like thats as good as its possible to get it (if it is possible). -
-
IsCombedTIVTC is a runtime filter. You use with one of the runtime functions like ConditionalFilter():
Code:ConditionalFilter(testclip, yesclip, noclip, "IsCombedTIVTC()")
yesclip is the clip that's used if the testclip is combed
noclip is the clip that's used if the testclip is not combed
It's usage is decribed in the "ShowCombedTIVTC - READ ME.txt" that comes with the TIVTC package. -
Tried messing with it a bit but couldn't figure it out, not sure what I'm supposed to do for the second source since its only 1 video. I'll just use the last bit of code you sent.
-
You create the new clips from the existing clip. Look at the way Conditional filter is used earlier:
Code:Mpeg2Source("VTS_01_1.d2v") l = TFM(d2v="VTS_01_1.d2v", chroma=false, slow=0, pp=0) c = TFM(d2v="VTS_01_1.d2v", chroma=true, slow=0, pp=6) testclip = AbsSubtractUV(l, c) blurclip = MergeChroma(l, l.Santiag(1,1).aWarpSharp2(depth=10)).Subtitle("cblur", x=10, y=30) ConditionalFilter(testclip, blurclip, l, "YPlaneMax", "greaterthan", "50.0", show=false)
Similar Threads
-
Solved: Deinterlacing with QTGMC blends frames together
By PRAGMA in forum Newbie / General discussionsReplies: 6Last Post: 15th Apr 2023, 03:19 -
Blended Frames during QTGMC - 25fps assuming bad authoring to PAL format?
By LaserBones in forum Newbie / General discussionsReplies: 3Last Post: 18th Jul 2020, 06:33 -
QTGMC and stutter
By Barrythecrab in forum Video ConversionReplies: 42Last Post: 19th Sep 2019, 06:42 -
QTGMC Doubling Frames Instead of Interpolating?
By LucasAuraeius in forum Newbie / General discussionsReplies: 15Last Post: 25th May 2019, 14:00 -
Repair Jumping Frames and make a 50p from 50i with QTGMC
By diginoob in forum RestorationReplies: 44Last Post: 13th Aug 2018, 21:53