>> Check cinelerra --- see what it says about your video's field order. (If >> it doesn't say anything, then you *know* it is broken.) The source DVD >> is not necessarily bottom-field first (or even top-field first); if not, >> cinelerra needs to account for that when it produces a DV file. > >Ok, another thing to look into once I have the time. I'm not sure cinelerra >provides this kind of info on the input stream - I might have to put in a >few strategic printf()s to get the info out. > >Is there a way of telling how a DVD has been encoded in terms of field >order? > >> How did you do the "Grabbing frames from this Qt/DV file..."? How did you >> step through the fields? (I'm quite jaded when it comes to video tools, >> and hence doubt that some software actually let you do that.) > >I used the utilities from mjpegtools (whose names elude me at present) in >pretty much the same way as described in the mjpeg howto. In short, the >mjpegtools output the fields as individual pnm files which were loaded into >xv for viewing.
Yep --- that'll work. Remember that there are two parities involved: temporal and spatial. Debugging the temporal order (addressed in the MJPEG Howto): Find a section of the stream which has a lot of side-to-side motion, and pass it through "y4mtoppm". This will dump each field as an individual PPM image. When cycling through the images, the horizontal motion should look relatively smooth. If not, the "first vs. second" ordering is messed up. Debugging the spatial order: Find a section of the stream which has little motion and a lot of stark diagonal lines, and pass it through "y4mtoppm -L". This will dump each complete frame as a PPM image. Then, examine diagonal edges closely (zoom in with your viewer)... They should look relatively continuous. If pairs of lines look transposed, then the "top vs. bottom" ordering is messed up. In the YUV4MPEG2 stream, the spatial order is implicit in the construction of the frame, since frames are transmitted as a unit with the fields interleaved. DV is the same, and MPEG-2 is more or less the same for "frame pictures". On the other hand, MJPEG streams are sequences of independent fields, so the temporal order is implicit, but the spatial order is described in the header. The "I" tag in the YUV4MPEG2 header, and the "-z" flag to mpeg2enc, affect the temporal interpretation of the stream only, i.e. whether the known-to-be top-field should be shown first or last. If the fields are screwed up spatially (a problem which would go all the way back to how the DV stream was generated), you'll have to actually flip the scanlines to fix it. There are tools which do this; for example, "y4mscaler -S mode=lineswitch". -matt m. ------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 _______________________________________________ Mjpeg-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mjpeg-users