The easy way to understand all this is that the -F flag specifies the rate at which the decoder outputs *decoded images* for display.
This is not always the same as the rate at which encode images arrive and are decoded because of the 3:2 pulldown to display 24Hz Movie material for display on 60Hz interlaced TV equipment. Here frames arrive and are decoded at (on average) 24 frames/sec. However alternate decoded images are displayed for 2/2 frame or 3/2 frame intervals. Whats going out across the video cable to the TV is: Frame 0: TBT Frame 1: BT Frame 2: BTB Frame 3: TB Where T is the top field (even lines of frame) and B is bottom field (odd lines of frame). > I guess my confusion is, that the resulting mpeg stream is a fully > compliant 29.97 interlaced stream, and is played as such by players > that don't know about pull down, but these repeat field flags can be > added, detected and removed easily. I don't quite understand. The point is the compressed MPEG stream is (on average) 24000/1001 Hz. The video stream produced by the MPEG decoder is 30000/1001Hz. The -F flag sets what the encoder tells the decoder the rate *decoded images* should be output rate should be. Hence, the correct combination for 30ish-Hz 3:2 pulldown playback of 24Hz 'Movie' material is -F 4 -p! If you want to play 24Hz material at 24Hz you want -F 1 (and no -p). Aside: on a 'progressive' DVD player and TV all that happens is that for each T or B both T *and* B are sent. If you have a good progressive TV the motion judder that results from this process is correct by some really fancy real-time motion-compensated estimation of what the frame would have looked like at an even playback rate! > And I am also guessing that the repeat field flags are distinct > enough for players, such as mplayer, to say, hey this is really a > 23.976 progressive steram, I'll play it as such. I've seen mpeg > files that swap between 29.97 and 23.976 with pulldown. Some of the > video is in 23.976 progressive and some is 29.97 interlaced, mplayer > can detect these changes and will change it's playback mid stream. Each coded picture literally has a couple of bits in its header which tell the decoder which of the four output patterns should be used. Hence it is possible to switch between 3:2 pulldown display of 24Hz material to 'normal' display of 30Hz material literally from frame to frame. Actually, it can even be done field-to-field. MPEG is very flexible in this regard. To make a completely correct MPEG stream some other bits in sequence headers may also need to be adjusted. The multiplexing process additionally uses the bits to generate decode and display timestamps for each picture that codes essentially the same information. Some players use the time stamps some use the bits to decide what to do frame-by-frame. Andrew ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Mjpeg-users mailing list Mjpeg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mjpeg-users