Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th June 2016, 01:47   #1  |  Link
bilditup1
Registered User
 
bilditup1's Avatar
 
Join Date: Feb 2004
Location: NYC
Posts: 124
Chroma ghosting on deinterlaced animation

Difficult to see at native resolution/size, but when made full screen or viewed frame by frame, I'm experiencing some chroma ghosting when processing a particular interlaced NTSC animation source. This persists across a few different deinterlacers; per this post, after trying QTGMC (at both 'slow' and 'slower'), I used other deinterlacers - TDeint, EEDI2+TDeint, Yadifmod2 - but they all exhibit the same problem, besides being not nearly as smooth as QTGMC is.

Here's are few clips containing the first two minutes of the episode using each method (all at 'double rate' - tried with single-rate as well but results didn't look encouraging enough to try an encode) without audio.

QTGMC (Preset="Slow",SourceMatch=3,EdiThreads=4,ShowSettings=False)
TDeint (mode=1)
TDeint (mode=1,edeint=eedi2ed)
yadifmod2 (order=1,mode=1)

Here is the original source for the above clips (only the last minute's worth, but that should be enough).

So, I'm not sure if I'm using the latter filters wrong, or if there is some kind of anti-ghosting solution available. There are some listed at the wiki but Ghostbuster doesn't process chroma and LGhost seems completely opaque.

I'm not sure to proceed or if anybody has 'solved' this issue, since there doesn't seem to be much information about it.

Last edited by bilditup1; 9th June 2016 at 20:55. Reason: fixed tag
bilditup1 is offline   Reply With Quote
Old 9th June 2016, 11:43   #2  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
None of those are untouched from the source, right? You should include a sample that hasn't been reencoded.
manono is offline   Reply With Quote
Old 9th June 2016, 17:41   #3  |  Link
bilditup1
Registered User
 
bilditup1's Avatar
 
Join Date: Feb 2004
Location: NYC
Posts: 124
Quote:
Originally Posted by manono View Post
None of those are untouched from the source, right? You should include a sample that hasn't been reencoded.
Do you mean, uncompressed but processed by AviSynth? Or just the original source file plus scripts? Or either? Or neither?
bilditup1 is offline   Reply With Quote
Old 9th June 2016, 17:47   #4  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
original source files,
cut with eg DGIndex, mark using '[' and ']', then 'Save Project' and supply result m2v.

Choose section with some motion (about 20-30 secs should be enough).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 9th June 2016 at 17:50.
StainlessS is offline   Reply With Quote
Old 9th June 2016, 20:19   #5  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by StainlessS View Post
original source files,
cut with eg DGIndex, mark using '[' and ']', then 'Save Project' and supply result m2v.
I think you mean to say 'Save Project and Demux Video'. But, yes, a piece from the DVD, if that's what's being used as a source.
manono is offline   Reply With Quote
Old 9th June 2016, 20:33   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Yep, guess I shoulda checked name in DGIndex, good job we got you to keep me on the right path
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 9th June 2016, 20:54   #7  |  Link
bilditup1
Registered User
 
bilditup1's Avatar
 
Join Date: Feb 2004
Location: NYC
Posts: 124
OK, here it is (actually it's the last minute of the above encoded videos, since I think the first minute won't tell us too much, being mostly black and white and all.)
I will also add it to the OP.

I can also reencode this or recut the original files I put up, if you propose to try to do a frame-by-frame comparison or something.

Last edited by bilditup1; 9th June 2016 at 22:11.
bilditup1 is offline   Reply With Quote
Old 9th June 2016, 23:09   #8  |  Link
bilditup1
Registered User
 
bilditup1's Avatar
 
Join Date: Feb 2004
Location: NYC
Posts: 124
Actually...did I misidentify this part of the video as interlaced? Damn it.
bilditup1 is offline   Reply With Quote
Old 9th June 2016, 23:12   #9  |  Link
bilditup1
Registered User
 
bilditup1's Avatar
 
Join Date: Feb 2004
Location: NYC
Posts: 124
This is happening throughout though, not just with the titles. Oh dear...
bilditup1 is offline   Reply With Quote
Old 9th June 2016, 23:45   #10  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
My thoughts:

It shouldn't be encoded at 59.94fps as that just accentuates the chroma blending and is the wrong framerate anyway. It's been telecined (the sample was) and the correct framerate is 23.976fps. You'll never be able to remove that chroma mess automatically as there's just too much of it. Since most of it seems to occur with duplicate frames, manual work after the IVTC will get rid of most of it. About all I was able to do was:

TFM(Clip2=Nnedi3,chroma=true)###or set up SRestore as the deinterlacer
Tdecimate()


Others might have better ideas about what to do. Also, it was made by idiots. Not only is the chroma blending a serious issue, but it was encoded as progressive (the sample, anyway) which means most of the DVD players around won't even deinterlace it so you'll see all the interlacing.

Last edited by manono; 10th June 2016 at 01:09.
manono is offline   Reply With Quote
Old 10th June 2016, 00:01   #11  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
I was trying with upconv=1,icc=true in mpeg2source and telecide()
but still there is some chroma blending coz a chroma plane, I think U, isn't linked to the luma and sometimes anticipate or posticipate of one field.
__________________
powered by Google Translator
Motenai Yoda is offline   Reply With Quote
Old 10th June 2016, 00:53   #12  |  Link
bilditup1
Registered User
 
bilditup1's Avatar
 
Join Date: Feb 2004
Location: NYC
Posts: 124
Quote:
Originally Posted by manono View Post
My thoughts:

It shouldn't be encoded at 59.94fps as that just accentuates the chroma blending and is the wrong framerate anyway. It's been telecined (the sample was) and the correct framerate is 23.976fps.
OK, the MeGUI analyser had 'hybrid film/interlaced; mostly interlaced'. I thought I saw a pattern there before but deferred...which looks like the exact wrong move. I was double-checking it as well as the rest of this just now, and saw the pattern again but it appears to be 4, then 1, not 3, then 2 (?) Plus a lot of frames that look like straight duplicates. Basically I'm totally confused...which probably means I fundamentally misunderstood something.
Quote:
Originally Posted by manono View Post
You'll never be able to remove that chroma mess automatically as there's just too much of it. Since most of it seems to occur with duplicate frames, manual work after the IVTC will get rid of most of it. About all I was able to do was:

TFM(Clip2=Nnedi3,chroma=true)###or set up SRestore as the deinterlacer
Tdecimate()


Others might have better ideas about what to do.
Can you comment on how to set up NNEDI3() properly as part of an IVTC operation? I've never actually used it for this purpose or even called it directly (as opposed to via a complex script like QTGMC).

I was experimenting with TFM's internal deinterlace modes before, but this resulted in combing in addition to color ghosting. Specifying chroma=true helped but - because of course it did - it left behind, as you said, an awful chroma mess. Specifying a very low cthresh of 2 or 3 + chroma = false almost completely got rid of the combing and chroma mess some of the time (not perfect but still harder to see), but not nearly often enough.

Quote:
Also, it was made by idiots. Not only is the chroma blending a serious issue, but it was encoded as progressive (the sample, anyway) which means most of the DVD players around won't even deinterlace it so you'll see all the interlacing.
Freaking brilliant. There's always something, isn't there? Le sigh. I often wonder why it isn't the people here running the show at the authoring firms.

Anyway. Thanks for chiming in! I look forward to taming this beast.
bilditup1 is offline   Reply With Quote
Old 10th June 2016, 00:56   #13  |  Link
bilditup1
Registered User
 
bilditup1's Avatar
 
Join Date: Feb 2004
Location: NYC
Posts: 124
Quote:
Originally Posted by Motenai Yoda View Post
I was trying with upconv=1,icc=true in mpeg2source and telecide()
but still there is some chroma blending coz a chroma plane, I think U, isn't linked to the luma and sometimes anticipate or posticipate of one field.
*goes to wiki*
Interesting...I'm going to try that and see what it looks like.
bilditup1 is offline   Reply With Quote
Old 10th June 2016, 01:08   #14  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by bilditup1 View Post
Can you comment on how to set up NNEDI3()
I don't understand. Except for having to get NNEDI3 if you don't already have it, that's the exact script to use.

It can't be done properly without some serious manual work of replacing the remaining chroma-blended frames with 'clean' versions. Just bob it and have a look - you can go 3 and sometimes 4 frames of blending in a row. There's no way a field-matcher can handle that. Even bob/srestore can't. And it did a poorer job than did field-matching.

But, as I said, maybe others can see things to do that I don't know. I don't work with cartoons much.
manono is offline   Reply With Quote
Old 10th June 2016, 01:38   #15  |  Link
bilditup1
Registered User
 
bilditup1's Avatar
 
Join Date: Feb 2004
Location: NYC
Posts: 124
Quote:
Originally Posted by manono View Post
I don't understand. Except for having to get NNEDI3 if you don't already have it, that's the exact script to use.
I misunderstood, I thought that that nnedi3 had to be called separately somewhere else, and that you just assigned the result of that operation to a new variable also called nnedi3, and then passed that in to the Clip2 parameter. But I see now that just putting TFM(Clip2=Nnedi3,chroma=true) is sufficient.

Quote:
It can't be done properly without some serious manual work of replacing the remaining chroma-blended frames with 'clean' versions.
What is the best way to do such frame substitutions with AviSynth? Lots of trims?

Quote:
Just bob it and have a look - you can go 3 and sometimes 4 frames of blending in a row.
I just did that
Code:
AssumeTFF()
Bob()
and definitely see those 4 blended frames in a row. Damn. But practically speaking what does this tell me, other than 'bobbing doesn't fix it'? I'll still have to manually replace the bad frames, right?
Quote:
But, as I said, maybe others can see things to do that I don't know. I don't work with cartoons much.
OK, so I guess I'll hope that happens, too. Thanks again for all your comments/starting to put me on the right track.

Last edited by bilditup1; 10th June 2016 at 01:41.
bilditup1 is offline   Reply With Quote
Old 10th June 2016, 02:15   #16  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 744
Read this:

Here

It's about Chroma Bleeding.

EDIT: read the post #13.
__________________
By law and justice!

GMJCZP's Arsenal

Last edited by GMJCZP; 10th June 2016 at 02:28.
GMJCZP is offline   Reply With Quote
Old 10th June 2016, 03:50   #17  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by bilditup1 View Post
But practically speaking what does this tell me, other than 'bobbing doesn't fix it'?
It tells you neither field matching nor unblending will work to get rid of it all. Which is why I mentioned having to do a lot of manual work. Maybe GMJCZP's link will help.
Quote:
What is the best way to do such frame substitutions with AviSynth? Lots of trims?
FreezeFrame, maybe. But it's probably not worth it to do a freezeframe every 4 frames or so. jagabo over at videohelp.com has a function he made that streamlines all the typing you have to do for freezeframe, but it'll still be a lot of boring work.
manono is offline   Reply With Quote
Old 10th June 2016, 04:00   #18  |  Link
bilditup1
Registered User
 
bilditup1's Avatar
 
Join Date: Feb 2004
Location: NYC
Posts: 124
Boom.

Quote:
Originally Posted by GMJCZP View Post
EDIT: read the post #13.
Yup, I was about to say, that post leads to this:

http://forum.doom9.org/showthread.ph...50#post1582950

And that script by sp00kyfox is made for *exactly* this problem, for animation DVDs from *exactly* the same period, by the *exact* same studio even. Brilliant! Let's try it!

Combing appears to be gone, ghosting appears to be gone. Everything looks...slightly less sharp maybe? And kinda jerky? But I could be imagining that. There is definitely...some 'rainbowing'. I don't know the proper term. And there's some weird...not gridding, I don't know how to describe it. But it was in the source, and it's for another thread, I think.

Anyway, comparison clips, again (no sharpening, cropping, degraining or anything like that)

TFM(clip2=nnedi3,mode=2,chroma=true).TDecimate(mode=1)
Sp00kyfox's script

Note: script only appears to work with the old versions of Srestore and Average, at least for me just now.

From the code comments, it appears that what it does is use tfm to process luma and vinverse+srestore to process chroma, then compares the two, builds a mask with masktools, and combines them on the basis of this mask.

I wish I understood exactly how masktools works and what this script is really doing though, because it's pretty amazing.

Anyway. Thanks for pointing this out GMJCZP. Wow. This thing should be stickied on the AVS wiki. And perhaps people smarter than I can even help improve it?
bilditup1 is offline   Reply With Quote
Old 10th June 2016, 04:07   #19  |  Link
bilditup1
Registered User
 
bilditup1's Avatar
 
Join Date: Feb 2004
Location: NYC
Posts: 124
Quote:
Originally Posted by manono View Post
It tells you neither field matching nor unblending will work to get rid of it all. Which is why I mentioned having to do a lot of manual work. Maybe GMJCZP's link will help.

FreezeFrame, maybe. But it's probably not worth it to do a freezeframe every 4 frames or so. jagabo over at videohelp.com has a function he made that streamlines all the typing you have to do for freezeframe, but it'll still be a lot of boring work.
I will keep this in mind since the solution I just posted about isn't 100% 'perfect'.
bilditup1 is offline   Reply With Quote
Old 10th June 2016, 04:35   #20  |  Link
bilditup1
Registered User
 
bilditup1's Avatar
 
Join Date: Feb 2004
Location: NYC
Posts: 124
It seems like I jumped the gun a bit. There is some combing still...but it's much harder to catch than before. Anybody want to take a look?

Last edited by bilditup1; 10th June 2016 at 08:22.
bilditup1 is offline   Reply With Quote
Reply

Tags
animation, deinterlacing, ghosting, ntsc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.