View Full Version : Ivtc
Dark Alchemist
30th December 2005, 03:50
I have a video I have in VOB and when I look at it I see that it is in a pure 3p x 2i stepping pattern (at least the segments I look at) but regardless what plugin I use the interlace patterns get through. I even tried tmpeg to see what it would do with it and it choked even worse so I am at a loss. Almost 2 days I have been working on this so I thought I would ask in here from people who know more than I do. :)
The link is for the vob you can check on and I used 7zip on it because it saved me almost 2megs (bandwidth).
I would be really glad if someone would suggest something for me to try on this thing as I have exhausted every avenue I could find via Google (my eyes are sore from all the guides heheh).
http://s88673373.onlinehome.us/3dd_Kryptonite_Test.7z
Revgen
30th December 2005, 05:03
Your video is unique. The B&W TV in the old guy's bedroom contains fake interlacing that was added for effect when the video is made. This confuses most deinterlacers and consequently your video looks ugly when deinterlaced.
Are these the "interlaced patterns" you're talking about?
If so then you shouldn't use postprocessing deinterlacing when you IVTC.
For example if you use the TIVTC filter you should set it like I did to:
mpeg2source("H:\3dd_Kryptonite_Test.d2v")
tfm(order=1,mode=1,pp=0,d2v="H:\3dd_Kryptonite_Test.d2v")
Notice how the "PP" setting is set to 0. This makes the B&W TV look better.
Dark Alchemist
30th December 2005, 10:14
Not entirely but I had a suspicion the the TV was throwing it off.
Tivtc is the only filter I have not tried because the avisynth site exceeded their bandwidth a few days ago so I am SOL until Jan 1.
My problem is that when I run something like telecide(guide=2) or just telecide() the pidgeon (for instance) will still have the comb effect on its beak. The old mans eyes will have them as well plus the guy in the hall with the suit on.
I tried mocomp and it took care of some things and left other things so I ditched that filter pretty early on.
I have had it "close" to perfect but never perfect in all scenes which is driving me mad considering this should be a simple case of ivtc judging by the 3x2 pattern I saw.
Any place else to get that tivtc at?
actionman133
30th December 2005, 10:29
Perhaps you could try a manual IVTC. If you're lucky the true telecine pattern could be constant the whole way through.
Try:
V = AVISource ("Blah.avi")
V = V.DoubleWeave ()
Return V
Open the script in a frame-accurate editor, like VirtualDub. Go to a frame ending in 0. Search for the first progressive frame and note the final digit (should be either 0 or 1). Then find the next progressive frame (which could end in 2, 3 or 4).
Once you've found them go back to your script.
V = AVISource ("Blah.avi")
V = V.DoubleWeave ()
V = V.PullDown (a, b)
Return V
Replace A and B with the two digits you found earlier. Then open the new script in VirtualDub and see if you if it looks okay. This will only work if there is NO pattern break throughout the whole clip.
Good luck!
Dark Alchemist
30th December 2005, 11:32
There is a pattern break which I did find using TMPGEnc. :(
I used the above script and found my first progressive on a 0 the next was at 2. So, I used it and major interlace artifacts (combing) all over it now.
This is a tough one I think and it goes beyond the fake scan lines in the tv too.
foxyshadis
30th December 2005, 16:15
They're also on his main site, can be reached from his thread (http://forum.doom9.org/showthread.php?t=82264).
Dark Alchemist
30th December 2005, 16:50
Thank you for the link. :)
I tried it with several parameters and man oh man it either gets close or it is totally lost. I wonder if this can actually be deinterlaced now.
Revgen
30th December 2005, 17:07
Are you decimating after you IVTC?
Dark Alchemist
30th December 2005, 17:33
Yes, as I have tried Decimate(mode=1), Decimate(3), Decimate(5) and Decimate().
Revgen
30th December 2005, 17:42
Have you tried the settings that I gave above along with Tdecimate(mode=1)?
It worked well for me with the sample you posted. Of course you're probably looking at the whole video.
Dark Alchemist
30th December 2005, 17:55
tdecimate I have not tried yet until now and here is what I see using your example.
http://s88673373.onlinehome.us/Image.jpg
Revgen
30th December 2005, 18:19
I'm definitely not getting that with my settings.
Okay I'm going to be a lot more exact this time:
I'm using:
DGIndex/DGDecode 1.46 Beta2 - with "Honor Pulldown ON" to create/decode the .d2v file. http://neuron2.net/dgmpgdec/dgmpgdec.html
TIVTC 1.0 Beta 7 - for both TFM and TDecimate. http://bengal.missouri.edu/~kes25c/
And this entire script:
LoadPlugin("E:\TIVTC.dll")
LoadPlugin("E:\dgmpgdec146b2\DGDecode.dll")
mpeg2source("H:\3dd_Kryptonite_Test.d2v")
tfm(order=1,mode=1,pp=0,d2v="H:\3dd_Kryptonite_Test.d2v")
tdecimate(mode=1)
Hopefully this will work for you.
Dark Alchemist
30th December 2005, 21:53
Yep, all of those are the same as I have but what I did notice is that yes I was farther into the vob then I had for download. So, the above works for the first piece of the vob I submitted but not for this next piece. The video changes patterns several times.
Here is where the the first part happens (there are tons more in the video).
http://s88673373.onlinehome.us/3dd_Kryptonite_Test-2.vob
Revgen
30th December 2005, 23:22
Okay, I've identified the problem with the clip you just posted. Apparently the frame that you showed was a scene change frame. This frame is apparently a BFF frame rather than TFF like the rest of the clip. The frame that contains this BFF shift is frame 92. Make sure that when you search for this frame in Vdub that you don't use Tdecimate.
So here is how to solve it:
1) First, you now need to make an override .txt file. Open Notepad and type (or copy and paste):
92 o 0
92 = is the frame number that is BFF.
o = The frame order parameter.
0 = specifies that the frame is BFF. Changing this value to 1 specifies this frame as TFF.
Now save this as a .txt file. I saved mine as H:\ovr.txt
2) Now it's time to make your AVS script.
mpeg2source("H:\3dd_Kryptonite_Test-2.d2v")
tfm(order=1,mode=1,pp=0,ovr="H:\ovr.txt",d2v="H:\3dd_Kryptonite_Test-2.d2v")
tdecimate(mode=1)
Make sure the "ovr" parameter points directly to your override .txt file.
I hope this helps.
Dark Alchemist
31st December 2005, 07:02
I wonder if all of the whacky scenes in here are like that as not all of them are scene changes. Will be worth a try. :) Once the family leaves and I get a chance to try this for all the funky scenes I will post back.
Btw, is this common?
Revgen
31st December 2005, 07:16
Don't Know, this is the first time I've encountered it.
Music Videos are usually done by young film proffesionals straight out of college who may not have enough experience to do things correctly.
For some reason it seems to me that whomever edited this video spliced 2 pre-telecined TFF rolls at a BFF splice. This may not look too bad when viewed on MTV, but it looks ugly in Vdub.
Dark Alchemist
31st December 2005, 11:30
All right in the original vob that frame exists on 619 and that took care of it. Now everything is working wonderfully until frames 1072 and 1073 when up pops interlaced again. It is not a scene change either.
So, I tried
619 o 0
1072 o 0
1073 o 0
but too bad that did not take care of those last 2 frames.
I must say that this has to be the hardest vob I have ever played with. :(
How exactly did you determine the fix for frame 619 because I need to use the same technique to fix the rest of this thing.
Revgen
31st December 2005, 19:20
Well I just had a hunch that it was a BFF problem just because the interlacing in the picture looked different than the interlacing in other parts of the vob.
I found this out for sure by running:
mpeg2source("H:\3dd_Kryptonite_Test-2.d2v")
tfm(order=0,mode=1,pp=0,d2v="H:\3dd_Kryptonite_Test-2.d2v")
The order=0 specifies the clip as a BFF source, so TFM then treats it like a BFF source. When I got to frame 92 (or 619), the frame wasn't interlaced anymore. So I knew I had to make an override file to change it.
These other frames may just be TFF interlaced frames that TFM didn't remove. But I can't know for sure unless I can see them in the .vob. But in the meantime you can try to deinterlace them by typing in the override .txt:
1072,1073 P 4
P= The postprocessor parameter. This is a deinterlacing postprocessor to deinterlace leftover interlaced frames.
4= dumb modified-ELA deinterlacing (my personal suggestion). You can look in the TFM readme under the "PP" section for more deinterlacing options.
Dark Alchemist
31st December 2005, 19:50
Nope. :(
Here is the next BUNCH of frames that are messed up. How any video could be this messed up is beyond me but if there is one there must be more.
http://s88673373.onlinehome.us/3dd_Kryptonite_Test-3.vob
Revgen
31st December 2005, 20:40
Okay, It looks like my postprocessing deinterlacing theory didn't work. But here is what does.
Use this AVS script:
mpeg2source("H:\3dd_Kryptonite_Test-3.d2v")
tfm(order=1,mode=1,pp=0,ovr="H:\ovr.txt",d2v="H:\3dd_Kryptonite_Test-3.d2v")
tdecimate(mode=1)
And use this override script:
0 +
5 +
7 +
9,10 +
15 +
17 +
19 +
20 +
+= The frame is combed.
All of these frames are combed teleclined frames that went unnoticed by TFM. By telling TFM that they are combed TFM can then IVTC them correctly.
Bottom Line:
These certain frames were hard for TFM to detect because the combing was only slightly exhibited in the old man's hand while the rest of frame looked clean. If you see any more of these kind of frames it most likely means that you need to tell TFM that it's combed.
I hope this helps.
Dark Alchemist
31st December 2005, 20:48
Well, I wonder why this vob is in the shape it is in? I mean it should be a straight telecine job (as it is in some spots) but what in the heck is up with only some parts being interlaced and stuff?
edit: It did not work here.
619 o 0
1076 +
Hand.jpg (http://i3.photobucket.com/albums/y81/GhostOfACPast/Hand.jpg)
That is the best of the hand frames I have.
Revgen
31st December 2005, 21:02
I don't think any of it is pure interlaced, at least the parts that I've seen. For the most part I think it's an IVTC'd film that is just badly IVTC'd and badly edited. On top of that, the constant panning, quick edits, slow motion effects, and other stuff that music videos contain probably makes it harder for an IVTC program to do it's job.
Whomever manufactured this DVD should have just remastered the original progressive footage to 23.976FPS and put a progressive flag into the DVD like most feature films do instead of using the pre-telecined footage.
EDIT
I don't see that in my sample. Are there other interlaced frames before or after the one above?
If so then you need to "+" them too, because TFM takes previous and future frames into account when IVTC'ing.
Dark Alchemist
31st December 2005, 21:12
Nope, the frame right before it is fine and that is another reason I chose that frame because it just pops in and the next frame is even worse then it goes back fine for 2 frames then when those 2 frames are done it goes back to a comb effect.
Revgen
31st December 2005, 21:16
Well, if the next frame is worse then TFM may be taking information from that frame. Try to "+" this next frame and see what happens.
Dark Alchemist
31st December 2005, 21:38
I did at first on the next line and nothing changed. This is weird.
Revgen
31st December 2005, 21:41
So it worked?
Dark Alchemist
31st December 2005, 21:54
Negative. I have tried all sorts of things now and I can't get those lines out.
Revgen
31st December 2005, 21:55
I'm out of ideas. :(
Sorry.
Dark Alchemist
31st December 2005, 22:09
Well, thank you for you help it is greatly appreciated.
I may have to trim it and resort to all sorts of filters to clean these comb lines out of the vob.
Thanks again.
Dark Alchemist
1st January 2006, 11:08
You would not believe the effort I must put into this vob.
Check out what I have had to do so far and it isn't even 1/4 done. :(
a = trim(orig,0,1070).tfm(display=true,order=1,mode=1,pp=0,ovr="ovr.txt")
a = a + trim(orig,1071,1106).TomsMoComp(1,5,1) + trim(orig,1107,1892).tfm(display=true,order=1,mode=1,pp=0)
a = a + trim(orig,1893,1953).TomsMoComp(1,5,1) + trim(orig,1954,2362).tfm(display=true,order=1,mode=1,pp=0) + trim(orig,2364,2389).TomsMoComp(1,5,1)
a = a + trim(orig,2390,3000).tfm(display=true,order=1,mode=1,pp=0)
Tdecimate(a,mode=1)
Seems most of the really bad sequences that I cannot get tfm to fix are with the old man but that might change the farther I get into it.
mystvearn
2nd January 2006, 14:43
hello
could someone give a good ivtc parameter for this one ? :
http://daiforever.free.fr/Kojiro/
I tried Decomb, TFM and SangNom but i didn't find good result
Thanks a lot for your help
Revgen
2nd January 2006, 18:42
I don't live in a PAL/SECAM country so I can't say for sure, but I'm willing to bet this anime is fieldblended.
From what I've heard this is pretty hard to work with. Try looking for "field blending" using the search function.
mystvearn
2nd January 2006, 18:45
I don't live in a PAL country so I can't say for sure, but I'm willing to bet this anime is fieldblended.
From what I've heard this is pretty hard to work with. Try looking for "field blending" using the search function.
it's japanese DVD
Revgen
2nd January 2006, 19:42
Well, what I saw was a series of 1 progressive frame followed by 4 interlaced frames.Sometimes there were 5 interlaced frames following. This is not a properly telecined video. So if it's NTSC then it's very strange.
Perhaps you could try a regular deinterlacer ala TDeint or Tomsmocomp.
Or you could bob it using MVBob or TDeint+EEDI2 and decimate it to 24FPS.
I don't think that IVTC would be very useful with so little progressive frames to work with.
mystvearn
2nd January 2006, 19:51
yes i think too ;(.
Very bad source.
foxyshadis
3rd January 2006, 01:50
Ick, fieldblending, nasty artifacts, and conversion artifacts.
I don't have c_restore or restore24 handy, so I tried cdeblend and got almost perfect results with:
mpeg2source("test.d2v",cpu=6)
b=leakkernelbob(order=(getparity()?1:0)).bilinearresize(width/2,height/2).crop(8,8,-8,-8)
tdeint(mode=1).Cdeblend(perc=6,omode=2,clip2=b)
It doesn't work very well if you put a selectxxx() after it, but you should be able to decimate directly. Clean it up first though! Ick. Try c_restore as well, too, since it decimates for you and might give you less jerky video.
You'll just have to live with the ghosts on the bottom of some frames, that's an artifact of the prism not being quite in sync with the film. Mug Funky would know more about it.
mystvearn
3rd January 2006, 07:37
Ick, fieldblending, nasty artifacts, and conversion artifacts.
I don't have c_restore or restore24 handy, so I tried cdeblend and got almost perfect results with:
mpeg2source("test.d2v",cpu=6)
b=leakkernelbob(order=(getparity()?1:0)).bilinearresize(width/2,height/2).crop(8,8,-8,-8)
tdeint(mode=1).Cdeblend(perc=6,omode=2,clip2=b)
It doesn't work very well if you put a selectxxx() after it, but you should be able to decimate directly. Clean it up first though! Ick. Try c_restore as well, too, since it decimates for you and might give you less jerky video.
You'll just have to live with the ghosts on the bottom of some frames, that's an artifact of the prism not being quite in sync with the film. Mug Funky would know more about it.
Thanks you, i will try that
Mug Funky
3rd January 2006, 07:52
Mug Funky would know more about it.
hehe... either encode it interlaced and bob on playback, or run for the hills :)
btw, nobody has mentioned blendbob - if you're sure your source is supposed to be progressive, you can quite safely get away with blendbob so long as your bob-deinterlacer isn't passing combs through (and it's quite safe to lower the bober thresholds, because you'll at worst just get slight vertical blur).
if you've got a ghosty video though, it'll come through ghosty this way. the above suggestion is more for the first clip posted in this thread.
mystvearn
3rd January 2006, 08:42
hehe... either encode it interlaced and bob on playback, or run for the hills :)
btw, nobody has mentioned blendbob - if you're sure your source is supposed to be progressive, you can quite safely get away with blendbob so long as your bob-deinterlacer isn't passing combs through (and it's quite safe to lower the bober thresholds, because you'll at worst just get slight vertical blur).
if you've got a ghosty video though, it'll come through ghosty this way. the above suggestion is more for the first clip posted in this thread.
i have good result with this
TDeint(mode=1,order=1)
BlendBob()
crop(20,4,-8,-4)
LanczosResize(640,480)
FDecimate(23.976)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.