PAL, old footage, grain and blending. Yay!

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
mikansei
Joined: Mon Mar 21, 2011 2:50 pm
Org Profile

PAL, old footage, grain and blending. Yay!

Post by mikansei » Fri Jun 17, 2011 7:00 am

Hi!

I have this old footage PAL video which I'm trying to restore to something decent :rofl: Some times I think I'd better leave it off rather than trying filtering it, but I've come up with a decent solution -as far as my knowledge about filters goes so please be kind to me - so I've posted it here to have feedback from you experts out there and see if I can enhance it a little bit more.

Code: Select all

MPEG2Source("sample.d2v", cpu=6) 
#Bobber
Yadif(Mode=0)
#restores blended frames
SRestore(frate=29.97)
#frames stabilizer
Stab()
MCTemporalDenoise(settings="low") 
LSFmod()
daa().daa().daa()
Here's a video sample: http://www.megaupload.com/?d=6P287A6F

A sample of after & before:

Before (no filters)
Image

After (with the script above)
Image

My observations:
With the deblender, the blending has improved but there're still some blendings.
With the filtering some defects of the video which where covered by the grain have been enhanced.
The color red in the dresses is weird, not normal red but like bleeding red. I think it's normal in old bad sources. Does it have a solution?

I've used different colors for different problems I see in the video:
Blue - blurry wavy lines
Green - Probably the same as the blue one but only in the silhouette.
White - color bleeding?
Pink - Is that halo? Using mergechroma(awarpsharp2(depth=40)) it has improved but maybe it's better not to add so many filters to the script?

I just realized I forgot the crop & resize but nevermind, will add it later!

Thanks!

User avatar
Cannonaire
Joined: Wed May 05, 2010 5:59 pm
Status: OVERLOAD
Location: Oregon
Org Profile

Re: PAL, old footage, grain and blending. Yay!

Post by Cannonaire » Fri Jun 17, 2011 12:00 pm

Yikes. There's definitely some bad blending going on here, as can be seen with SeparateFields(). I have never worked with interlaced/telecine PAL footage before, so I'm not going to attempt to help with that part until someone else does. I can give a little advice about some other things though.

Noise:
At first glance the footage looks pretty noisy, but it actually seems to be a lot of grain, which isn't a defect. The bad noise I see is mostly due to the blending and the footage not being deinterlaced/IVTC properly yet. On your first line, I would change cpu=6 to cpu=0. It's generally a bad idea to use it anyway since there are better filters for what it does, but I've also seen it cause problems with the deinterlacing/IVTC process.

You point to a spot at the edge of the frame with a lot of noise (blue box); this is pretty normal even for some recent DVDs. It's just junk at the edges and standard procedure is to crop it.

Halos:
The pink box on the right is not haloing and seems to just be the way the artists shaded the face. The pink box on the left makes me think there might be slight haloing, but honestly you will only make the footage look worse if you try to fix it. The haloing is minimal and hardly affects the image in my opinion.

