View Full Version : Deinterlacing pure interlaced material
I'm making some DivX's from some DVD's with tv episodes of Lexx and after testing a ton of different settings I think I'm really close to finding out the best settings but I just want to confirm with you guys in case there is something better because I didn't see a whole lot on here concerning interlaced. I've read some of the websites that describes all the deinterlacing methods in GKnot but I'm still not perfectly clear on them.
In DVD2AVI, it says they are 29.970FPS NTSC Interlaced. No progressive at all. I save with no field operation. Then when I go to save&encode I've been using TomsMoComp because so far I've found that one to give the best results. Field Deinterlace gives me ghosting effects and the fast ones have jaggies. I've also tried no deinterlacing and just select Encode as Interlaced in the DivX setup but that causes the picture to tear everywhere during high motion.
My latest settings are using TomsMoComp 1,15,1 and selecting Encode as Interlaced. Is this right using a deinterlacer and then encode as interlaced? If I use All frames are progressive then it looks pretty much the same but it seems like I get some jerkiness in some areas. Using Encode as Interlaced takes about twice as long but it looks a little nicer only when used with TomsMoComp. I have one concern with this though. Instead of selecting Encode as Interlaced during both passes, could I select All frames are progressive on the 1st pass and Encode as Interlaced on the 2nd pass and save an hour on the first pass or would that change the quality? If it has no impact on the 2nd pass then I'd rather do that because it's taking over 2 hours to do one pass on a 45 minute episode at these settings (on a 2ghz even). I'm going to try it but I just want to make sure this is ok.
Also if you have any suggestions on better deinterlacers that would be great too. :) I've heard of the smart and smooth ones but had some trouble getting them to work.
manono
21st June 2003, 04:12
Hi-
First, are you real sure it's interlaced? Just because DVD2AVI says it's so doesn't make it true. In most cases it can be IVTC'd to return the progressive frames. Read This Tutorial (http://www.doom9.org/ivtc-tut.htm) and you'll find about three different ways to find out if it has been telecined, or if it is really interlaced. I don't know the Lexx DVDs, so I can't give you any first hand advice. Perhaps someone else reading your post can.
Second, by using TomsMoComp, you are making it progressive. Don't use "Encode As Interlaced" for the first, second, or any other passes.
If you intend to deinterlace (which you obviously are) you should encode it as progressive in the codec, not interlaced. If you select encode as interlaced the codec assumes you gives it an interlaced picture (which you are not, as you used TomsMoComp) and uses some "tricks" that are only valid for interlaced sources.
First, are you real sure it's interlaced? Just because DVD2AVI says it's so doesn't make it true. In most cases it can be IVTC'd to return the progressive frames.
I'm pretty sure it is because if I select the IVTC check box or use inverse telecine deinterlacer the picture gets extremely jerky with interlace artifacts unless I did it wrong. I read that guide a couple times and it says for true interlaced material you should deinterlace. The DVD's also have a lot of snow on some scenes like maybe they recorded it to tape instead of film.
I'm a bit confused now after what you said about TomsMoComp. For some reason I get less stutter if I use encode as interlaced. If I use progressive the picture jerks every once in a while even on low motion areas unless it was just a fluke. It looks pretty much identical to using interlaced though. I've just been reenconding the same first 3 minutes or so of an episode by letting it go for awhile on the first pass then abort it then abort it again in the same area on the 2nd pass. This wouldn't cause those ill jerking effects would it?
You mean you abort it by pressing "abort" on the virtualdub window? Does that even produce a playable output? In either case, it's not a very good idea as you won't use DivX's logfile optimately.
Yeah after the 2nd pass comes around when it gets to the point I aborted, it drops to 0 fps then I abort again and then it does the audio muxing part and produces the finished file.
I was wrong about the pure interlace part. I just looked again at a high motion area and it looks like it gives me 2 interlaced frames then 3 progressive frames. So does that mean I should force film in DVD2AVI or not?
And what exactly is the difference between using the IVTC checkbox and selecting inverse telecine for the deinterlacer? Should both be used when doing an IVTC or one of them? I've got more experimenting to do but I'll be watching here in the meantime. Going to read that guide one more time too.
UPDATE: Ok the guide isn't working so I just tried not forcing film and selecting IVTC. I noticed that if I did force film, then I couldnt IVTC and the inverse telecine isn't there. I'm encoding right now with no field operation and IVTC checked and encoding as progressive.
Alright case closed. I just finished the quickie test using no forced film with IVTC selected and no deinterlacing. It came out nearly perfect with some very slight jerks in low motion areas but that could just be the codec because my movies do that too. I think what was confusing me was I kept hitting preview but that doesn't show the effects of IVTC. I just played it back on my tv and it looks almost like the DVD. Thanks a lot for the suggestions, I guess I should have been more persistant in the IVTC area. :p
This is working nicely but I got another problem now. Every time I select IVTC it gives me an undersized file. Now I know the codec can't be maxed like the top thread says because I've gone down to 350MB and it still cuts it to 294MB. I have the Bits (Pixel*Frame) down to 0.11. It keeps saying the number of frames differs from settings after the 2nd pass starts since the framerate is lowered to 23.976 then it adjusts the bitrate too. Is this the way IVTC is supposed to work or am I doing something wrong? If I try it with forced film then it's just plain jerky so I know that can't be right. It also has some messages that it won't look good.
Here's what it says in the log:
4:06:44 AM: IVTC: Re-Calculating Frame Count.
4:06:44 AM: IVTC: FrameRate was 29.970 fps
4:06:44 AM: IVTC: FrameRate now is 23.976 fps
4:06:44 AM: IVTC: 64615 Frames.
4:06:44 AM: Audio 1, determined: 52653 kb
4:06:44 AM: Audio 1, calc: 52636 kb
4:06:44 AM: New Bitrate for Movie = 936 k(=1000)Bits/s
4:06:44 AM: Started DivX5-First Pass: D:\video_ts\4nofieldivtchalf.avs
4:47:23 AM: Finished DivX5-First Pass. Duration: 40 minutes, 39 seconds.
4:47:23 AM: Trying to open Log-file.
4:47:23 AM: Success: Log-file open.
4:47:23 AM: Encoded: 80782 Frames.
4:47:23 AM: Speed: 33.119 Frames per Second.
4:47:23 AM: WARNING: Number of counted frames differs from settings!
4:47:23 AM: WARNING: Settings: 64615
4:47:23 AM: WARNING: Counted: 80782
4:47:23 AM: WARNING: Difference: 16167
4:47:23 AM: Correcting Bitrate...
4:47:23 AM: Original Bitrate = 936 k(=1000)Bits/s
4:47:23 AM: Now encoding at 746 k(=1000)Bits/s
4:47:23 AM: Started DivX5 - Pass: 2: D:\video_ts\4nofieldivtchalf.avs
5:23:54 AM: Finished DivX5 - Pass: 2. Duration: 36 minutes, 31 seconds.
5:23:54 AM: Speed: 36.868 Frames per Second.
And the complete file is here (http://home.sc.rr.com/nelwyn/log.txt)
manono
21st June 2003, 17:21
Hi-
Good, you got it figured out. Much more satisfying than someone just giving you the answer. You probably have to tweak Decomb a bit to get your video playing more smoothly. Perhaps add Guide=1 inside Telecide. Read the Decomb help file in the Docs section of GKnot for more ways to tweak Decomb.
Oops-just saw your new post as I was typing. In the Encoder-Add Job area, did you make sure to check "IVTC in avs->correct Frame Count"? Because, you're right. The video bitrate shouldn't change after IVTC.
But something's screwy there. It's expecting 64615 frames after IVTC, but it still has the original 80782 frames. Back in the Bitrate Tab, did you by chance change the fps in the lower left corner from the 29.97fps of the .d2v to 23.976fps? Can you post the .avs (don't include the lines beginning with "#", as they don't do anything). Another thing to check-open the .avs in VDubMod directly, and take note of the number of frames of the complete episode. Is it 64615 or 80782? And go File-File Information and confirm that it's really 23.976fps.
Here's the .avs
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec3.dll")
mpeg2source("D:\video_ts\4.d2v")
crop(8,0,708,480)
LanczosResize(608,448)
I didn't change the FPS in GKnot, it's still 29.970. I think I may have found the answer. I didn't select any field operation. I'm currently encoding it again but this time I selected inverse telecine for the field operation AND IVTC in avs ->correct frame count. It just completed the first pass and didn't give me any warnings this time. I assume this is correct then, I need to select both of them to properly IVTC?
EDIT: Ok it just finished both passes and the filesize is exact. :) Still very minor jerking but I'll try reading that help file again. It's already set for guide=1. I noticed when I do a compressibility check and I get an incredibly high value like over 0.4. I have it set to 705MB with a bitrate of 2022 and 0.22 Bits (Pixel*Frame) and I still only get 53%. The finished file seems to look pretty close to the DVD though so maybe it doesn't work right with IVTC. Thanks for all the help. I just need to figure that out and finally no more headache hehe.
manono
22nd June 2003, 03:21
Hi-
Ahhh, rookie mistakes. As you've figured out by now, there's no Decomb loaded into the .avs, and no Telecide-Decimate line.
I think what was confusing me was I kept hitting preview but that doesn't show the effects of IVTC.
Yes it does (if you've applied IVTC). That should have been a clue to you. And it's always a good idea to load the .avs in VDubMod before encoding to make sure that everything looks OK, and to go File-File Information to also make sure everything's OK. I also think it's a good idea to edit the .avs to get rid of all the lines beginning with "#" so the thing makes some sense to you.
And it might play more smoothly if you add Guide=1 into the Telecide line. You can check if it improves things by adding Trim (10000,11000) at the bottom of the .avs, and then run a quick encode in VDubMod to check for smoothness. That will encode 1000 (roughly 40 seconds) frames beginning at frame 10000. Modify that however you wish. Perhaps encode a portion that has been playing jerky for you. Then just run the second pass over again. Good Luck.
Thanks I think I nearly got it perfect now. Here's my settings that might help out someone else:
Telecide(guide=1, post=false)
Decimate(cycle=5, mode=1, quality=3)
It was still jerky even with guide=1 but once I added the mode=1 it seemed to smooth out some. mode=2 was about the same as 0. I'm just playing around with the blend and interpolate modes now. I'll probably just stick with blend and have post processing off for now. I'm tired of messing with this thing heh.
manono
22nd June 2003, 08:12
Hi-
Good, you got it. One thing I forgot to mention:
I have it set to 705MB with a bitrate of 2022 and 0.22 Bits (Pixel*Frame) and I still only get 53%.
After you do a compress test with IVTC turned on, you have to change the FPS in the lower left corner to 23.976fps to get an accurate percentage figure. That percentage is based on the 29.97fps of the .d2v. But by performing IVTC, you bring the frame rate down to 23.976fps, you have 20% fewer frames, and the quality jumps by 25%. So that 53% at 29.97fps becomes around 68% after IVTC, and explains why it looks so good.
Cool. I messed with IVTC all night and I still couldn't get it to stabilize unless I used mode=1 but in doing so it gives me the warnings again and lowers the bitrate so I can't use it unless I keep the 29.97fps. I stumbled on the progressive frame recovery section in the decomb doc and that seems to be working for me. I end up keeping the 29.97fps but the picture plays perfectly smooth, well for the most part but closer that I've ever been. I think one of these 2 methods may be what I was looking for. All I have for that is Telecide(). Decimating is off. I guess simpler is better in my case. I'm just stuck now deciding whether I should use mode=1 decimating or have it off altogether. They both look pretty identical to me.
manono
22nd June 2003, 09:23
Hi-
If you have film material, you want to IVTC with Mode=0 (default). Unless your material is anime, in which case Mode=2 is a good idea. The other modes are for other kinds of material. If you do use Mode=1, or Telecide with no Decimate, then you don't check the "IVTC in avs" box, as it's still 29.97fps. With just Telecide and no Decimate, you'll have a duplicate in every 5 frames (Open the .avs in VDubMod and check), and that's not such a good idea. With Mode=1, that 5th frame is a blend, also not a good idea, in my opinion, if for no other reason than you'll take a major quality hit (back to 53% again, instead of 68%).
Maybe you're just working with difficult material, maybe a series that was telecined badly, or maybe it's a hybrid with some video CG effects (in which case one of the other modes might give better results). If that's true, I'd prefer to use Mode=3. Anything to get it to 23.976fps. But just think of how much you're learning now. It'll hold you in good stead for the future.
I never thought about the quality loss. You mean guide=3 or mode=3? I only saw up to mode2 in the doc. I just tried mode=3 and it seems to work but not quite as smooth.
manono
22nd June 2003, 10:38
Hi-
I meant Decimate(Mode=3). It's for hybrid material (you have to establish that first). It IVTC's the film portions normally, and does frame blending to convert the video portions to 23.976fps. Yes, the video portions may not play absolutely smoothly as a result.
By the way-if you get the newest Decomb, neuron2 uses a slightly different strategy to decimate the video portions that may make it play more smoothly. You can read more about it in the 6-1-2003 journal entry Here (http://shelob.mordor.net/dgraft/journal/journal.html). I don't know if you are working with hybrid material or not. Only you can figure that out.
I just did a search on LeXX and came up with This (http://forum.doom9.org/showthread.php?s=&threadid=17873&highlight=LeXX). This person claims there's a field order problem with the series. If true, you might try Telecide(Guide=1,Reverse=True). But I don't know if that will improve things or not.
By hybrid do you mean like the Star Trek TNG episodes where it changes from interlaced to progressive frames on the CG and normal shots? Lexx doesn't do that it's just all interlaced. I don't know why mode=1 makes it the smoothest even though it's for hybrid stuff. I'll try the new decomb filter with mode=0 and agg=true. I'm out of ideas now, mode=1 seems to work the best for me even though I keep the 29.97 framerate. It actually doesn't look any different to me as far as quality so I may just go with that method even though it's a little odd for this. I'll give this new filter a shot with reversed fields first, but I think mode=1 is for me because it gives the smoothest results.
After testing, mode=0 does the same thing and reverse=true didn't help. It's really smooth everywhere except in high motion areas then it stutters. I've been looking at the opening credits and can tell right away on that. I thought it might have something to do with me watching on tv but it does it on the computer too. So I guess it's ok to do mode=1 because my tv can do the 3:2 pulldown if needed. I tried mode=3 again too and it's more jerky than mode=0. Mode 1 isn't perfect but it's about as smooth as I can get it.
manono
22nd June 2003, 22:37
Hi-
OK, you're the best judge of what looks good to you.
my tv can do the 3:2 pulldown
So can mine. But neither yours nor mine can detect 3:2 pulldown on .avis either sent to the TV from the computor, or played through an MPEG4 player. Good Luck with the series. I hope the rest of the episodes go more smoothly than the first one.
Guest
23rd June 2003, 05:31
Originally posted by Nel
Thanks I think I nearly got it perfect now. Here's my settings that might help out someone else:
Telecide(guide=1, post=false)
Decimate(cycle=5, mode=1, quality=3)
It was still jerky even with guide=1 but once I added the mode=1 it seemed to smooth out some. mode=2 was about the same as 0. I'm just playing around with the blend and interpolate modes now. I'll probably just stick with blend and have post processing off for now. I'm tired of messing with this thing heh. Blend versus interpolate is relevant only when post=true.
I've been leaving post processing on for my final encodes. The settings I've come to are:
Telecide(guide=1, agg=true).Decimate(5, mode=1, quality=3)
It's turning out nicely. After doing some more compressibility checks I get nearly 80% at 29.97 now at 640x480 on most episodes so it looks really sharp still. If I change it to 23.976 then it's nearly 100% but it probably wouldn't look much different. I think that one episode just happened to have a high number or I had the wrong field operation selected.
Stabmaster-Arson
3rd July 2003, 23:18
If it indeed has 3 progressive frames, then 2 interlaced, then dont be using decomb ivtc, just force film.
manono
4th July 2003, 05:44
Hi-
If it indeed has 3 progressive frames, then 2 interlaced, then dont be using decomb ivtc, just force film.
Nope, bad advice. There are plenty of NTSC movies that have been telecined and then encoded as interlaced. They may show up in DVD2AVI as pure NTSC-Interlaced. Those should never be Force Filmed, but can often be IVTC'd easily. Please read this tutorial (http://www.doom9.org/ivtc-tut.htm) for more information.
Manono is right. I tried force film on it and believe me it looked horrible and jerked all over the place.
My final settings at mode1 aren't perfectly smooth but it's good enough for me. At mode0 it is actually smoother but the space scenes go nuts and have terrible jerking even though it's not hybrid so it was a tossup and I took the constant small jerks instead which I can't really see most of the time anyway.
Star Trek TNG seems to do the same thing but I managed to ivtc that at mode0 that and it looks really smooth everywhere except when they show the ships then sometimes it jerks around but not always. That's probably due do it being hybrid material though.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.