Log in

View Full Version : Help with filtering video with different deinterlation patterns


anonova
9th February 2008, 19:07
I've been capturing a lot of television shows lately, and I have a show that keeps changing interlation patterns after each commercial break. How do you deal with something like this?

(I = interlaced and P = progressive)

segment 1: I I P P P [clip (http://www.sendspace.com/file/hkcnvo), image (http://i27.tinypic.com/2s80i06.png)]
That one is easy as I can just use tfm and tdecimate as film.

segment 2: I I I I I [clip (http://www.sendspace.com/file/e18g2j)]
It's all interlaced, but halfway through you get...

segment 2.5: P P P P P [clip (http://www.sendspace.com/file/joyy0g), image (http://i25.tinypic.com/xga32p.png)]
...all progressive material.

segment 3: I I P I I P I I P I I P I I P [clip (http://www.sendspace.com/file/4gaduz), image 1 (http://i27.tinypic.com/wvz67c.png), image 2 (http://i26.tinypic.com/jfeq7b.png)]
Then this one comes up, and I have no idea what to do with it. There are many other segments like this one.

The last episode I recorded was all interlaced, and here's the script I used for that. I would like any recommendations that would make anything else a bit nicer.
# Set DAR in encoder to 6913 : 5000. The following line is for automatic signalling
global MeGUI_darx = 6913
global MeGUI_dary = 5000
# open and deblock
DGDecode_mpeg2source("C:\Videos\eats2.d2v", cpu=4, info=3)
ColorMatrix(hints=true, interlaced=true)
# derainbow
fft3dfilter(sigma=5.1, plane=3, bw=32, bh=32, ow=16, oh=16, interlaced=true)
# deinterlace with interpolation
interp = nnedi(field=0)
tdeint(edeint=interp)
# crop
crop( 14, 10, -2, -6)
# denoise and slightly sharpen
fft3dfilter(sigma=1.7, sharpen=.42)
#trim
__film = last
__t0 = __film.trim(998, 13822)
__t1 = __film.trim(19374, 28870)
__t2 = __film.trim(34394, 43053)
__t3 = __film.trim(48157, 54956)
__t0 ++ __t1 ++ __t2 ++ __t3

anonova
19th February 2008, 22:20
Well, after a bit of trying different filters, I gave into blending the 24 fps video to 30 fps. Also, I compared fft3dfilter and dfttest. dfttest seemed to retain colors closer to the source, but it was extremely slow. I took both out and used the example denoise functions from the Seesaw thread. It seems to give pretty decent results. I mainly fear the noise and rainbowing. Although I do see dot crawl from time to time, but tcomb tends to blur out the picture a lot. Any suggestions anyone could give me to get nicer results?

# Set DAR in encoder to 6913 : 5000. The following line is for automatic signalling
global MeGUI_darx = 6913
global MeGUI_dary = 5000
DGDecode_mpeg2source("C:\eats2.d2v",cpu=4,info=3)
ColorMatrix(hints=true,interlaced=true)
#derainbow (http://avisynth.org/DeRainbow)
derainbow()
#deinterlace
tfm(cthresh=4).tdecimate(hybrid=3)
vinverse()
# crop
crop( 12, 10, -4, -6)
# colors
coloryuv(levels="TV->PC")
tweak(sat=.92)
# denoise
degrainmedian()
VagueDenoiser(threshold=.8,chromat=.8)
undot()