View Full Version : Need help finding right TFM settings for this clip.
Jeremy Duncan
8th September 2007, 21:26
Unprocessed d2v clip of the movie Blade (http://www.megaupload.com/?d=GT6H5IJ4)
I'm using tivtc and am trying to find the proper settings for it.
This is what I'm using so far, but it's not working.
TFM(blockx=8,blocky=16,cthresh=7,mi=5,display=true)
TDecimate(mode=1,conCycle=1,chroma=false)
See the image below. I'm using FFDshow in realtime, and do not use d2v's to encode.
I use only realtime.
http://aycu19.webshots.com/image/26778/2003670548854651837_th.jpg (http://allyoucanupload.webshots.com/v/2003670548854651837)
TheRyuu
8th September 2007, 23:00
I don't get any interlacing when I use the libmpeg2 decoder in ffdshow.
Probably honors the pulldown flags.
Why not just use that instead of using TIVTC.
Jeremy Duncan
8th September 2007, 23:24
I don't get any interlacing when I use the libmpeg2 decoder in ffdshow.
Probably honors the pulldown flags.
Why not just use that instead of using TIVTC.
Because I want to use tfm and tdecimate in FFDshow without having to change or fiddle with the settings for each movie.
This is what I'm using in FFDshow right now:
SetMemoryMax(1024)
TFM(order=-1,chroma=false,mi=5)
TDecimate(mode=1,conCycle=1,chroma=false)
FluxSmoothT(3)
ColorMatrix(Mode="Rec.601->Rec.709",clamp=false,threads=2)
MT("SeeSaw(NRlimit=0, NRlimit2=5, Sstr=2.22, Szp=1, Slimit=9, Sdamplo=16, Spower=1, sootheT=95, SdampHi=39)",3)
http://aycu29.webshots.com/image/27828/2000218268149292955_th.jpg (http://allyoucanupload.webshots.com/v/2000218268149292955)
Using these settings below I get stutter.
Codecs tab
Set Mpeg2 to Libmpeg2, and check "DVD decoding".
Set Avisynth to Avisynth, Raw video to All supported
Deinterlace tab
5 Tap Lowpass
Avisynth tab
YV12 checked,
Add FFdshow Video source checked,
3:2 Pulldown box: Ignore Pulldown checked,
Check Buffer back/Ahead: 1, 2
*copy and paste* the code below into the avisynth text box, and then click apply.
SetMemoryMax(1024)
FluxSmoothT(3)
ColorMatrix(Mode="Rec.601->Rec.709",clamp=false,threads=2)
MT("SeeSaw(NRlimit=0, NRlimit2=5, Sstr=2.22, Szp=1, Slimit=9, Sdamplo=16, Spower=1, sootheT=95, SdampHi=39)",3)
Subtitles tab, Unchecked
Uncheck "Decode closed captions"
Uncheck "Accept embedded subs"
Uncheck "Accept SSA, ASS, ASS2 Subtitle (experimental)
Vobsub subpage, uncheck Vobsub Enable.
Resize & aspect tab
Specify size 1920, 1080
Process Pixel aspect ratio internally checked
No aspect ratio correction checked
Lanczos
Taps: 2
Luma Sharpen: 0.20
Accurate rounding checked
Queue & Output tab
Queue output samples checked
Output tab
YV12 checked
Using tfm and tdecimate eliminates the stutter.
But the picture isn't optimized.
That's why I'm posting this thread.
I'm using 72 hertz refresh rate.
tritical
9th September 2007, 00:24
I got perfect ivtc results on the clip you posted with:
tfm(chroma=false)
tdecimate(chroma=false)
The other settings you posted don't make much sense.
TFM(blockx=8,blocky=16,cthresh=7,mi=5,display=true)
TDecimate(mode=1,conCycle=1,chroma=false)
The mi value in tfm is ridiculously low. Only 5 pixels in any 8x16 block (i.e. 128 pixel area) would have to be detected as combed to declare the frame combed. Coupled with a cthresh value of 7, pretty much any high frequency detail will end up setting it off, which is what happens on this clip. Setting conCycle=1 in tdecimate is useless unless you set hybrid to something other than 0. Also, this is film, not cartoon or anime, so you shouldn't use mode=1 (use mode=0, the default).
TFM(order=-1,chroma=false,mi=5)
TDecimate(mode=1,conCycle=1,chroma=false)
Again, same problems as before, mi is too low (it's even worse here cause the defaults for blockx/blocky are 16 which makes it 5 pixels in a 256 pixel area). Setting conCycle=1 doesn't do anything since hybrid=0 by default.
If you have clips that absolutely require you to use very sensitive combed frame settings (low, but reasonable, cthresh and mi values), then use tdeint in mode 2 for post-processing so that all of the falsely detected combed frames still come out looking good. Example:
deint = tdeint(mode=2,mtnmode=3)
tfm(clip2=deint,cthresh=4,mi=64)
tdecimate()
Of course, that will require a pretty powerful system for realtime use.
Jeremy Duncan
9th September 2007, 00:45
http://www.imagehosting.com/out.php/t1117139_Blade.PNG (http://www.imagehosting.com/out.php/i1117139_Blade.PNG)
Using that clip I uploaded in post one.
I then used this code in realtime with FFDshow.
SetMemoryMax(1024)
deint = tdeint(mode=2,mtnmode=3)
tfm(clip2=deint,cthresh=4,mi=64)
tdecimate()
It looked great. But I know that if I framestep to a certain part in the clip I can see combing if the MI is too high.
And you can see it in the image capture I uploaded in this post.
Look at the lips.
May I ask, tritical, if you can suggest a way I can get rid of the combing I see in the lips of the picture I uploaded ?
Thanks a lot for your suggestions ! :)
Leak
9th September 2007, 00:59
May I ask, tritical, if you can suggest a way I can get rid of the combing I see in the lips of the picture I uploaded ?
May I ask where you're seeing combs in that picture?
Also, have you ever thought about actually *watching* stuff at almost-perfect quality instead of spending hours on tweaking that brings almost no improvement except for maybe still frames?
Just my .02 EYPO...
np: Señor Coconut Y Su Conjunto - Music Non Stop (Cumbia) (El Baile Alemán)
Jeremy Duncan
9th September 2007, 01:05
http://www.imagehosting.com/out.php/t1117206_Blade.PNG (http://www.imagehosting.com/out.php/i1117206_Blade.PNG)
It doesn't hurt to ask.
Just seeing what I can see.
"The bear went over the mountain,
The bear went over the mountain,
The bear went over the mountain,
To see what he could see
To see what he could see,
To see what he could see..."
That song is "The Bear Went Over the Mountain".
And that's what I'm doing, seeing what I can see since there's no harm in asking.
tritical
9th September 2007, 01:12
I don't have much experience using the avisynth part of ffdshow, but I quickly tried:
tfm()
on your clip (directly open the .m2v file) and it indeed looks crappy because the field order is incorrect (it is detected from avisynth as 0, bff). If I use:
tfm(order=1)
then it looks fine... this is using libmpeg2 for mpeg2 decoding and setting "apply pulldown" in the avisynth section of ffdshow. Like I said before, simply using:
mpeg2source("blade.d2v")
tfm()
tdecimate()
in a plain avs script works perfectly on this clip, and the field order is automatically detected as bff which is correct there.
EDIT:
After figuring out that I needed to set the back and ahead values to 1 and 11, the following script used in ffdshow works perfectly on this clip:
tfm(order=1,chroma=false)
tdecimate(chroma=false)
Jeremy Duncan
9th September 2007, 01:29
Ho... That fixed it.
Using this script/code there's no combing at all. :)
SetMemoryMax(1024)
deint = tdeint(mode=2,mtnmode=3)
tfm(clip2=deint,cthresh=4,mi=64,order=1)
tdecimate()
Ha ha. Good. Thank you.
Jeremy Duncan
9th September 2007, 01:34
SetMemoryMax(1024)
deint = tdeint(mode=2,mtnmode=3)
tfm(clip2=deint,cthresh=4,mi=64,order=1)
tdecimate(chroma=false)
tfm(order=1,chroma=false)
tdecimate(chroma=false)
Both of these work fine.
Leak
9th September 2007, 11:07
Just seeing what I can see.
Well, if it helps - what you highlighted in that image simply wasn't combing, that was stairstepping.
Jeremy Duncan
9th September 2007, 13:19
Ok. Never read about Stairstepping before. Learned something new.
DarkT
9th September 2007, 13:26
Just about the stair-stepping thingy - would an AntiAliaser solve that? I just wonder - since I never encountered that thing either...
Vesi
9th December 2007, 14:16
can some one direct me to documentation on TFM.
J_Darnley
9th December 2007, 16:07
TFM docs are included in the AviSynth Documentation and in the TIVTC download package.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.