Log in

View Full Version : To Deinterlace or not to deinterlace: this is the question!


Joe Satriani
12th April 2005, 11:31
Just a doubt is troubling my mind: do I have to deinterlace (by selecting it in DVD-RB's option tab with decomb.dll in asiynth plugin folder) every time I backup an interlaced movie...or I can leave it as it's???
Bear in mind I use CCE SP 2.66.01.07!!!

Thanks in advance
Joe

Rockas
12th April 2005, 12:53
Keep it as it is.

JohnG
12th April 2005, 13:37
Only deinterlace if you plan on viewing the material on a PC. Leave it alone if you primarily will watch the backup on your TV. It's always best to leave it interlaced. BTW, if you do want to deinterlace, there are better options than decomb. (LeakKerneldeint is an excellent choice...read the avs forum)

mrslacker
12th April 2005, 15:24
Originally posted by JohnG
Only deinterlace if you plan on viewing the material on a PC. Leave it alone if you primarily will watch the backup on your TV. It's always best to leave it interlaced. BTW, if you do want to deinterlace, there are better options than decomb. (LeakKerneldeint is an excellent choice...read the avs forum)
I wouldn't even bother deinterlacing to watch it on a PC. Use a player with some deinterlacing options. Media Player Clasic has deinterlacing built-in.

I agree about Leakkerneldeint. see neuron2.net

scharfis_brain
12th April 2005, 15:49
so you guys tell that kerneldeint does a better job in 'deinterlacing' telecined ntsct film or phase shifted pal film?

only do deinterlacing, if you EXACTLY know, what you are doing.

JohnG
12th April 2005, 16:20
Originally posted by scharfis_brain
so you guys tell that kerneldeint does a better job in 'deinterlacing' telecined ntsct film or phase shifted pal film?

only do deinterlacing, if you EXACTLY know, what you are doing.

Of course the material has to be examined to determine what the best course would be. I didn't mean to imply that leakkerneldeint is the best solution for ALL interlaced film. Clearly it is not. But that is why I deferred to the avs forum.

mrslacker
12th April 2005, 17:27
Originally posted by scharfis_brain
so you guys tell that kerneldeint does a better job in 'deinterlacing' telecined ntsct film or phase shifted pal film?

I know very little about the selection of appropriate deinterlacers. My experience is based on my attempts to fix some bad editing in a TV series. I should have noted that! Sex and the City to be exact. Most of the material is 24p film, but around some scene changes, there are interlace frames. Editing done after converted to video? I don't know. Leakkerneldeint looked nicer than Fielddeinterlace with or without blending. That's all I know. I'm impressed with the theory of a 3D kernel for reduction of edge artifacts, and the combing detection described by the help html, but that's all. So, what do you think is appropriate for the situations you quoted? Educate me.

Added note: I just want to state publicly that I value Scharfi's knowledge considerably. A quick review of topics on interlacing (and video standards in general) reveals that he is quite the expert. If my ignorance is frustrating, sorry. I'm just starting to learn. It doesn't help that my participation in these forums is largely academic, not practiced heavily as with the real experts.

jdobbs
13th April 2005, 19:35
I just did Sex and the City in testing recently. Somebody was on the crack pipe when they were authoring those...

scharfis_brain
13th April 2005, 20:08
which deinterlacer did you've used?

was it a PAL or NTSC DVD?

jdobbs
13th April 2005, 20:28
I assume your talking to mrslacker -- I never deinterlace anything. I think it is sacrilege.

scharfis_brain
13th April 2005, 20:40
no, I talked to you,
cause your post sounds like you tried to deinterlace / decomb Sex & the City.

but maybe I should have read the above post more precisely.

SatC is IMHO 29.97 fps telecined film with bad edits
(telecined film edited on video).

telecide(order=?, guide=1).decimate(5)

should revert it inte 23.976 fps progressive without much problems

manono
13th April 2005, 21:24
Sounds fine in principle, scharfi, except for the fact that DVD-RB doesn't allow for IVTC. It'll give it back to you the way it is on the original DVD. If you want to IVTC it, you'll have to encode manually. Of course, deinterlacing something like that is no solution either.

And for the original poster, Joe Satriani, I can only echo scharfi's statement. Only deinterlace if you are absolutely sure of what you have (meaning, examine the source frame by frame), and know exactly what you're doing. In general though, I agree with jdobbs that deinterlacing is usually a bad idea for DVD encodes.

mrslacker
14th April 2005, 00:15
Originally posted by scharfis_brain
SatC is IMHO 29.97 fps telecined film with bad edits
(telecined film edited on video).

telecide(order=?, guide=1).decimate(5)

should revert it inte 23.976 fps progressive without much problems
I assure you, R1 SATC is soft telecined, at least Season 6 disc 2. There is no need to do IVTC. Anyway, examining raw frames, the pulldown pattern breaks on the edits like this:

1749: 1988,1989.................0 *
1750: 1989,1990,1990............1 *
1751: 1991,1991.................2 *
[GOP START]
1752: 1992,1992,1993............3 *
1753: 1993,1994.................0 *
1754: 1994,1995.................0
1755: 1995,1996.................0
1756: 1996,1997.................0
1757: 1997,1998.................0
1758: 1998,1999,1999............1 *
1759: 2000,2000.................2 *
1760: 2001,2001,2002............3 *

That was info parsed from a RAW FRAMES d2v (Field_Operation=2 (0:None 1:ForcedFILM 2:RawFrames)). Raw frames 1754-1757 are around a scence change. Frames 1754 and 1755 are interlaced. Combing is evident in SJP's pretty hair. So they edited after telecine, fine. The real problem is that frame 1756 (raw frame!) is composed of fields from two different cameras! Watching scene changes on my progressive display is very irritating. It happens very, very often.

http://img185.imageshack.us/img185/6474/raw1017566xe.jpg
It's encoded that way! Yuk

My approach to fixing this was to detect camera mismatched fields, and interpolate a coherent frame from one field.
c1=conditionalfilter(c,lanczosresize(c.separatefields.selecteven,720,480),c,"isCombed(200)","=","true")
With a combing detection threshold of 200, this only picks these really bad frames.

My second approach was to match one field with an opposite parity field from the previous or next frame, depending on field order.
c1=conditionalfilter(c,fielddeinterlace(c.separatefields.selectevery(2,0,3).weave,blend=false),c,"isCombed(200)","=","true")
This seemed to retain the same frame count. There is probably a better way to do this. separatefields.selectevery(2,0,3).weave is assuming the top field belongs to the new camera... separatefields.selectevery(2,1,2).weave when the bottom field belongs to the new camera. It is not always the same, and the run of zeros is sometimes a run of twos.

The following seemed to cover all bases:
function temporalrebuild_combedscenechange(clip c){
c1=conditionalfilter(c,fielddeinterlace(c.separatefields.selectevery(2,0,3).weave,blend=false),c,"isCombed(200)","=","true")
c2=conditionalfilter(c1,fielddeinterlace(c.separatefields.selectevery(2,1,2).weave,blend=false),c1,"isCombed(200)","=","true")
return c2
}
If the first guess at field matching didn't work, it tries the other. I'm sure there is a better way to do this. But like I said, I'm learning.

I'd like to reflag the entire stream for uniform pulldown instead of using the original flags, but I don't have a copy of DVD-RB <0.39, and the playback length would increase considerably as these patter breaks happen hundreds of times by the end of an episode. Oh, leakkerneldeint looked better with my "grab bag" field matched frames.

If I am forced to watch this show, I'm not going to suffer through bad editing too! :D

EDIT: moved images to imageshack

jdobbs
14th April 2005, 00:33
Originally posted by manono
Sounds fine in principle, scharfi, except for the fact that DVD-RB doesn't allow for IVTC. It'll give it back to you the way it is on the original DVD. If you want to IVTC it, you'll have to encode manually. Of course, deinterlacing something like that is no solution either.

And for the original poster, Joe Satriani, I can only echo scharfi's statement. Only deinterlace if you are absolutely sure of what you have (meaning, examine the source frame by frame), and know exactly what you're doing. In general though, I agree with jdobbs that deinterlacing is usually a bad idea for DVD encodes. The goal of DVD-RB is to give you as exact a duplication as possible of the original. Of course there are always ways... I guess I could come up with a hidden setting for inverse telecining. My fear is all those people out there who (bless thier hearts) don't know any better. You don't know how many times I've had someone asking about how to run a deinterlacer on something that was already progressive on the disc because they saw combing in the telecined output on their computer...

Guest
14th April 2005, 00:49
Are you just looking for any solution or are you looking for one that DVD-RB can do?

If the former, why not just use Force Film and then pass it through FieldDeinterlace(full=false,blend=false) with a threshold set high enough to catch only the bad frames?

mrslacker
14th April 2005, 00:58
Originally posted by neuron2
Are you just looking for any solution or are you looking for one that DVD-RB can do?
One that DVD-RB can do. AFAIK, It can do what you suggest with the filter editor. The problem with that, which I found out quickly, is that a deinterlacer doesn't make that frame look much better, just less rigid. The only solution that made sense was to drop one of the camera mismatched fields.

manono
14th April 2005, 01:22
Hi-

mrslacker-

I didn't realize that most of it had been encoded as Progressive. I was going by what sharfi had said. So, the problems are at the places where edits took place. You mentioned just running LeakKernelDeint over the whole thing, but in my opinion that's not such a good idea, as then the whole thing (all the motion parts anyway) gets deinterlaced. It looks like you did come up with a conditional deinterlacer, but I'd probably do it much more simply, with TDeint(Full=False). You can also tweak its threshold so only the interlaced stuff actually gets deinterlaced, but I've usually found the defaults to be pretty good. The fine points of that are more scharfis_brain's specialty.

Edit: neuron2 beat me to it with a similar solution. His FieldDeinterlace(Full=False,Blend=False) also drops one of those mismatched fields and interpolates the other into a full frame. Maybe you were thinking of its default Blend=True, which would blend those 2 fields together.

jdobbs-

I wasn't being critical. The more I see of DVD-RB, the more I admire what it does.

My fear is all those people out there who (bless their hearts) don't know any better.

Me too. Hehe:

http://forum.doom9.org/showthread.php?s=&threadid=91335

On a side note, want to see a DVD of a major film that was hard telecined and encoded as Interlaced? Here's the film:

http://www.imdb.com/title/tt0212712/

NetFlix stocks it, if you'd like to take a look. All the Mei Ah DVDs are like that. I did it the other day, by IVTCing and encoding manually, and the compression gains from the lower base or stored framerate, and being able to encode it as Progressive made the resulting DVDR have better quality than the original 7.5 GB DVD of it, particularly for playback over a Progressive setup.

mrslacker
14th April 2005, 01:33
Originally posted by manono
You mentioned just running LeakKernelDeint over the whole thing, but in my opinion that's not such a good idea, as then the whole thing (all the motion parts anyway) gets deinterlaced. It looks like you did come up with a conditional deinterlacer, but I'd probably do it much more simply, with TDeint(Full=False).
...
Edit: neuron2 beat me to it with a similar solution. His FieldDeinterlace(Full=False,Blend=False) also drops one of those mismatched fields and interpolates the other into a full frame. Maybe you were thinking of its default Blend=True, which would blend those 2 fields together.

I didn't mean to suggest I ran any deinterlacer over the whole thing. Definitely not. I was trying to be as precise as possible.

Oh! I didn't realize neuron2's or your suggestion actually dropped a field. Sorry neuron2! That is ideal... what I've tried to create with a function. Perhaps I didn't try blend=false after all. So, both of these suggestions will actually drop one field? I'll have to read the docs more closely. Thanks!

Better drcl than me in your example. :D I made that naïve mistake too!
p.s. your imdb link is slightly broken

manono
14th April 2005, 02:01
Link fixed-thanks. I should test them out before posting.

FredThompson
8th October 2005, 08:58
This one is more commonly available: http://www.imdb.com/title/tt0066473/

IVTC support would be very nice.

One way to add it might be manual editing of the AVS files which are created after phase 1.

Pulldown flag could be set as a batch process between phases 2 and 3.

Seems like this would work but it's 4 AM and I'm too tired to know if I'm thinking clearly or just had a breakthrough.

The process would be obscure enough that those who know just enough to hurt themselves would be discouraged...until someone writes an automation routine to support this...

Given DVD-RB Pro processes everything as 24 fps before assembling the segments into a VOB set, how could it be "tricked" into setting framerates to 24 fps if the segments were originally 29.97?

joho83
8th October 2005, 09:41
Just so I get this right, even though if the DGIndex says that the DVD movie's frame type is interlaced, u shouldn't "check" deinterlace in the DVD-rebuilder settings nor check the "interlaced encoding" function in Quenc settings?

I find it weird that not all DVD movies are progressive...

TheSeeker
9th October 2005, 04:22
Just so I get this right, even though if the DGIndex says that the DVD movie's frame type is interlaced, u shouldn't "check" deinterlace in the DVD-rebuilder settings nor check the "interlaced encoding" function in Quenc settings?

I find it weird that not all DVD movies are progressive...


Thats correct because most of the time the hardware deinterlacers in either your tv or your dvd player will do a better job of deinterlacing than a fielddeinterlace will (which is what the deinterlace with decomb option in dvdrb uses).

Boulder
9th October 2005, 11:15
And as TV is an interlaced display, it or the standalone doesn't even need to deinterlace.

jdobbs
9th October 2005, 13:01
The reason it is so important to keep interlaced video is because there are many sources that were recorded as interlaced and each field represents a different point in time.

In progressive sources (like film) you have a whole picture that is captured at one instant and then played back on a standard TV as two fields to make it compatible. But in a truly interlaced source the second field to be displayed is not a part of one picture -- but a completely different picture captured 1/60th of a second (NTSC) later than the first field. That's the reason some progressive playback devices (like some PC players) show "combing" effects on quick movements when attempting to show it as if it was a progressive source. On a TV, though, it is presented to the viewer 1/60th of a second later -- so it looks natural.