I will shortly be taking on the task of encoding all of my DVDs into video files (I have decided on H.264 + Matroska), and as with many of you, I am trying to decide what to do with interlaced content. Please share your thoughts with me on this: In making decisions, my primary guide is the idea of preserving the original format of the film/video -for hard pulldown/telecined content, IVTC is the way to go for me. -for pure interlaced NTSC content, the video was originally meant to be played back at 59.94 fields per second. I have seen two methods of "faking" this in progressive playback that I like. The first is to do a blend deinterlace at 29.97 frames/second, the second is to bob the fields into frames and play back at 59.94. These methods are good, but they're not perfect. In past discussions such as this (and there have been many, I know) some people have claimed that the best thing to do is just leave it interlaced. To me this is a great solution IF (and only if) it can actually be played back non-progressively (i.e. have the TV set, computer monitor or handheld device actually draw just the odd lines, then the even ones, etc). Otherwise you're either relying on decoder deinterlacing or you're just watching a jaggy mess. Personally, I do not like the idea of relying on the decoder to do any such thing. So, is it at all possible to flag a video for interlaced playback? I have the impression that many screens can't even do this. HDTV sets obviously can (right? they're not just deinterlacing TV or something?), but is there any way to tell them to do this for video files? Assuming that's not possible: An idea occured to me, regarding the best way to "fake" this sort of playback on progressive monitors. I'm sure someone out there has tried this, but I've never seen it mentioned in posts before. What if you encoded the video at 59.94fps, encoding the whole frame each time but only changing one field per frame? So if the original video was: 1t 2t 3t 4t 5t 1b 2b 3b 4b 5b bobbing to 59.94 would be: 1t 1b 2t 2b 3t 3b 4t 4b 5t 5b 1t 1b 2t 2b 3t 3b 4t 4b 5t 5b but what I am suggesting is: 1t 1t 2t 2t 3t 3t 4t 4t 5t 5t -- 1b 1b 2b 2b 3b 3b 4b 4b 5b Is this worth trying, or does it still end up looking like an interlaced mess?
You either encode as progressive or encode as interlaced: That's the only "flagging" the goes on really (ignoring 24PsF or hard coded telecine). Also, what you suggest just won't work. You're going to end up with a really screwed up output. I'll post an example in a few mins of what it'll look like. Just stick with either: 1) Encode as 60i 2) Use a high quality deinterlacer to smart-bob it to 60p (TGMC, MCBob, MVBob, etc)
Depending on your hardware and how you set it up, your system might do a couple of different things, in order of quality: 1) 30i (worst) 2) Dumb bob to 30p 3) Dumb bob to 60p 4) Smart bob to 30p 5) Smart bob to 60p (best) If you have hardware acceleration on your GPU, you'll likely get 4 or 5. Unless you have a GPU, the output will probably be a soft dumb bob. Like Jay Bee said, if you have a CRT TV they can handle interlaced signals perfectly fine. If it's any other kind (LCD, Plasma, DLP, etc), then it has to use it's own built in deinterlacer which could be very good or absolute crap.
Thank you for your responses - I hadn't realized that non-CRT displays were always progressive. So, even if my idea worked, each frame would end up getting deinterlaced by most hardware anyway... hrm. Sagekilla, when you say "encode as 60i" what exactly do you mean? If I just encode the original source without deinterlacing then isn't it 30i, since it's 30 interlaced frames? I would like to implement my idea with AVIsynth, just to see what it looks like. I'm not very handy with AVIsynth, maybe someone could help me? Here's what I think might be easiest: -load the video clip in two streams, one with just the top fields, and one with just the bottom. -duplicate every field/frame in each stream, and add a single field/frame of black to the beginning of the second stream. So the first stream would be: 1t 1t 2t 2t 3t 3t 4t 4t 5t 5t the second would be: bk 1b 1b 2b 2b 3b 3b 4b 4b 5b 5b -interleave the streams together, to create a single stream: 1t bk 1t 1b 2t 1b 2t 2b 3t 2b 3t 3b etc -weave the fields back into frames, and you should end up with what I want. So, what might the codespeak for all that be? Thanks in advance!
Sorry, I meant encode as 30i. I was probably on drugs or something when I wrote 60i. Also, as I said before, what you think "might work" would look very screwed up. What you're essentially doing is temporally shifting all bottom fields by one, which gives a VERY bad looking image. Explanation: Each field is taken from a distinct time. For four fields, t0, b0, t1, b1 you have four times each was taken at: t0 = 1/30s b0 = 2/30s t1 = 3/30s b1 = 4/30s I know what you're thinking but since each is temporally distinct you can't just shift a field back or forward and expect it to come out right. Can't figure out the exacts of it (for good reason, there's no reason to do what you suggest) but it looks like this: Code:
Hrm, I don't think I've explained myself properly. Regarding your explanation about each field being taken from a distinct time, I assume you meant: t0 = 1/60s b0 = 2/60s t1 = 3/60s b1 = 4/60s That is exactly what I am trying to recapture. The idea is to leave the top fields where they are temporally, but shift the bottom fields 1/60 (NOT 1/30) so that they assume their proper temporal location. I have managed to piece together a script which is almost exactly what I want. It's clumsy, but... stream1 = mpeg2source("x").SeparateFields.SelectEven stream2 = mpeg2source("x").SeparateFields.SelectOdd dupstr1 = Interleave(stream1, stream1).DeleteFrame(0) dupstr2 = Interleave(stream2, stream2) stream = Interleave(dupstr1, dupstr2).Weave It's hard to tell by just looking, but each time you step through a frame, only a single field of the picture is actually changing. The minor problem is that, rather than deleting the first frame from the "top" stream, I would rather be adding a black frame to the "bottom" stream. When I try BlankClip it gives me grief about audio streams being present in only one of the clips. Otherwise, this is exactly what I want. The major problem is that I can't get this script to encode. I'm trying it with DivX through Gordian Knot (which is what I'm currently familiar with), and it's telling me that the "source image format is not acceptable". So just to clarify, I realize that any given frame of this 60i output would look just as interlaced as the 30i. What I am trying to do is recreate the experience of watching 60 fields per second in a brave new world that only speaks in whole frames. This is based on the assumption that the "60 fields" thing always looked okay on TVs when I was growing up, and in the end, that was the way it was meant to be played back.
Hm, your code still isn't working for me. There are also some conceptual problems with it: -it never splits the frames into fields -it never duplicates the fields -it adds black to the wrong stream I have managed to get the black frame thing working by using my clip as a template for BlankClip. This code is exactly what I want: Code:
------------------------ 1993 325i - Jim C chip, ECIS CAIS, BMP Intake, K&N, fan delete. *SOLD* 95///M3 - Engine/Exhaust: Underdrive Pulley, Port & Polished Intake, ECIS Heat Shield, BMP Intake, 9" K&N Filter Charger
If I understand you right you are trying to create a deinterlacer that simulates the physics of a CRT. Nice idea but it won't look good. The physical effect you are missing is that by the time the new field arrives on the screen, the old field will have faded quite a bit on the CRT. Your method mixes together two fields that don't temporally belong together. To simulate one field fading away you would need much higher update rates for the LCD display, so that you could go through several steps of fading in 1/60 of a second. This is one reason why deinterlacers don't try to simulate CRT physics. There are many deinterlacers out there that will give you excellent results though, f. ex. mvbob or ATI's Vector Adaptive deinterlacing (don't know what Nvidia's equivalent is called).
------------------------ (CURRENT)'05 Mercedes-Benz C55 AMG Car: Alabaster White
So wait, progressive TVs always deinterlace, regardless of whether the material is telecined or really interlaced? Or do they attempt to IVTC and then deinterlace on combing like TFM?
Depending on the source, telecined material is either native 23.976 fps with soft pulldown (flags rearrange the stream to 30 fps) which gets removed anyway by nearly every source, or hard pulldown which still gets removed in most hardware or software players. So I can't imagine a case where telecined material wouldn't have the pulldown removed.