Log in

View Full Version : Ghosting on anime/toon raw capture


Nealhon
1st October 2007, 22:10
Hello everyone. I have Dish Network and here lately when I capture things (huffyuv, 29.970 FPS), I have a type of "ghost" effect. It looks sorta of like interlacing, but not quite. For instance, when there is motion, it's almost like the image is trying to to advance too early. Here is a screen shot of it:

http://i227.photobucket.com/albums/dd10/Nealhon/1GhostingNEW.jpg

Here is the "normal" interlacing:

http://i227.photobucket.com/albums/dd10/Nealhon/2Interlacing.jpg

Another example of the ghosting thing:

http://i227.photobucket.com/albums/dd10/Nealhon/2Ghosting.jpg

And finally, another picture of the "normal" interlacing:

http://i227.photobucket.com/albums/dd10/Nealhon/3Interlacing.jpg


I just posted the comparison pics so you can see the difference in this weird ghost effect and normal interlacing.

When I convert this to 23.976 FPS the interlacing is gone, but these ghost frames (there are a ton of them throughout the video) remain. They are pretty noticeable, and it is annoying. Does anyone know what's going on and what I can do to fix this--or is this just a problem with my receiver and/or Dish Network?

Nealhon
2nd October 2007, 00:17
Could this perhaps be bad satellite reception? I haven't looked into that for a while...

setarip_old
2nd October 2007, 00:45
Hi!

I'm sorry if I'm misunderstanding you, but the first and third images look just fine to my weary old eyes, with no observable "ghosting"...

Dark Shikari
2nd October 2007, 00:59
Hi!

I'm sorry if I'm misunderstanding you, but the first and third images look just fine to my weary old eyes, with no observable "ghosting"...
I think he's referring to the ugly lines near the mouths.

Nealhon
2nd October 2007, 01:01
Yes, the lines near the mouth. I dunno if it's really called ghosting, but I couldn't think of a better word.

Dark Shikari
2nd October 2007, 01:12
Wait, are the "normal" frames you posted deinterlaced intentionally? Or are some frames "interlaced" and some not?

Nealhon
2nd October 2007, 03:01
They are not deinterlaced. That is straight from the raw huffyuv capture with no modifications.

squid_80
2nd October 2007, 04:17
Looks like blended fields to me.

Nealhon
2nd October 2007, 04:26
Well is there a way to stop it? I've tried using numerous avisynth filters, but cannot get anything to remove these in my encoded files. Is there something I can do while capturing it, or is this an after capping problem?

EDIT: Here is a more extreme sample:

http://i227.photobucket.com/albums/dd10/Nealhon/MoreExtreme.jpg

Here is the very next frame:

http://i227.photobucket.com/albums/dd10/Nealhon/VeryNextFrame.jpg

Any more ideas?

Nealhon
3rd October 2007, 19:48
So does anyone have any suggestions of trying to fix this? Need more info, sample clip, or anything?

LoRd_MuldeR
4th October 2007, 15:02
Sorry, I cannot see the problem.
All I see are "normal" interlacing artifacts. I don't see any ghosting or other indications of filed blended stuff yet.

Did you try to use a simple deinterlacer (e.g. Yadif or TDeint) as very first filter?

Nealhon
4th October 2007, 15:28
I have tried a number of filters. TDeint being one of them. Everything I've thrown at it won't get rid of these without making the picture look jaggedy or just really ugly. The same filters work great on DVD sources though, so I don't think this is normal interlacing. I've tried capturing 10+ samples of cartoons on different channels and they all have this same problem.

LoRd_MuldeR
4th October 2007, 16:07
I have tried a number of filters. TDeint being one of them. Everything I've thrown at it won't get rid of these without making the picture look jaggedy or just really ugly. The same filters work great on DVD sources though, so I don't think this is normal interlacing. I've tried capturing 10+ samples of cartoons on different channels and they all have this same problem.

Well, deinterlacing always results in a loss of quality. That's because a deinterlacing filter can only interpolate the missing data, but it cannot magically spawn data which isn't there. So you should give TDeint a closer look, which is definitely one of the best out there. Refer the documents and try to adjust the different settings! At first "field order" must be set correct! Then you should use "Modified ELA" interpolation instead of "Kernel Interpolation" for anime/cartoon stuff. Also try to lower the "Artifact Protection Threshold", if there are artifacts left. Start with, let's say 32, and lower it with steps of 4 until all artifacts are gone.

