Interlaced field order for DVD movies

Discussion in 'MPEG-1 and MPEG-2 encoding (AVI to DVD)' started by BigOlly, Jan 1, 2007.

  1. BigOlly

    BigOlly Member

    Joined:
    Oct 12, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    11
    Hi everyone, this is my first post at this forum, though I have visited at various times for useful information.

    I'm currently working on creating a fan-cut of Superman II.

    After backing up the DVD files on my PC I used a combination of DVD2AVI and TMPGEnc to create an mpeg-2 movie file which I could then go about editing in Ulead Video Studio.

    I know there are easier and faster ways for going about this (the program Womble always gets a mention) however this is just the method I've always used.

    DVD2AVI analysed the movie as "progressive" type, so when I encoded my file in TMPGEnc to an mpeg-2 "interlaced" movie I thought the field order was irrelevant, (and left it as top field first).

    Deep into my edit I outputted my movie and put it onto disc to review. It quickly became obvious that the field order was wrong as the picture was very jumpy.

    Rather than going back to TMPGEnc and starting over again (with bottom field first), I elected to simply change the field order in the project settings of Ulead, figuring that a new mpeg-2 file needed to be created anyway to link all my edited clips together.

    This worked and my movie now plays fine....

    Having said all this I'm just interested to know two things;

    - Firstly if switching the field order in my editing program will have resulted in a loss of picture quality? Particularly as I'd like to know if it would be beneficial to start over in TMPGEnc.

    - Secondly just how do progressive DVD movies work? Obviously TV sets display in interlaced so how does everything come together?

    Any information that could be provided would be greatly appreciated.
     
  2. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    This is a lot more complicated subject than it should be.

    1. The only kind of output specified in the DVD-Video specs is interlaced.

    2. Film content that's put on an NTSC DVD can either be encoded progressive at 23.976fps with pulldown flags added or encoded interlaced with the right fields duplicated to create a 29.97fps interlaced stream.

    2a. Pulldown tells the player to repeat certain fields to compensate for the difference between film frames (24fps - or 23.976fps for pulldown purposes) and NTSC fields (59.58 fields per second). Consider the following sequence of film frames (T denotes the top field during interlaced playback and B denotes the bottom field)

    Code:
     1T  2T  3T  4T  5T 
     1B  2B  3B  4B  5B 
    When pulldown is applied:
    Code:
     1T  1T  2T  3T  4T  5T
     1B  2B  3B  4B  4B  5B 
    3. Since the DVD-Video specs don't allow for progressive video it's entirely up to the DVD player and TV manufacturers to determine how progressive playback is acheived. Different players support different types of deinterlacing. The better ones use multiple methods and can adapt to the specific video being played on the fly.

    3a. The easiest deinterlacing to recover film frames is to simply read the pulldown flags and use them to reconstruct the original progressive frames. Unfortunately this doesn't work if the pulldown was done before encoding and therefore the video is really interlaced.

    3b. Another method is to look for repeating fields in interlaced video to recognize pulldown applied before encoding. If a pattern is detected the player can then attempt to recover the original film frames. This won't give you as good a picture because there are multiple copies of the duplicated fields, and the player has to recognize that they're the same and then pick the best version to reconstruct the frame with.

    3c. If the video is interlaced and not originally from a film source (ie real 29.97fps interlaced content) the player can blend the fields in each frame together. This technique by itself will tend to give you the lowest quality progressive picture possible.

    3d. Instead of simply blending, some players will bob the video. This involves treating each field as an individual frame and moving every other field up one line to match top and bottom fields to the same spatial point of reference. An entire frame is then made by interpolating (mathematically guessing the position of each pixel in the composite frame.

    3e. Motion Adaptive Deinterlacing can be used to decide what to do with a frame. If you have a frame of true interlaced video with no motion between the top and bottom fields there's no need to do anything except combine the fields into a single picture. If there's motion some other method gets used.

    3f. The best players use a combination of techniques. If there are pulldown flags they get used first. If there aren't flags, pulldown patterns are searched for. If there isn't any pulldown pattern they will default to whatever they would use for pure video - hopefully motion adaptive deinterlacing.

    3g. From what I remember, most progressive scan DVD players (or at least most of the ones around when I was researching this a couple of years ago) still send film content to your TV at 29.97fps. The difference is that entire frames are duplicated instead of individual fields. This is still an improvement for a number of reasons.

    4. As long as their is motion in your video field order makes a big difference for actual interlaced video. Not so much for pulldown since, as you can see from my example, field order is always off part of the time. Think of it this way. If an object moves from left to right in the video, and it's in a different position in every field, using an incorrect field order would make the object move left, then right, then left, then right instead of maintaining the same direction.

    4a. If your video is progressive with pulldown flags the order doesn't matter as long as it's consistent. The most important thing is that the pattern stays constant.

    4b. If your source footage (ie before MPEG encoding) was interlaced then you need to keep the same field order as the original footage. For example, if you started from an NTSC DVD it will almost always be TFF (top field first) but if you started with DV footage it will be BFF (bottom field first). For the reasons stated above the field order for true interlaced material is important, but if you screw it up on your encode it can be changed without re-encoding. This is very similar to adding pulldown flags as you're just telling the decoder to display fields in a different order. There are several programs that can do it. The only one that comes to mind off the top of my head is ReStream.

    5. Every time you re-encode a file in any format that's not lossless you'll lose quality. You may not always see the difference on your particular playback equipment, but it always happens.
     
  3. BigOlly

    BigOlly Member

    Joined:
    Oct 12, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    11
    I'm working from a PAL DVD and the source is progressive.

    That's what I've always thought, which is why I was surprised that reversing the field order stopped the picture from jumping around.

    This I understand, however would further quality be lost as a result of changing the field order?
     
  4. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    Are you sure the video is actually encoded progressive?

    This I understand, however would further quality be lost as a result of changing the field order?[/quote]
    Only for interlaced sources.
     
  5. BigOlly

    BigOlly Member

    Joined:
    Oct 12, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    11
    File is definitely progressive, well at least according to DVD2AVI.

    When creating my mpeg-2 file in TMPGEnc I selected the source as progressive, but the output file as Interlace.

    When exporting my edited file in Ulead I found reversing the field order fixed the jumpy picture.
     
  6. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    It doesn't sound like it got encoded with pulldown or even true interlaced with a pulldown pattern. You can test this by stepping through the video one frame at a time. If you see 1 frame that looks progressive followed by 3 that look interlaced.
     

Share This Page