Log in

View Full Version : Avisynth help:: dotcrawl and ghosting


dlzinc
6th April 2007, 02:02
Like the topic says, I'd appreciate some help in encoding this DVD... Quality is the primary concern, speed is meh... the below script takes 6 hours for a 24min episode to encode to ffv1

1. Easier problem? Dotcrawl. At least I think that's the proper term for it... Look along the ship as it movies.

(avi, ffv1 lossless)
http://rapidshare.com/files/24544194/avatar_1_13.avi.html

AVS (2nd pass):

setmemorymax(256)
import("include.avs")
mpeg2source("d:\in\VTS_01_1.d2v")

crop(4, 0, -4, 0)
AssumeTFF()

interp = SeparateFields().EEDI2(field=-2, nt=150, maxd=20, pp=3)
zz = TDeint(mode=2, edeint=interp)

TFM(d2v="d:\in\VTS_01_1.d2v", PP=7, clip2=zz, slow=2, cthresh=2, mode=5)
TDecimate(mode=5, hybrid=2, dupthresh=1.0, input="d:\mid\metrics_VTS_01_1.txt",tfmIn="d:\mid\matches_VTS_01_1.txt",mkvout="d:\mid\mkvtc_VTS_01_1.txt")

TurnLeft().EEDI2().TurnRight().EEDI2()
Spline36Resize(720,480)

deen("a3d",4,3,9)
vmtoon()

include.avs is just vmtoon()
output is a VFR MKV
I'm still playing around with the TFM parameters to see if I can get a better quality encode (or better speed at about the same quality). I can cut the relevant portion of the vob too if that might be helpful...

--

2. Harder problem? Notice the ghosting around almost every line (especially visible near the edge of the face and eyebrows)

I have no idea how to get rid of it while keeping the video quality decent (ie short of screwing with the levels to make it less visible)...

(vob)
http://rapidshare.com/files/24544172/avatar1_1.vob.html

foxyshadis
6th April 2007, 12:34
For the haloing, try DeHalo_alpha and BlindDehalo, which both have their ups and downs.

I can tell you that you can play with TFM all you want and you'll never speed that script up, but I'm too tired to recommend much in its place. vmtoon in particular is a terrible one, half the processing time probably goes into sharpening at 4xAA, when SeeSaw does a better job in a tenth of the time. Line thinning is done much better with WarpSharp; line darkening is the only useful part of vmtoon, everything else should be disabled. Remind me to post my replacement script someday.

A minor antialiasing speedup:
TurnLeft().EEDI2().Spline36Resize(height,720)
TurnRight().EEDI2().Spline36Resize(720,480)
Find out whether you even need that second EEDI2, and whether non-EDI resize can provide enough quality to be worth the speedup. In the same vein, find out whether you really need that EEDI-in-TDeint-in-TFM step; it's a speed killer when TFM alone often works nearly as well.

Finally, if you're happy with Deen, that's okay, although there are a number of less destructive denoisers out there today. Mvdegrain (slooow), frfun7/3d, vaguedenoiser, and degrainmedian (fast) in particular.

But why bother antialiasing when you proceed to smear the edges with a deen anyway? The whole series of steps - antialiasing & oversmoothing just to super-sharpen back up again is not a healthy choice, following one sledgehammer with another, and you'll get more real detail by leaving the image sharp in the first place. Try one of the filters I listed, and then see if you even need sharpening; if you do, use a mild SeeSaw or LimitedSharpen.

DarkT
6th April 2007, 13:11
For dot crawl there's your Tcomb, DeDot, and a new one I saw but didn't have time to check - DeCrawl.

As Foxy says, deen is a bit too destructive - atleast so it seemed to me last time I was playing with it...

However, anti-aliasing and then sharpening is a-ok in my book... I am using SAA script by sould hunter(his requirements recommendations are soooo correct) - and it smooths too damn much, so after it a little LimitedSharpenFaster is just the right touch - or so /me thinks...

If you choose to use Tcomb, look carefully on the end product - that it didn't mess some scenes up - and if it does, use applyrange or something to not apply it to those scenes.

Tcomb = pre IVTC, meow.

Edit:

Oh, forgot, abut the ghosting, there was this one filter I saw, in niiyan.net site - meow... But I also remember when I had ghosting problems with Fumoffu(anime) - it was happening due to incorrect Tdecimate line, as far as I remember... And don't ask me how that's related - I'm a noob :), just try to fiddle with the settings there... Meow... I'll download the source VOB you provided when I can, dl speed atm is 12k/s... And I need to get my hands on the hellsing ova's... ~450mb each... So... :).

Edit2:

Ok, I had some time to look at it and here's what I used and the results - keep in mind that I spent on it only ~5 minutes, and you could do probably much better if you actually too k the time :).

Script:


d2vpath = "avatar1_1.d2v"
MPEG2Source(d2vpath)

ColorMatrix(interlaced=true)
crop( 4, 0, -4, 0)

TComb(10,10)
DeGrainMedian(LimitY=3,LimitUV=4,Mode=4,norow=true,interlaced=true)
VagueDenoiser(threshold=0.5, method=3, nsteps=5, chromaT=2.0, interlaced=true)

ASSUMETFF()
interp = separatefields().SelectEven().eedi2(field=-1,pp=3)
deint = tdeint(mode=0,Order=1,type=1,AP=55,edeint=interp,slow=2)
tfm(d2v=d2vpath,clip2=deint).tdecimate(mode=1, hybrid=1, Denoise=true)

DeHalo_alpha(rx=2.0, ry=3.2, darkstr=0.5, brightstr=1.2, lowsens=70, highsens=10, ss=1.2)
SAA()
LimitedSharpenFaster(Smode=3, strength = 120)
Lanczos4resize(640,480)

Result:

Before:

http://img413.imageshack.us/img413/6158/24befoream5.png

After:

http://img413.imageshack.us/img413/6776/24afternc7.png

Notice that the dude's eye got killed in the proccess? :) Well, I sorta overdid it I suppose :).

dlzinc
8th April 2007, 00:36
Re: Deen: not totally happy with it, I tuned it so it'd be fairly weak as to not smooth the lines. I was using it more to smooth the noise out of more solidly colored areas like the faces. The EEDIs were to get rid of jaggy lines. Then I resharpen so the lines look straight/solid and not blurred. Of course, it would be better if the jaggies weren't there to begin with, but yeah...

Re: EEDI in TFM: I had that before I put in the EEDI AA, you're right, I might not need those anymore.

Still taking my time messing around with things hehe :)