View Full Version : Distributed Processing VHS->DVD using TCPDeliver, EEDI2, TDeint, & DegrainMedian
nibbles
26th September 2006, 06:45
I'm fairly new to using AviSynth, but I like it and would like to try some distributed processing.
I've captured an old, noisy, high generation VHS of Jerry Garcia with Bruce Hornsby on keys.
These clips are 20 frames of the raw video:
EDIT: Removed faulty capture clips. Working on a new capture. The theory that
manono and I discuss below is still worth considering until then, I suppose.
Jerry.avi
Bruce.avi
Ugly.avi
NTSC 720x480
29.97 interlaced
UYVY TFF HuffYUV
53.33 µs active capture window
1 dvd pixel per 1 capture pixel
I would like to put this on an NTSC 4:3 DVD-Video that will be played on a PC monitor
or a Widescreen TV with progressive scan. Here's my script to feed it to CCE:
Server
SetMemoryMax(384)
AVISource("k:\capture.avi").ColorYUV(levels="PC->TV")
AssumeTFF()
ChromaShift(C=4,L=-10)
LetterBox(8,8)
interp = separatefields().selecteven().EEDI2(field=1)
tdeint(order=1,field=1,edeint=interp)
TcpServer()
Client
SetMemoryMax(256)
SetWorkingDir("c:\temp\filters32")
LoadPlugin("degrainmedian.dll")
TCPSource("jerome.xxxxx.net", compression="none")
Trim(1,278688)
DeGrainMedian(limitY=5,limitUV=7,mode=1, norow=true)
I get great results with EEDI2+TDeint+DGM. But I'm hoping some people
might point me in another direction if they've found a better way. I'll post
a few frames of the huffyuv capture as soon as CCE gets finished with a test
I'm doing. Does this look all right?
Thanks a lot!
manono
26th September 2006, 10:41
Hi-
But I'm hoping some people might point me in another direction if they've found a better way.
Keep it interlaced. I'm assuming it's true interlace, and hasn't been telecined. The software DVD player for your computer monitor might have a crummy deinterlacer, but the one in either the DVD player or the HDTV is likely to be pretty good (depends on the equipment you have). The encoding will go a lot faster as well.
I don't know as I've never used it, but is the ChromaShift filter interlaced aware? Ordinarily, when filtering interlaced sources, you have to make allowances for them being interlaced.
nibbles
26th September 2006, 21:03
Thanks for the help. I just looked at the MPEG2 I got out of CCE and it looks softer, less focused.
If I understand correctly, that's one of the downsides to deinterlacing. If I keep it interlaced, am
I going to be doing something like this?
AVISource("k:\capture.avi").ColorYUV(levels="PC->TV")
AssumeTFF()
SeparateFields()
even = SelectEven(last).fft3dgpu(sigma=4, bt=4, bw=16, bh=16, ow=8, oh=8)
odd = SelectOdd(last).fft3dgpu(sigma=4, bt=4, bw=16, bh=16, ow=8, oh=8)
Interleave(even, odd)
Weave()
I looked up the Chromashift usage, and there was no mention either way about
interlaced or frame based restrictions. I also did some experimenting with SeeSaw
and motion compensation like this:
AviSource("R:\Temp\cap1.avi").ColorYUV(levels="PC->TV")
AssumeTFF()
ChromaShift(C=4,L=-10)
LetterBox(0,16)
LeakKernelDeint(threshold=4, map=false, order=1)
ConvertToYV12()
backward_vec2 = last.MVAnalyse( isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
backward_vec1 = last.MVAnalyse( isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec1 = last.MVAnalyse( isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec2 = last.MVAnalyse( isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
a = last.MVDegrain2( backward_vec1, forward_vec1, backward_vec2, forward_vec2, thSAD=400, idx=1 )
b = a.DeGrainMedian( mode=1 )
SeeSaw( a, b, NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )
ConvertToYUY2()
And I got good cleaning results, but I thought I needed to deinterlace it first.
I'm not sure how to adjust interlaced work with SeeSaw.
thanks, nibbles
manono
26th September 2006, 21:28
Hi-
Yes, that first script is one way to filter interlaced sources. I prefer something like:
LeakKernelBob(Order=1)#if TFF
***The Filters***
***Of Your Choice***
SeparateFields()
SelectEvery(4,0,3)#if TFF
Weave()
ConvertToYUY2(Interlaced=True)#for CCE
nibbles
28th September 2006, 19:32
I just found another post of yours manono, this one,
http://forum.doom9.org/showthread.php?p=766069#post766069
where you answer a lot of the questions I wrote earlier.
Running a script with one or the other of these two commands
LeakKernelBob(order=1)
or
TDeint(mode=1,order=1)
gives me slightly different results. Different ways of processing
I guess. I'll have to read about that some more.
Also, when I looked at the result of either command, I saw the odd frames
had a lot more noise overall than the even frames. It was like
night and day. If they are being resized, I can't figure why one looks so
good compared to the other. My code made these (tinypic):
leakbob.even.png (0.5 MiB) (http://i9.tinypic.com/40o2wm0.png)
leakbob.odd.png (0.5 MiB) (http://i9.tinypic.com/2ic5yfc.png)
SetWorkingDir("C:\Temp\Filters32")
LoadPlugin("leakkerneldeint.dll")
LoadPlugin("tdeint.dll")
AVISource("k:\capture.avi", audio=false, pixel_type="YUY2")
AssumeTFF()
LetterBox(8,8)
Trim(257200, 257219)
LeakKernelBob(order=1)
If I'm following the idea correctly, the evens are my resized top fields,
and the odds are my resized bottom fields.
The evens are clean. The evens are tops.
The odds are noisy. The odds are bottoms.
Why are the tops clean and the bottoms noisy?
Hey no laughing in the nickel seats. ;)
Wow if I just do a SelectEven() I get a 29.97 mostly clean video.
Oh now I've reached the outer limits I'm sure...
I just realized that the raw video has clean top fields and noisy
bottom fields. It all comes from there, not LeakKernelBob.
SeeSaw the evens against the odds as if they were a and b?
The frames that come out of LeakKernelBob are spatially coherent,
so that might work.
EDIT: I got some raw clips uploaded in the first post. You can see Bruce
blink in one of them. I thought that might be a good test, trying to bring
the detail out. In the Jerry clip, the challenge might be to see the eye of
the Tiger on his guitar or the strings as he does the tremolo. Good stuff.
EDIT: Many coffees later, still fixing the spelling, trying new things while
manono catches a west swell. Ok, thanks again. nib
manono
29th September 2006, 07:15
Yeah, there's a big difference in those pics, all right. Maybe they're just like that on the VCR capture. Easy enough to find out. Just separate the felds, without LeakKernelBob or any other filter, and compare again.
Wow if I just do a SelectEven() I get a 29.97 mostly clean video.
Yes, that thought occurred to me, too. You'll lose some more resolution but, what the heck, there's none there to begin with.
nibbles
29th September 2006, 08:56
It was a bad capture. I found that out when I separated fields
without the Leak filter. I'm doing another capture now. I'll update
this thread when I get some new clips in. I'm also going to use
huffyuv 2.2.0 as it is supposed to work fine in YUY2. Thanks.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.