Each frame from an interlaced source consists of two fields, a top field and the bottom field. Exactly how these fields are stored depends on the video encoding used. When the top field is displayed it fills every other horizontal scan line starting with the top most line in the image. When the bottom field is displayed it fills every other horizontal scan line starting with the scan line second from the top.
Before burning a file to a SVCD, DVD or Blu-ray disk it is important to check that the interlacing order is correct because if the order is not correct, the video will not play smoothly.
When you see this combing effect you have interlaced or telecined video. In either case, the first thing to do is determine the field order. To do this play the video with
$ mplayer -vf tfields=1:0 video.mpgIf the motion looks smooth then the field dominance is top field first; if the motion is not smooth it is bottom field first. To verify the field order play the video again with
$ mplayer -vf tfields=1:1 video.mpgIf the motion did not play smoothly before then it should look smooth now; if it was smooth before then it should no longer be smooth.
A related way to check the interlacing order of the video is with ffmpeg and mjpegtools using the method given in When to Deinterlace a Video. Convert your clip to progressive video with a 59.96 frame rate in two different ways: once as if it were interlaced bottom field first and again as if it were interlaced top field first. Play back each progresive video file. The file that plays smoothly is the one that was deinterlaced with the correct interlacing order.
$ mediainfo video.mpgThe output should contain lines like
Scan type : Interlaced Scan order : Bottom Field FirstCheck that the interlacing order it correct. Note that if the video format is Digital Video then the scan order is not reported but should be assumed to be bottom field first.
Reencode the video only as a last resort. The program restream can be used to change the interlacing flags in a elementary mpeg2 video stream on Windows or Wine. For Linux I have created a modified version of dgpulldown which can also be used to change the interlacing flags in an elementary mpeg2 video stream. Using this modified version of dgpulldown, one can flag an interlaced m2v file as top field first with the command
dgpulldown input.m2v -interlaced -o output.m2vSimilarly, one can flag an interlaced m2v file as bottom field first with the command
dgpulldown input.m2v -interlaced -bff -o output.m2vComments on the modification can be sent to firstname.lastname@example.org. Much thanks goes to Donald Graft who wrote the Windows code for dgpulldown and released it under the GNU GPL.
Note the hrd_pd_interlace patch is needed for x264 to include interlacing flags in the encoded h264 video stream. The Toshiba A2 will randomly choose an interlacing order if the video stream is not properly flagged. More information on encoding interlaced h264 video is given at H264 HD Video Workflow.