Color Bleeding:
In two of the white boxes, what you've highlighted are the edges of the characters' hair and I don't see any color bleeding in those areas. It could just be my 6-bit panel, but I don't see color bleeding in any of the white boxes. I do see what looks like red color bleeding in one of the green boxes (it's only in the original image), specifically the left one, but this may be due to the aforementioned blending, which should be taken care of before attempting to fix color bleeding.

My thoughts:
I don't have the time right now to make a filterchain I would use, but hopefully this helps you a little. The second screenshot looks overfiltered, especially for an older source. If you're going to use the footage for an AMV, you may wish to remove some or maybe a lot of the grain, but it isn't a visual defect on its own. You are also oversharpening the footage in my opinion, but again you may wish to make it look sharp in order to work well with other footage. This is a judgement call, but on it's own I wouldn't sharpen it.

Finally, the footage on its own doesn't call for AA, but perhaps if bobbing or certain other filters are required, an AA filter (like daa) may become necessary.
Image Think millionaire, but with cannons. || Resident Maaya Sakamoto fan.

mikansei
Joined: Mon Mar 21, 2011 2:50 pm
Org Profile

Re: PAL, old footage, grain and blending. Yay!

Post by mikansei » Tue Jun 21, 2011 5:04 am

I thought grain was a defect and had to be eliminated :rofl: So it's ok for a footage to have grain?
On your first line, I would change cpu=6 to cpu=0. It's generally a bad idea to use it anyway since there are better filters for what it does, but I've also seen it cause problems with the deinterlacing/IVTC process.
In some parts of the video there's blocking. I think there's also mosquito noise but I'm not sure about that one.
Which filter would you recommend me? :)
Color Bleeding:
In two of the white boxes, what you've highlighted are the edges of the characters' hair and I don't see any color bleeding in those areas. It could just be my 6-bit panel, but I don't see color bleeding in any of the white boxes. I do see what looks like red color bleeding in one of the green boxes (it's only in the original image), specifically the left one, but this may be due to the aforementioned blending, which should be taken care of before attempting to fix color bleeding.
Mmm... it's difficult to see what I wanted to make stand out... It may not be bleeding... What I wanted to point out is that the background is not completely black. There are some parts where black is dark-greenish. Also the red color in the original frame is like dusty and darkish. All in all, colors in this source are funky to me. I mean, seeing those colors makes me feel the footage is old and kinda damaged, which in fact is true. You can see what I mean in the original frame which has no boxes or postprocessing. I wondered if there's a filter which corrects colors in that way.
The second screenshot looks overfiltered, especially for an older source. If you're going to use the footage for an AMV, you may wish to remove some or maybe a lot of the grain, but it isn't a visual defect on its own.
So for older sources it's better to leave grain and filter just a little?
You are also oversharpening the footage in my opinion, but again you may wish to make it look sharp in order to work well with other footage. This is a judgement call, but on it's own I wouldn't sharpen it.
It's a video on it's own. I just thought to sharpen it because the silhoutte lines in the original frame looked faded to me due to the master being old. Do you think they look ok and that may be the original style in that anime?
Finally, the footage on its own doesn't call for AA, but perhaps if bobbing or certain other filters are required, an AA filter (like daa) may become necessary.
I did bob the video using yadif(mode=1, order=1).
Most times I need to postprocess the video and then zoom it at 200% to see if it has aliasing because just using AvsPmod seeing static frames I don't see it clearly. It's much clear if I see the movie in full screen mode. Which steps to test if you need using an AA?

Following your tips I have taken out these lines:

Code: Select all

cpu=6 --> i used it for the blocking
MCTemporalDenoise(settings="low") --> so that there's grain
LSFmod() --> so that it's not oversharpened
daa().daa().daa() --> not sure if I need it or not. i tested the video and thought it kind of sharpened the lines.
which has left my script in just the basics: bobber, deblender, crop & resize and wondering which filters, if any, can I use to clean a bit the image. Help meplease~ XD

Code: Select all

MPEG2Source("sample.d2v")
#Bobber
Yadif(Mode=0)
#restores blended frames
SRestore(frate=24)
#frames stabilizer
Stab()
Crop(10, 2, -10, -2)
spline36resize(770, 576)

Mister Hatt
Joined: Tue Dec 25, 2007 8:26 am
Status: better than you
Contact:
Org Profile

Re: PAL, old footage, grain and blending. Yay!

Post by Mister Hatt » Wed Jun 22, 2011 11:24 pm

I wrote some wallpaper on grain and how it is not a defect, when I re-open my blag on the new domain it will be one of the first posts to go up. The best advice for PAL content is put it in the bin and go get a real source. It's too painful to fix and never worth it.

mikansei
Joined: Mon Mar 21, 2011 2:50 pm
Org Profile

Re: PAL, old footage, grain and blending. Yay!

Post by mikansei » Thu Jun 23, 2011 1:40 am

There's no NTSC source available for this series. And due to it being painful to fix is the reason why I'm asking advice from you. Any ideas you could share? Thanks.

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: PAL, old footage, grain and blending. Yay!

Post by mirkosp » Thu Jun 23, 2011 8:52 am

mikansei wrote:There's no NTSC source available for this series.
Man I can feel for you, I know the situation. :cry:
There really isn't much you can do tho... personally I go for QTGMC+SRestore for a chance of getting clean frames. For the filtering itself, it seems like there are dot crawl leftovers along with the noise (that's grain gone wrong, so I'd call it noise, really). There also does seem to be some hint of haloing in places, but I'm not too sure about this one...
Don't really have the time to check the sample, but aside from the already suggested QTGMC+SRestore (to 23.976 I'd say, I doubt it's 29.97, though I haven't checked so...) instead of yadif+srestore, I'd say to try using DePanStabilize (haven't used myself, but I've seen it work wonders) and for the noise perhaps ttempsmooth or if you feel like trying something new and your gpu supports opencl, nlmeanscl with low h. MCTemporalDenoise is cool too, tho. |:> For the dot crawl leftovers, I don't know. It won't get recognized as dot crawl anymore by the appropriate filters with it now looking like that, so you just have to hope normal denoising hits it.
Image

mikansei
Joined: Mon Mar 21, 2011 2:50 pm
Org Profile

Re: PAL, old footage, grain and blending. Yay!

Post by mikansei » Mon Jun 27, 2011 4:20 am

Thank you for the tips, mirkosp!
I hadn't notice the "before dot crawl now noise" thing! I think the video does have haloing but decided to ignore it. Otherwise I would fill the code with filters XD The QTGMC filter does really sound interesting. I've read it gives great quality but that it also takes 1 day or more to process a 20 minutes episode?
I was suggested to use Stab() and it works very well! I haven't tried DePanStabilize or ttempsmooth yet, I'm so happy using MCTemporalDenoise as it's so easy to use and so convinient. It's such a cool filter. I still have to figure out how to configure ttempsmooth but I want to check it out too. Could you recommend me a startard configuration I could start with?

I finally went back to my original script and did some modifications:
Took away LSFmod() and daa().daa().daa(), added HQDering and changed cpu=6 for Deblock=15 and changed MCTemporalDenoise to (settings=medium). The result is good enough and it still has some grain, and it doesn't have such an overfiltered look as the original code. :P
Anyway, it may still be overfiltered but that's the best result I could get due to the video's original so-so quality.

Code: Select all

MPEG2Source("sample.d2v")
#Bobber
Yadif(Mode=1, order=1)
#restores blended frames
SRestore(frate=23.976)
#frames stabilizer
Stab()
Deblock(quant=15)
HQ Dering()
MCTemporalDenoise(settings="medium")

Locked

Return to “AviSynth Help”