Log in

View Full Version : Which filter(s) I should apply for bad VCR?


tormento
28th January 2010, 07:52
I have some miniDVD from my old Sony cam. I am currently encoding them for long term storage, using DGToolsNV (Neuron for president) to hw deinterlace and I am currently stuck with my poor experience with filtering.

I am showing you two frames. I can see rainbow, chroma noise and something else I can't name. They aren't deinterlaced yet and they won't be resized since I am retaining the best quality possible (i.e. SAR 64:45 during x264 encoding).

Can you please address me to the filter I should use and the order to apply them?

Thanks.

http://img19.imageshack.us/img19/1750/scottish.png

http://img19.imageshack.us/img19/6081/saariselka.png

thetoof
28th January 2010, 08:18
fft3dfilter on plane=3 (chroma), interlaced=true, ajust all 4 sigmas to match the noise pattern
tcomb if there's still rainbowing to kill
tgmc(tr2=3) test all edimodes
maybe mergechroma(awarpsharp2(tweak)) if chroma issues remain near the edges even after above processing
if aliasing remain (stairstepping/messed up edges), try some anti-aliasing approaches such as maa() (destructive), daa() (nice, but if aliasing is "wide-spread", it'll most likely fail) or ediaa() (in-between compromise) or even sharpaamcmod(tweak) (having animeivtc v2 in your plugins folder will make the functions available to you).
lsfmod to sharpen things a bit
smoothlevels to convert the levels to pc range (check with coloryuv(analyze=true) to see what is the actual max/min luma value of your clip to properly tweak smoothlevels)
grainfactory3 if you like grain to create a filmish look + illusion of detail, ideally on a supersampled clip (see Europeeanman's recent help thread about denoising and deblocking if you don't know how to do it)


I will not help you tweak all these filters; you'll need someone else, or even better a lot of trial-and-error fun ;)

If I have forgotten something... well sorry, hope someone jumps in to correct me and help you further :)

2Bdecided
28th January 2010, 12:26
If you're doing the job "properly" you need to fix the terrible white balance.

It's almost impossible to do that automaticcally (AFAIK), and pretty tricky to get right manually too.

thetoof gave an almost definitive reply - though not sure about the use of pclevels on the way into x264?!

Be careful of overdoing denoise and sharpen - soon (if not now) you'll be upscaling to HD for playback, and any processing mistakes (or bad decisions) are going to really stick out then.

Cheers,
David.

tormento
28th January 2010, 13:45
The outside light was the real one in Finland during december, so it is stupid to correct the white of something that wasn't white ;)

The inside light... Well... =P

LaTo
28th January 2010, 15:12
Can you please address me to the filter I should use and the order to apply them?


A sample would help :D

thetoof
28th January 2010, 19:34
though not sure about the use of pclevels on the way into x264?!Oh... then many of my encodes are wrong then; can you explain why it's so bad?

Asmodian
28th January 2010, 19:48
I think most people do the conversion at playback but I don't know of any reason not to do it before (unless targeting a display that works in TV levels of course).

thetoof
28th January 2010, 19:54
I think most people do the conversion at playbackYes, but most of the sources I've encountered had some sort of mastering problem, i.e. pure black was at 16 for credits and other non-shot sequences, but the actual footage had a fluctuating min/max. Using a standard tv-pc conversion (which I guess is what is done during playback) lead to crushed blacks and blown-out whites, so in the end I used smoothlevels(10,1.05,250). That's why I recommended the use of coloryuv to determine the min/max of the source.

Of course, I may be wrong.

10L23r
28th January 2010, 22:49
I think you should resize because the pixel aspect ratio does not seem to be 1:1.

tormento
29th January 2010, 02:09
I think you should resize because the pixel aspect ratio does not seem to be 1:1.

That is the only thing that was obvious in my mind ;)

thetoof
29th January 2010, 03:44
Unless you plan on upsizing to HD with nnedi2, your original approach was better (specifing SAR before encode). You could also specify DAR in mkvmerge.

tormento
29th January 2010, 08:11
fft3dfilter on plane=3 (chroma), interlaced=true, ajust all 4 sigmas to match the noise pattern
This point *upsets* me a bit ;)

How should I find the noise pattern and, above all, what on hell does match the sigmas mean? =P

thetoof
29th January 2010, 09:03
using a denoiser with different strengths depending on the frequency. sigma = highest and sigma4=lowest. Oversimplified explanation - high = small detail, low = big areas.In the same thread you will find how to add grain on a supersampled clip.

2Bdecided
29th January 2010, 11:38
I think most people do the conversion at playback but I don't know of any reason not to do it before (unless targeting a display that works in TV levels of course).The YV12 you feed to your encoder is assumed to be 16-235. On playback it will be expanded to 0-255 unless you tell your player not to - and in the case of a stand-alone, there will be no way to tell it not it.

So YV12 with 0-255 is going to get clipped on playback most of the time.


If there are problems with the source (e.g. camcorder footage is often 16-255!), bring it into the range 16-235.

IMO it's OK to have some superwhites (above 235) and superblacks (below 16) as long as you accept that they'll usually get clipped on a PC. They will be displayed OK by many TVs. Things that typically are allowed outside that range are, for example, the ringing/halos from sharpening and resizing, the DCT noise from encoding etc. Use AVIsynth's Histogram to figure out if/where any "out of range" levels are, and decide if they're significant. Remember that to bring these values "in range" you will have to reduce the contrast of the image - this may be undesirable.

If you decide that the existing superwhites and superblacks are insignificant, IMO don't clip them off. Just leave them there. I only clip them off if I decide they're an error - e.g. a video clip with black=16 and a black letterbox at 0.

IMO it's wrong to leave camcorder footage at 16-255 - you'll clip all the highlights on a typical PC player. You should scale (not clip) that.

YMMV! ;)

Cheers,
David.