If you cannot get satisfactory results with TDeint, which is very unlikely, you should definitely give YADIF a chance instead of TDeint! YADIF gives very nice results too and is even faster then TDeint. And again take care of the correct field order!

BTW: Uploading a short sample (unprocessed original capture) could help ;)

Nealhon
4th October 2007, 18:29
Thanks for the tips. However, I've tried your suggestions about TDeint and I still cannot seem to get rid of these. Here is yet another example in 3 parts that might show this better as not normal interlacing:

#1 (good frame):

http://i227.photobucket.com/albums/dd10/Nealhon/1GoodFrame.jpg

#2 very next frame:

http://i227.photobucket.com/albums/dd10/Nealhon/2VeryNextFrame.jpg

#3 next frame after that:

http://i227.photobucket.com/albums/dd10/Nealhon/3NextFrame.jpg


I will look at YADIF after I mess with TDeint some more.

Also, I will be glad to upload a clip somewhere, but I am not familiar with a good site to use to upload large files. Can you make a suggestion?

Didée
4th October 2007, 18:55
By all means, provide a sample, please. In any case it's a temporal artefact, and those a difficult to judge by static screenshots.

100 people will sugest 100 different filehosters. Currently I like MaxUpload (http://maxupload.com/), mood changes.

Could be full fieldblending, could be chroma-only fieldblending | and/or asynchronous chroma, crosstalk could be involved, could be too aggressive temporal filtering happened in the past, could be interlaced yv12 having been interpreted progressively at some time, could be ... plenty of things.

Nealhon
4th October 2007, 19:11
Alright, here is a 1 second / 30 frame sample (7 MB, raw Huffyuv .avi capture file). The sample has multiple instances of my problem, so I figured it was long enough.

http://maxupload.com/26EA9900

Note, the problem occurs on:

Frames 9, 11, 14, 16, 19, etc.

LoRd_MuldeR
5th October 2007, 15:14
Separating the fields shows that there is already ghosting/blending in the source!

http://img258.imageshack.us/img258/7467/fileghostingna0.th.png (http://img258.imageshack.us/my.php?image=fileghostingna0.png) http://img258.imageshack.us/img258/6127/fileghosting2jx0.th.png (http://img258.imageshack.us/my.php?image=fileghosting2jx0.png)

Deinterlacing will be necessary, but it won't remove the blending that is already in the source.
There are some Avisynth filters/scripts to clean Field Blended stuff, maybe that might help...

Didée
5th October 2007, 17:21
It's not field blending, since top & bottom fields are affected equally. Could well be that the broadcaster accidentially is mangling the footage while airing...

A quick go:

AviSource("H:\Artifact and or ghosting 1 second sample.avi").assumeTFF()

b = bob(0,0.5).converttoyv12()
p2 = b.selectevery(1,-2)
n2 = b.selectevery(1,2)
p2D = mt_lutxy(b,p2,"x y - abs")
n2D = mt_lutxy(b,n2,"x y - abs")
p2DL = mt_lutF(p2D,p2D,mode="average",yexpr="x")
n2DL = mt_lutF(n2D,n2D,mode="average",yexpr="x")
usen2 = mt_lutxy(n2DL,p2DL,"x y < 255 0 ?")

mt_merge(b,n2,usen2,luma=true,Y=3,U=3,V=3)
reduceflicker(strength=2)

In human language:

Bob the input. Then: For each frame, replace cf (current frame) with cf+2 IF cf+2 is more similar to cf than cf-2 is to cf.

Note this works ONLY if the content's true framerate is 12fps or less, packed into 30i. If any 24fps sequences appear, it will fail miserably. :)

There are also the pugins Dup.dll and DeDup.dll, which could be used eventually, can't tell.
Never had the need to use those, and worse, they use hard thresholds to decide what is a dup and what not. Usually, using hard thresholds will fail either here or there or elsewhere. The decisive criterion should also take into account how much variance there is in the neighborhood.