View Full Version : Incorrect field order problem?
scottcot
26th April 2004, 22:02
Hi, I'm capturing video from my Hi8 camcorder using VirtualDub and then encoding as mpeg2 using tmpgenc. I capture from the camcorder over the svideo or composite lines as a 720x480 interlaced AVI.
From tmpgenc, I load their encoding wizard and walk through the steps to create an NTSC DVD image. I am in the habit of clipping the garbage from the beginning and end of the AVI, and sometimes in the middle if I've left large segments garbage video.
I then take the mpeg2 and burn it to a DVD using TMPG's DVD Author and my DVD writer's burning software.
The past couple of DVDs I've burned following the above procedure have shown visual anomolies when played back on my standalone (Panasonic RP-82) DVD player. The best way I can describe the anomoly is by saying that it seems to play 2 frames forward and then 1 frame backward. The overall effect is that it looks to be out of sync, and it looks like the video is stuttering and any moderately fast motion in the video jerks back and forth.
I initially thought this might be an interlacing vs. non-interlacing problem, so I burned a test DVD with two short mpeg segments - one from an interlaced source and one from a non-interlaced version of the same source. The stuttering didn't repro for either one, and at that point I realized that my clipping habit might be leaving the first frame as a B-field rather than an A-field, and that the tmpgenc software might not be detecting this correctly.
Does this sound right? Does what I'm describing ring any other bells?
Is correcting this as simple as doing the clipping, and making sure that I always clip a multiple of 2 frames to preserve A-B fields?
Thanks,
-scott
sh03z
26th April 2004, 22:53
have you deinterlaced? (you don't need to BTW, your TV does it on the fly)
can you post your avs script if you're using one?
also, check the original mpeg's: do they play fine on your computer?
scottcot
27th April 2004, 03:29
I'm not using avisynth. I tried it with an interlaced and a deinterlaced source with no difference. The mpegs display fine on my PC no matter what. I can step through frame-by-frame on the PC and motion is smooth. Step through frame-by-frame on the standalone player and I see the jerkiness.
Looking back over previous posts (search: jerky video), I see other people reporting problems like this and field order seems the likely cause.
But - if I clip segments at the beginning, the end, or in the middle of my source AVI, how do I manually determine the field order and how do I make sure my clips in the middle don't give me a field order like ABABAABAB? I'm assuming that by clipping video out of the source, I'm messing with the field order - so if I'm going to do that (which I'd like to), how do I patch it up and does some encoding software do this for you?
-scott
violao
27th April 2004, 09:03
Originally posted by scottcot
But - if I clip segments at the beginning, the end, or in the middle of my source AVI, how do I manually determine the field order and how do I make sure my clips in the middle don't give me a field order like ABABAABAB?
:confused: Not sure what you mean by clipping, but if you captured to 25/29,97 fps interlaced, and then trimmed some FRAMES off, then you would have trimmed BOTH fields. In interlaced video a frame consists of 2 fields, so if you delete a frame, you delete both fields, so there's no way you would mess your field order by just deleting frames. Unless you separated fields (like in bob deinterlacing) before and work on individual fields, which I doubt.
Do try avisynth. It is by far easiest and most flexible video processing tool, ideal for what you are trying to do (pre-processing prior to encoding).
BTW, if you also crop few lines from top/bottom, make sure that you always crop even number of lines from both top and bottom. If you crop odd lines from either top or bottom - that WOULD mess the field order.
@sh03z, TVs do not deinterlace. TV is an interlaced display, it displays individual fields in different times. That's the reason you can't see interlacing artifacts on TVs, not "TV deinterlacing".
scottcot
27th April 2004, 18:21
Yes, by "clip" I meant trimming or removing frames from anywhere in my source.
I guess I need to go understand fields better, technically. But it sounds like I don't need to do that to solve my problem immediately.
So based on what you say, and if the motion problem I'm seeing is really field-order, how do -I- determine field order conclusively if my encoding software isn't doing it right?
I always follow the same process:
1. Capture from camera to AVI
2. Trim the source
3. Encode to mpeg using the wizard and let it figure everything out
4. Burn to DVD
The one time I didn't do #2, I didn't see the jerky motion. All other burns I saw the jerkiness.
Thanks for the help so far.
-scott
violao
28th April 2004, 08:50
Originally posted by scottcot
So based on what you say, and if the motion problem I'm seeing is really field-order, how do -I- determine field order conclusively if my encoding software isn't doing it right?
Easy for source avi. Make the following Avisynth script:
AviSource("source_clip.avi")
AssumeTFF().SeparateFields()
Open this in VirtualDub or similar AVI editor and step through motion area of your clip. If everything looks fine then you have TFF. If it goes in forward-backward pattern then it's BFF. Doublecheck with:
AviSource("source_clip.avi")
AssumeBFF().SeparateFields()
You see, you hardly can avoid Avisynth.
scottcot
29th April 2004, 18:52
Thanks :) I'll learn avisynth.
Why would field order vary? Is it the source recording device that sets it, is it the capture card that sets it, does it depend on random gamma particles or CPU errata?
SomeJoe
29th April 2004, 19:54
Originally posted by scottcot
Is it the source recording device that sets it, is it the capture card that sets it, does it depend on random gamma particles or CPU errata?
The codec is what determines field order.
Actual analog video traveling over an analog medium (composite, S-Video, RF) does not have frames. It is only an endless stream of alternating fields.
Only when a computer converts analog video into a digital form and then groups two fields together into a "frame" do we get the notion of field order. It is the grouping that determines what the field order will be.
One particular DV codec may take a bottom field and group it with the next top field to make a frame. This codec would be bottom field first. A different DV codec might take a top field and group it with the next bottom field to make a frame. That codec would be top field first.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.