Log in

View Full Version : IVTC, Synch issues


Demi9OD
31st August 2007, 03:54
Been playing around all day trying to get quality IVTC of an NTSC Video Source (TV on DVD). I'd like to use my FFDShow Post Processing, while at the same time doing 29.97 to 24.976 IVTC. I cannot do this with the avisynth tab of FFDShow, decimates do not work correctly.

The closest I've gotten is by using DGIndex to create a d2v, honoring pulldown flags, then feeding my avisynth script with...

Mpeg2Source("VTS_01_1.d2v")
tfm(d2v="VTS_01_1.d2v").tdecimate(hybrid=1)

Video looks fantastic post processed with this method, but I cannot for the life of me get my audio (demux'd ac3) to synch up. I've tried dubbing in Media Player Classic via opening .avs with .ac3 as dub. I've tried dubbing in my avisynth script with directshowsource=name.ac3, fps=23.976, convertfps=true, and all variants there of. I've tried reclock, built in MPC ac3, and ffdshow audio. No combination remains synched all the way through, seeming to fall in and out of synch somewhat at random throughout.

I'm now back to watching in PowerDVD, which synchs fine, but looks like i forgot to put my glasses on. Is there a solution to my d2v/avs/ac3 method or some other way to get IVTC I haven't thought of?

Demi9OD
31st August 2007, 06:46
Ungh, finally found it.

http://i5.photobucket.com/albums/y167/Demi9OD/mpeg2dec.gif

http://i5.photobucket.com/albums/y167/Demi9OD/ffdshow.gif

http://i5.photobucket.com/albums/y167/Demi9OD/taskman.gif


TFM(order=1,chroma=false)
SetMemoryMax(512)
TFM(order=1,chroma=false)
TDecimate(mode=1,hybrid=1,conCycle=1,chroma=false)
Convolution3d (preset="movieHQ")
Lanczos4Resize(1360, 768)
MT("LimitedSharpenFaster(ss_x=1.0, ss_y=1.0, Smode=3, strength=60, overshoot=0, soft=60, special=true)",3)

Leak
31st August 2007, 08:44
Ungh, finally found it.
Is there any special reason you're using MPC's MPEG2 decoder over ffdshow's libmpeg2 (with the ever unfortunately-named "DVD decoding (not working yet)" checkbox checked)?

I think performance might be better if you didn't use ffdshow as a postprocessor on the raw video, plus you could use it's much better decoder post-processing effectively...

Also, you might want to drag the AviSynth filter to the top of the filter list in case you'd want to use any of the other filters - well, except post-processing, that one has to be done before AviSynth.

Just my .02 EYPO... :)

Demi9OD
31st August 2007, 13:29
I'll try that out. It was like 2am and I'd run through so many permutations my head was spinning. Any way I can dump some more load onto Core 1? This is a C2D 3ghz, it's sort of scary having that little leeway. Oh I remember why I didn't use FFDShow, those stupid embedded subs that turn on and off seemingly at random...

http://i5.photobucket.com/albums/y167/Demi9OD/taskman2.gif

Leak
31st August 2007, 14:23
Oh I remember why I didn't use FFDShow, those stupid embedded subs that turn on and off seemingly at random...
If we're talking DVD subs here - that's something you need to set up in Media Player Classic; you can specify a default audio, subtitle and menu language in it's options.

np: Tal - Tal '90 (Pop Ambient 2002)

Demi9OD
1st September 2007, 18:49
It looks like the real CPU killer here is avisynth lanczos resize. Whether using LanczosResize or Lanczos4Resize, CPU use is up 10% from using FFD's ported resize filter. It is also much more heavily distributed to the second core with avisynth.

I don't see any way around it though unless TIVTC is ported to FFD. I cannot resize before the IVTC, and I cannot resize after the script if I want to use LSF to it's full potential.

Does anyone know a good reason for the resize to be using so much more juice in avisynth than FFD native? Or anyway to cut it down?

edit: This seems to distribute about 5% from core2 to core1, allowing 0 dropped frames. I'm still curious why avs resize is much more demanding than ffd resize though.
MT("Lanczos4Resize(1360,last.height())",splitvertical=false)
MT("Lanczos4Resize(last.width(),768)",splitvertical=true)

Leak
1st September 2007, 21:51
Does anyone know a good reason for the resize to be using so much more juice in avisynth than FFD native? Or anyway to cut it down?
That one is easily answered (http://ffdshow-tryout.sourceforge.net/html/en/faq.htm#multithreaded) - ffdshow will automatically split the resizing into several threads depending on the number of CPUs available, while you have to do it by hand in AviSynth.

np: Triola - Tropfstein (Pop Ambient 2006)

Demi9OD
1st September 2007, 22:50
Overall CPU use (total of both cores) is still much lower under ffd.

Demi9OD
2nd September 2007, 15:39
I'm getting variable jitter using libmpeg2 or gabests mpeg2 decoder, on progressive and telecined sources. Haali renderer OSD shows it going from .5ms to 8.5 ms, completing a full cycle every ~12 seconds. This results in slightly "skippy" pans. This does not happen with nvidia purevideo mpeg2 decoder, it sticks to a more manageable 4.3-6.2ms jitter pattern, but only when being processed raw by ffd. Unfortunately, when using PV, my ffd profile resets to default whenever I seek. Is there any way to combat this jitter roller coaster using libmpeg2, as that is the mpeg2 decoder I'd like to stick with.

Demi9OD
4th September 2007, 01:27
Got it under control by setting refresh to 59.94hz. Jitter still goes from .5ms to 8.5ms but the entire cycle takes about 5 minutes now. It was the variance in frames trying to catch up to the refresh rate and the fast cycling that was causing chop.