Hello guys, I have been trying everything on both this forum and others on all threads that I found related to this problem, but without success.
Here is my problem:
[Attachment 45692 - Click to enlarge]
Here is how the Chroma and Luma channel appear:
Frame 0 (Ghosting has yet to occur)
[Attachment 45693 - Click to enlarge]
Frame 1 (Ghosting first appears)
[Attachment 45694 - Click to enlarge]
Frame 2 (Ghosting still present, appears to be an exact duplicate of Frame 1)
[Attachment 45695 - Click to enlarge]
Frame 3 (Ghosting is gone)
[Attachment 45696 - Click to enlarge]
This is the pattern in which the ghosting appears through the video.
Please guys this has been driving me nuts.
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 16 of 16
Thread
-
-
Common problem caused by treating interlaced YV12 chroma as progressive. Could be in your source or the way you're handling it. What's your source? What are you doing with it? Upload a sample of your source, not re-encoded.
Last edited by jagabo; 22nd May 2018 at 08:33.
-
Yes, the problem is definitely in your source, and from the bad interlaced YV12 treatment I described earlier.
I was going to say there was no way to fix it. But I recently successfully removed blends from a video where every 4th frame was a 50:50 blend of that frame and the next. Essentially: blended = (frame[N] + frame[N+1]) / 2. Since that's a simple algebraic equation it should be possible to reverse it. If:
Code:blended = (frame[N] + frame[N+1]) / 2
Code:blended * 2 = frame[N] + frame[N+1] blended * 2 - frame[N+1] = Frame[N]
On the left is the original frame, on the right the unblended frame. Unfortunately, applying that same manipulation to frames without blending messes them up:
So some way needs to be developed to figure out which frames have blending and only replace those frames.
I did this with an AviSynth script (I don't think you'll find any way to do this without AviSynth):
Code:# get the source video LWLibavVideoSource("Johnny Bravo - In Your Dreams - Cartoon Network - YouTube.MKV") # unblend all frames unblended = Overlay(last, last.Trim(1, 0).ColorYUV(gain_y=-128, cont_u=-128, cont_v=-128), mode="subtract").ColorYUV(gain_y=256, cont_u=256, cont_v=256) # merge the original luma with the unblended chroma MergeChroma(last, unblended)
-
Holy smokes, jagabo that is some amazing feat you already pulled off there, I really thought it was kind of a lost cause
I am decently familiar with Avisynth so that should not be a problem. Thank You so amuch for what you've done so far Looking forward for an update, but you've done so much already, I'll patiently wait as much as I have to! -
This is better known as "chroma trails".
It's always caused by poor processing, usually homemade stuff.Want my help? Ask here! (not via PM!)
FAQs: Best Blank Discs • Best TBCs • Best VCRs for capture • Restore VHS -
That`s funny Amazon UK offers these episodes as well, and they seem to have the same source as the YouTube channels because they have the same issue. Obviously someone at Cartoon Network didn't know very well what they were doing. I also own the dvds and they don't have this issue, My theory is that they screwed up the deinterlacing. (I want to use the YT/Amazon clips because I confronted them with the DVDs, and they actually have more details and better quality).
-
If you own DVDs without this problem why are you working with youtube downloads? The youtube video is obviously upscaled from SD. You can probably do a better job of upscaling from the DVDs and avoid this blended chroma problem.
That said... I've come up with this for detecting whether the source or the "unblended" frame is the right one to keep:
Code:function ChromaOnlyEdges(clip v) { v.BilinearResize((v.width/16)*4, (v.height/16)*4).TNLMeans(ax=2, ay=2, h=3.0) # use small mod4 image, with string 2d noise reduction luma = GreyScale().mt_edge(chroma="-128").mt_expand(chroma="-128").mt_expand(chroma="-128") # luma edges, expand CU = Tweak(sat=2.0).UtoY().mt_edge(chroma="-128").PointResize(luma.width, luma.height) # U edges CV = Tweak(sat=2.0).VtoY().mt_edge(chroma="-128").PointResize(luma.width, luma.height) # V edges Overlay(CU, CV, mode="add") # add U and V edges Overlay(last, luma, mode="subtract") # remove UV edges near Y edges } LWLibavVideoSource("C:\Users\John\Downloads\Johnny Bravo - In Your Dreams - Cartoon Network - YouTube.MKV") Trim(3843,3925) Crop(240,0,-240,-0) #BilinearResize(width/2, height/2) src=last # remember the source so we can view it later # created unblended frames assuming 50:50 blending. This messes up frames without any blending unblended = Overlay(last, last.Trim(1,0).ColorYUV(gain_y=-128,cont_u=-128,cont_v=-128), mode="subtract").ColorYUV(gain_y=256,cont_u=256,cont_v=256) unblended = MergeChroma(last, unblended) # keep the original luma # enable the following line if you want to see the chroma edges #return(StackHorizontal(ChromaOnlyEdges(src), ChromaOnlyEdges(unblended))) testclip = Subtract(ChromaOnlyEdges(src), ChromaOnlyEdges(unblended)) ConditionalFilter(testclip, src, unblended, "AverageLuma", "LessThan", "126.0") #view source, unblended, final clips StackHorizontal(src, unblended, last) BilinearResize(width/3, height/3) # smaller so we can see it all.
This only works the parts of the cartoon where frames have 50:50 blends of the chroma. There are other parts of the video where there is blending to a lesser degree -- this doesn't fix those. The code will occasionally pick the wrong frame (especially if there is very little motion) so I would use it only on parts of the video that have this problem. For example frames 3843 to 3925. That's the section I used to test the algorithms. And even when it works, it's not always "perfect".Last edited by jagabo; 23rd May 2018 at 18:14.
-
Thank you so much!! I`ll try out the code as soon as I get home tomorrow. I want to use these sources instead of the dvds because even though they clearly are not raw 1080p somehow they do have more details and all the artifacts from the dvds are gone. My guess is that they used the 576i raw files and upscaled them to 1080p, but in order to do that they had to deinterlace and they obviously screwed that one up.
-
I changed the code to make it easier to use:
Code:function ChromaOnlyEdges(clip v) { v.BilinearResize((v.width/16)*4, (v.height/16)*4).TNLMeans(ax=2, ay=2, h=3.0) # use small mod4 image, with string 2d noise reduction luma = GreyScale().mt_edge(chroma="-128").mt_expand(chroma="-128").mt_expand(chroma="-128") # luma edges, expand CU = Tweak(sat=2.0).UtoY().mt_edge(chroma="-128").PointResize(luma.width, luma.height) # U edges CV = Tweak(sat=2.0).VtoY().mt_edge(chroma="-128").PointResize(luma.width, luma.height) # V edges Overlay(CU, CV, mode="add") # add U and V edges Overlay(last, luma, mode="subtract") # remove UV edges near Y edges } function DeBlendChroma(clip v) { unblended = Overlay(v, v.Trim(1,0).ColorYUV(gain_y=-128,cont_u=-128,cont_v=-128), mode="subtract").ColorYUV(gain_y=256,cont_u=256,cont_v=256) unblended = MergeChroma(v, unblended) # keep original luma testclip = Subtract(ChromaOnlyEdges(v), ChromaOnlyEdges(unblended)) ConditionalFilter(testclip, v, unblended, "AverageLuma", "LessThan", "126.0") } LWLibavVideoSource("Johnny Bravo - In Your Dreams - Cartoon Network - YouTube.MKV") Trim(3843,3925) # part of video with 50:50 blended chroma Crop(240,0,-240,-0) # remove black borders DeBlendChroma()
Note that the trimmed section that's used here frame number 18 remains blended. This is because frame 19 is also blended -- so subtracting 19 from 18 gets you worse artifacts than in the original. You can deblend frame 18 by calling DeBlendChroma() a second time. In the first pass frame 19 is deblended, in the second frame 18 is deblended using the deblended frame 19. -
-
Here is the kind of difference and artifacts I am talking about between the DVDs and Amazon/YT.
I also thought about "muxing somehow the chroma/luma of the DVDs with the "HD" clips, but I wouldn't know where to start. There is also the problem that the sources have different framerates and the DVDs are interlaced -
-
-
Hello,
This was discussed in a new thread under video conversion
I just wanted to check that this problem is still untreatable particularly from a captured NTSC analog source.
If you see around second 8 the trails. -
Similar Threads
-
I need help to decrease this ghosting
By TeNSoR in forum Newbie / General discussionsReplies: 4Last Post: 7th Dec 2016, 09:25 -
How to remove ghosting ?
By marconii2002 in forum Newbie / General discussionsReplies: 3Last Post: 8th Jun 2016, 09:34 -
Awful ghosting
By Friggigatto in forum RestorationReplies: 3Last Post: 26th Mar 2014, 07:14 -
UncropMKV causes ghosting
By endless45 in forum Video ConversionReplies: 3Last Post: 21st Mar 2014, 23:15 -
how can i switching the highest color with draft color in premiere cs5 ?
By m6gpower in forum EditingReplies: 0Last Post: 3rd Mar 2014, 03:32