Log in

View Full Version : Three evils: rainbows, dirt, and low frame rate


Karyudo
4th July 2005, 02:56
I'm working with a vintage (1978) anime series, sourced from crappy HK DVD-9s. I'd like to clean up the video, then re-author some nicer DVD-Rs. Besides some of the contrast, colour, and sharpness issues that I already know how to deal with, there are also three problems I'm not sure how to solve:

1. Because this was a budget series in the 1970's, the real framerate can be quite low. It's film-based material at 24fps, but often two or three of the frames in a row in a given sequence are duplicates -- meaning, I guess, that the animator effectively dropped the rate to 12 or even 8fps. I'd like to keep just one (clean!) copy of each frame, and repeat it as necessary. (This must save bits for elsewhere, right?)

2. Presumably because of the crappy transfer from LD or DVD or whatever, there is a large amount of rainbow-like chroma noise. One particularly egregious example is an 8fps sequence (three identical frames in a row; see above) where some white seagulls on a blue background end up with bluish and reddish and yellowish wings in successive frames. I've tried GuavaComb, but I couldn't make it do much of anything beneficial.

3. Very often, one of a pair of duplicated frames has a big chunk of dirt in it, from the telecine session. Sometimes it's black, sometimes it's white. I'd have thought this would be a really, really easy thing to kill, but quite a bit of reading and tweaking with tools like RemoveDirt, etc., hasn't touched the junk.

I'd appreciate some hand-holding to help solve these problems. I can make samples available upon request, but I'm not sure of the preferred way. I've been working with the DVDs directly, via a D2V file, which I guess I can't just post... If you're willing and able to help, just let me know what you need.

Thanks!

mg262
4th July 2005, 04:57
1. Search for Dup

If you're willing and able to help, just let me know what you need.A section of .VOB...

can't type much atm... more soon (from me or someone else!)

Mug Funky
4th July 2005, 06:38
rainbows aren't from the transfer to DVD... back in the '70s there was no such thing as component YUV or even Y/C. all was composite. it made sense for black-and-white TV, but unfortunately colour TV was pretty poopalicious. of course there may have been even more rainbows introduced from the transfer to DVD through composite...

Karyudo
4th July 2005, 07:27
rainbows aren't from the transfer to DVD...

I don't know at what point things were transferred to video, nor how many format conversions went on in between. I'm actually guessing that this is a boot of the LD collection, which means that you're probably right: the master is likely some videotape from way back, and not some recent transfer.

Still, all of that is but amusing speculation -- regardless of how the damn rainbows got there, it's my job (with your help...?) to get rid of them!

lamer_de
4th July 2005, 10:39
Try Bifrost, Shodan's rainbow removing function that utilises mipsmooth, SSIQ etc pp. There are at least 3 more filter that combat rainbows which names I forgot, so do a forum search. Rainbows have been discussed to death and back, afaik.

For 3, you can also try the filters from Fitzick, De<problem that the filter tackles> (like -spot, -freq etc)

For 1, dup was already mentioned. From my experience, setting the threshold right is pretty difficult and unless there is still noise left, the bitrate savings aren't that huge, even for anime (at least in my experience with recent anime, maybe the old stuff gains something from it).

CU,
lamer_de

mg262
4th July 2005, 11:24
And a few more thoughts:

1. This is from the Dup documentation

chroma (true/false, default true): Set chroma=false to exclude chroma from the frame differencing.

chroma=false may be a very good idea in your case; with luck Dup will reduce the rainbows a bit. You will find it very difficult to stop it from fining a few false duplicates though.It's film-based material at 24fps, but often two or three of the frames in a row in a given sequence are duplicates -- meaning, I guess, that the animator effectively dropped the rate to 12 or even 8fps.All the non-CG animation I have seen at 12 FPS in still scenes; during pans and zooms the camera moves at 24 FPS, but the underlying animation stays at 12. (Except for He-Man, which IiRC is at 8!)

2. When you're comparing filters, you might (or might not) find it useful to look at the chroma on its own. I've done this occasionally by using

source.mergeluma(blankclip(source, color = $808080))

It doesn't look anything like what you'd expect, but with a bit of practice it can be useful.
3. Very often, one of a pair of duplicated frames has a big chunk of dirt in it, from the telecine session. Not sure I follow that, but I know nearly nothing about the physical process...what are you using for IVTC?

I would really like to see a screenshot, if you could manage it. (You probably know this, but decrypted vobs can be opened in VirtualDub and control+1 or shift+1 take a screenshot.) For some time now, I've been trying to figure out why old animation looks old... it's not just a matter of stability, sharpness, colour, etc because all those things -- or at least everything I can think of -- can be fixed and the material still looks old. At least with what I'm working on (80s cartoons, not anime), it's the colour that really stands out as making the material look old but none of the obvious things* make any difference. I think it's a matter of texture, but I'm still working on it.

*or even the less obvious, non-obvious and just plain weird things found in e.g. the VirtualDub plug in Color Mill

Chainmax
4th July 2005, 19:03
For slight rainbow removal, I found SSIQ (http://yatta.mellbin.org/misc/) to be pretty good. If the rainbowing is too strong for SSIQ to handle, I'd suggest (like lamer_de) Shodan's DeRainbow (http://forum.doom9.org/showthread.php?t=64432&highlight=DeRainbow) (the third post from the bottom).

I wouldn't recommend using Dup. A 12 or 8 fps video will not be playable on anything else than in a PC, so you'd need to change it back to 23,976 or whatever else for playback on your DVD player. In my opinion, you should just IVTC (TIVTC (http://forum.doom9.org/showthread.php?p=679294#post679294) works phenomenally for me) and use DGPulldown (http://neuron2.net/dgpulldown/dgpulldown.html) in order to set it to 29.97fps.

mg262
4th July 2005, 20:10
At least with the settings I last used it on, Dup doesn't actually reduce the frame rate, just replaces the near-duplicates with duplicates, increasing compressability and (presumably) reducing noise...

Karyudo
5th July 2005, 02:43
Some notes and sort-of responses to all you guys who have posted help and suggestions:

1. I'm IVTC'ing with Telecide()/Decimate(). I could probably tweak them a bit, but I haven't seen any errors in the small sample I'm looking at.

2. Fizick's filters were next on my list. Unfortunately, a lot of these filters appear to require about as much reading as I did for some undergraduate courses...

3. I have yet to try Dup, but I would be using it to replace near-duplicates with duplicates, not to mess with the frame rate. Ideally, the duplicate frames would all be the same good frame of a given pair/trio. Any way to force that??

4. Is there any way to take advantage of the duplicated frames in order to reduce dirt, noise, etc.? Seems so sad to me that if the middle frame of a three-identical-frame group is flawed, it's still quite tough to remove that flaw.

5. Once I make a small clip of my video (as a VOB, using DVDDecrypter, presumably), where can I stick it? Normally I host single frames on the free webspace my ISP gives me, but that's only 10MB, and I'm hosting quite a lot of frames for use in other forums!

Thanks for your help thus far. I've got lots to test, but unfortunately not piles of free time to do it. So please forgive (in advance) my slow feedback and progress. I hope you'll keep an eye out for upcoming posts in this thread...

Karyudo
5th July 2005, 03:08
OK! Some progress. Looks like I've killed the rainbows, with the help of Sh0dan's trusty DeRainbow function. The top is the raw video; the bottom is the raw video with just DeRainbow (no other processing):

http://www3.telus.net/11811/doom9/Conan_DeRainbow.jpg

By the way, the Danish site with MipSmooth appears to be down. (It is, of course, available as usual from the external archive of AviSynth plugins.)

Looks like my next victim is dirt...

mg262
5th July 2005, 09:55
Thanks for the screenshot!

4. Look at DeSpotMedian -- I think it will remove pixels that jump up and then down again. I think UnDot may do something similar.

5. There is a sticky about this somewhere...

Chainmax
6th July 2005, 00:35
Although the rainbows in the source look pretty nasty, I'd advise you to try SSIQ instead for two reasons: first, it can be applied right after MPEG2Source, making work a bit easier on the IVTC. Second, it's less harsh on the picture (DeRainbow at defaults can dull the brightness or whatever a bit). If SSIQ doesn't work, then use DeRainbow.

As for IVTC, Telecide().Decimate() is ok, but TIVTC has solved me some residual combing issues that only manual overriding or YATTA could solve. The settings I use are these:

TFM(d2v="X:\wherever\source.d2v",mode=3,PP=7,mChroma=true,chroma=true,mi=50)
TDecimate(mode=1)

You might want to set all chroma switches in TFM and TDecimate to false if you don't use SSIQ before IVTCing.

About Dup: I know it does not mess with the framerate, but IMO it does nothing that some good denoising can't do, plus since it does replace near duplicates with exact duplicates I assume you could risk destroying scenes with small movements.

This frame doesn't look particularly noisy, but you could try LRemoveDust (http://forum.doom9.org/showthread.php?p=680793#post680793) followed by BlindPP(quant=0,cpu=0,cpu2="ooooxx"). You might also want to take a look at LimitedSharpen or aWarpSharp.

Karyudo
6th July 2005, 08:02
DeRainbow at defaults can dull the brightness or whatever a bit.

Funny you should mention. Quite quickly after I posted last, I noticed two pretty obvious and unwanted artifacts from DeRainbow. Well, maybe it was just two manifestations of the same thing:

One, when a character (mostly flesh coloured) ran across a field of grass at 24fps, the chroma outlines of his legs stayed put for an extra frame. So there's this really weird patch of orangy grass...

Two, when the animation dropped to 12 fps or 8fps, it took a frame for the chroma to "catch up," such that the first copy of the frame looked washed out (as mentioned) and then improved with the second (and subsequent) copies of the frame.

Long story short, I'll check out SSIQ.

By the way, LimitedSharpen is already on my list of things to use. A first couple of tests showed that it does a very nice job making the original source look like it must be only a second- or third-generation dub of the filtered output!