Index: DOCS/man/en/mplayer.1 =================================================================== RCS file: /cvsroot/mplayer/main/DOCS/man/en/mplayer.1,v retrieving revision 1.905 diff -u -r1.905 mplayer.1 --- DOCS/man/en/mplayer.1 1 Mar 2005 19:59:19 -0000 1.905 +++ DOCS/man/en/mplayer.1 2 Mar 2005 03:27:35 -0000 @@ -4812,14 +4812,14 @@ The optional parameter (ivtc=1) corresponds to the dr=1 option for the detc filter, and should be used with MEncoder but not with MPlayer. As with detc, you must specify the correct output framerate (\-ofps -23.976) when using MEncoder. +24000/1001) when using MEncoder. Further development on ivtc has stopped, as the pullup and filmdint filters appear to be much more accurate. . .TP .B pullup[=jl:jr:jt:jb:sb:mp]\ Third-generation pulldown reversal (inverse telecine) filter, -capable of handling mixed hard-telecine, 24 fps progressive, and 30 +capable of handling mixed hard-telecine, 24000/1001 fps progressive, and 30000/1001 fps progressive content. The pullup filter is designed to be much more robust than detc or ivtc, by taking advantage of future context in making its decisions. @@ -4869,7 +4869,7 @@ Depending on the source MPEG, you may be fine ignoring this advice, as long as you do not see lots of "Bottom-first field" warnings. With no options it does normal inverse telecine, and should be used -together with mencoder \-fps 29.97 \-ofps 23.976. +together with mencoder \-fps 30000/1001 \-ofps 24000/1001. When this filter is used with mplayer, it will result in an uneven framerate during playback, but it is still generally better than using pp=lb or no deinterlacing at all. @@ -4945,7 +4945,7 @@ This filter is intended to find and drop those duplicates and restore the original film framerate. When using this filter, you must specify \-ofps that is 4/\:5 of the fps of the -input file (23.976 if the input is 29.97fps). +input file (24000/1001 if the input is 30000/1001 fps). The options are: .RSs .IPs pass=1|2 @@ -5050,7 +5050,7 @@ .B telecine[=start] Apply 3:2 'telecine' process to increase framerate by 20%. This most likely will not work correctly with MPlayer, but it can -be used with 'mencoder \-fps 29.97 \-ofps 29.97 \-vf telecine'. +be used with 'mencoder \-fps 30000/1001 \-ofps 30000/1001 \-vf telecine'. Both fps options are essential! (A/\:V sync will break if they are wrong.) The optional start parameter tells the filter where in the telecine @@ -5502,7 +5502,7 @@ Specify a frames per second (fps) value for the output file, which can be different from that of the source material. Must be set for variable fps (ASF, some MOV) and progressive -(29.97fps telecined MPEG) files. +(30000/1001 fps telecined MPEG) files. . .TP .B \-ovc @@ -7932,7 +7932,7 @@ Sets the video bitrate in kbit/s for MPEG-1/2 video. . .TP -.B vframerate=<23.976 | 24 | 25 | 29.97 | 30 | 50 | 59.94 | 60 > +.B vframerate=<24000/1001 | 24 | 25 | 30000/1001 | 30 | 50 | 60000/1001 | 60 > Sets the framerate for MPEG-1/2 video. . . Index: DOCS/xml/en/documentation.xml =================================================================== RCS file: /cvsroot/mplayer/main/DOCS/xml/en/documentation.xml,v retrieving revision 1.22 diff -u -r1.22 documentation.xml --- DOCS/xml/en/documentation.xml 7 Jan 2005 22:33:01 -0000 1.22 +++ DOCS/xml/en/documentation.xml 2 Mar 2005 03:27:35 -0000 @@ -141,7 +141,7 @@ FPS correction with option (useful when encoding - 29.97 fps VOB to 24 fps AVI) + 30000/1001 fps VOB to 24000/1001 fps AVI) Using our very powerful filter system (crop, expand, flip, postprocess, Index: DOCS/xml/en/mencoder.xml =================================================================== RCS file: /cvsroot/mplayer/main/DOCS/xml/en/mencoder.xml,v retrieving revision 1.38 diff -u -r1.38 mencoder.xml --- DOCS/xml/en/mencoder.xml 25 Feb 2005 23:25:57 -0000 1.38 +++ DOCS/xml/en/mencoder.xml 2 Mar 2005 03:27:38 -0000 @@ -718,12 +718,12 @@ Interlacing and Telecine - Almost all movies are shot at 24 fps. Because NTSC is 29.97 fps, some + Almost all movies are shot at 24 fps. Because NTSC is 30000/1001 fps, some processing must be done to this 24 fps video to make it run at the correct NTSC framerate. The process is called 3:2 pulldown, commonly referred to as telecine (because pulldown is often applied during the telecine process), and, naively described, it works by slowing the film down to - 23.976 fps, and repeating every fourth frame. + 24000/1001 fps, and repeating every fourth frame. @@ -746,7 +746,7 @@ For movies shot at 24 fps, the video on the NTSC DVD is either telecined - 29.97 fps, or else it is progressive 24 fps and intended to be telecined + 30000/1001, or else it is progressive 24000/1001 fps and intended to be telecined on-the-fly by a DVD player. On the other hand, TV series are usually only interlaced, not telecined. This is not a hard rule: some TV series are interlaced (such as Buffy the Vampire Slayer) whereas some are a @@ -810,7 +810,7 @@ of Secrets (widescreen edition, of course), and you want to rip this DVD so that you can add it to your Home Theatre PC. This is a region 1 DVD, so it's NTSC. The example below will still apply to PAL, except you'll - omit (because the output framerate is the + omit (because the output framerate is the same as the input framerate), and of course the crop dimensions will be different. @@ -819,7 +819,7 @@ After running , we follow the process detailed in the section How to deal with telecine and interlacing in NTSC DVDs and discover that it's - 24 fps progressive video, which means that we needn't use an inverse + 24000/1001 fps progressive video, which means that we needn't use an inverse telecine filter, such as or . @@ -888,13 +888,13 @@ We're now ready to do the two pass encode. Pass one: - mencoder dvd://1 -ofps 23.976 -oac copy -vf crop=720:352:0:62,hqdn3d=2:1:2 -ovc lavc \ + mencoder dvd://1 -ofps 24000/1001 -oac copy -vf crop=720:352:0:62,hqdn3d=2:1:2 -ovc lavc \ -lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:autoaspect:vpass=1 \ -o Harry_Potter_2.avi And pass two is the same, except that we specify : - mencoder dvd://1 -ofps 23.976 -oac copy -vf crop=720:352:0:62,hqdn3d=2:1:2 -ovc lavc \ + mencoder dvd://1 -ofps 24000/1001 -oac copy -vf crop=720:352:0:62,hqdn3d=2:1:2 -ovc lavc \ -lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:autoaspect:vpass=2 \ -o Harry_Potter_2.avi @@ -943,8 +943,10 @@ How to deal with telecine and interlacing within NTSC DVDs - + Introduction + +What is telecine? I suggest you visit this page if you don't understand much of what is written in this document: @@ -953,48 +955,82 @@ description of what telecine is. + +A note about the numbers. + + Many documents, including the guide linked above, refer to the fields per + second value of NTSC video as 59.94 and the corresponding frames per + second values as 29.97 (for telecined and interlaced) and 23.976 (for + progressive). For simplicity, some documents even round these numbers to + 60, 30, and 24. + + + + Strictly speaking, all those numbers are approximations. NTSC video is + actually 60000/1001 fields per second. From this, interlaced and + telecined video are derived to be 30000/1001 frames per second; + progressive video is 24000/1001 frames per second. + + + + The actual reason NTSC fields per second is 60000/1001 instead of just 60 + is unknown to me. + + + + Older versions of the MEncoder documentation + and many archived mailing list posts refer to 59.94, 29.97, and 23.976. + All MEncoder documentation has been updated to + use the fractional values, and you should use them too. + + + + is incorrect. + should be used instead. + + + +How telecine is used. - For technical reasons pertaining to the limitations of early - television hardware, all video intended to be displayed on an NTSC - television set must be 59.94 fields per second. Made-for-TV movies - and shows are often filmed directly at 59.94 fields per second, but - the majority of cinema is filmed at 24 or 23.976 frames per + All video intended to be displayed on an NTSC + television set must be 60000/1001 fields per second. Made-for-TV movies + and shows are often filmed directly at 60000/1001 fields per second, but + the majority of cinema is filmed at 24 or 24000/1001 frames per second. When cinematic movie DVDs are mastered, the video is then converted for television using a process called telecine. - + - On a DVD, the video is never actually stored as 59.94 fields per - second. For video that was originally 59.94, each pair of fields is - combined to form a frame, resulting in 29.97 frames per + On a DVD, the video is never actually stored as 60000/1001 fields per + second. For video that was originally 60000/1001, each pair of fields is + combined to form a frame, resulting in 30000/1001 frames per second. Hardware DVD players then read a flag embedded in the video stream to determine whether the odd- or even-numbered lines should form the first field. - Usually, 23.976 frames per second content stays as it is when + Usually, 24000/1001 frames per second content stays as it is when encoded for a DVD, and the DVD player must perform telecining on-the-fly. Sometimes, however, the video is telecined before being stored on the DVD; even though it - was originally 23.976 frames per second, it becomes 59.94 fields per - second, and is stored on the disk as 29.97 frames per second. + was originally 24000/1001 frames per second, it becomes 60000/1001 fields per + second. When it is stored on the DVD, pairs of fields are combined to form + 30000/1001 frames per second. - When looking at individual frames formed from 59.94 fields per + When looking at individual frames formed from 60000/10001 fields per second video, telecined or otherwise, interlacing is clearly visible wherever there is any motion, because one field (say, the - even-numbered lines) represents a moment in time 1/59.94th of a - second later than the other. Playing interlaced video on a computer + even-numbered lines) represents a moment in time 1/(60000/1001) + seconds later than the other. Playing interlaced video on a computer looks ugly both because the monitor is higher resolution and because the video is shown frame-after-frame instead of field-after-field. - -Notes: - +Notes: This section only applies to NTSC DVDs, and not PAL. @@ -1011,6 +1047,7 @@ [1] + How to tell what type of video you have @@ -1018,7 +1055,7 @@ Progressive - Progressive video was originally filmed at 23.976 fps, and stored + Progressive video was originally filmed at 24000/1001 fps, and stored on the DVD without alteration. @@ -1027,10 +1064,10 @@ MPlayer will print the following line as soon as the movie begins to play: - demux_mpg: 24fps progressive NTSC content detected, switching framerate. + demux_mpg: 24000/1001 fps progressive NTSC content detected, switching framerate. From this point forward, demux_mpg should never say it finds - "30fps NTSC content." + "30000/1001 fps NTSC content." @@ -1063,7 +1100,7 @@ Telecined - Telecined video was originally filmed at 23.976, but was telecined + Telecined video was originally filmed at 24000/1001, but was telecined before it was written to the DVD. @@ -1100,7 +1137,7 @@ Sometimes telecined video on DVDs is referred to as - "hard-telecine". Since hard-telecine is already 59.94 fields + "hard-telecine". Since hard-telecine is already 60000/1001 fields per second, the DVD player plays the video without any manipulation. @@ -1108,10 +1145,10 @@ Interlaced - Interlaced video was originally filmed at 59.94 fields per second, - and stored on the DVD as 29.97 frames per second. The interlacing effect + Interlaced video was originally filmed at 60000/1001 fields per second, + and stored on the DVD as 30000/1001 frames per second. The interlacing effect (often called "combing") is a result of combining pairs of - fields into frames. Each field is supposed to be 1/59.94 seconds apart, + fields into frames. Each field is supposed to be 1/(60000/1001) seconds apart, and when they are displayed simultaneously the difference is apparent. @@ -1130,18 +1167,18 @@ Mixed progressive and telecine All of a "mixed progressive and telecine" video was originally - 23.976 frames per second, but some parts of it ended up being telecined. + 24000/1001 frames per second, but some parts of it ended up being telecined. When MPlayer plays this category, it will - (often repeatedly) switch back and forth between "30fps NTSC" - and "24fps progressive NTSC". Watch the bottom of + (often repeatedly) switch back and forth between "30000/1001 fps NTSC" + and "24000/1001 fps progressive NTSC". Watch the bottom of MPlayer's output to see these messages. - You should check the "30fps NTSC" sections to make sure + You should check the "30000/1001 fps NTSC" sections to make sure they are actually telecine, and not just interlaced. @@ -1155,7 +1192,7 @@ This category looks just like "mixed progressive and telecine", - until you examine the 30fps sections and see that they don't have the + until you examine the 30000/1001 fps sections and see that they don't have the telecine pattern. @@ -1175,12 +1212,12 @@ Progressive video requires no special filtering to encode. The only parameter you need to be sure to use is - . Otherwise, MEncoder - will try to encode at 29.97 fps and duplicate frames. + . Otherwise, MEncoder + will try to encode at 30000/1001 fps and will duplicate frames. - mencoder dvd://1 -nosound -ovc lavc -ofps 23.976 + mencoder dvd://1 -nosound -ovc lavc -ofps 24000/1001 @@ -1196,7 +1233,7 @@ Telecined - Telecine can be reversed to retrieve the original 23.976 content, + Telecine can be reversed to retrieve the original 24000/1001 content, using a process called inverse-telecine. MPlayer contains several filters to accomplish this; the best filter, , is described @@ -1251,7 +1288,7 @@ MEncoder G2, but that isn't here yet. You might experience crahes. Anyway, the purpose of is to create a full frame out of each field, which - makes the framerate 59.94. The advantage of this approach is that no + makes the framerate 60000/1001. The advantage of this approach is that no data is ever lost; however, since each frame comes from only one field, the missing lines have to be interpolated somehow. There are no very good methods of generating the missing data, and so the @@ -1268,14 +1305,14 @@ and to be twice the framerate of your original source. - mencoder dvd://1 -nosound -vf tfields=2 -ovc lavc -fps 59.94 -ofps 59.94 + mencoder dvd://1 -nosound -vf tfields=2 -ovc lavc -fps 60000/1001 -ofps 60000/1001 If you plan on downscaling dramatically, you can extract and encode only one of the two fields. Of course, you'll lose half the vertical resolution, but if you plan on downscaling to at most 1/2 of the original, the loss won't matter much. The result will be a - progressive 29.97 frames per second file. The procedure is to use + progressive 30000/1001 frames per second file. The procedure is to use , then crop [1] and scale appropriately. Remember that you'll have to adjust the scale to @@ -1296,8 +1333,8 @@ rescaling; unless you really know what you're doing, inverse-telecine before cropping, too [1]. - is needed here because the output video - will be 23.976 frames per second. + is needed here because the output video + will be 24000/1001 frames per second. @@ -1311,7 +1348,7 @@ accurate method available for encoding both telecine and "mixed progressive and telecine". - mencoder dvd://1 -nosound -vf pullup,softskip -ovc lavc -ofps 23.976 + mencoder dvd://1 -nosound -vf pullup,softskip -ovc lavc -ofps 24000/1001 @@ -1324,9 +1361,9 @@ a video and makes the entire file telecined. If we follow softpulldown with either or , the final result will be entirely - progressive. is needed. + progressive. is needed. - mencoder dvd://1 -nosound -vf softpulldown,ivtc=1 -ovc lavc -ofps 23.976 + mencoder dvd://1 -nosound -vf softpulldown,ivtc=1 -ovc lavc -ofps 24000/1001 @@ -1363,10 +1400,10 @@ This option should definitely not be used if you want to eventually display the video on an interlaced device (with a TV card, for - example). If you have interlaced frames in a 23.976 frames per + example). If you have interlaced frames in a 24000/1001 frames per second video, they will be telecined along with the progressive frames. Half of the interlaced "frames" will be displayed for three - fields' duration (3/59.94 seconds), resulting in a flicking + fields' duration (3/(60000/1001) seconds), resulting in a flicking "jump back in time" effect that looks quite bad. If you even attempt this, you must use a deinterlacing filter like or @@ -1377,9 +1414,9 @@ It may also be a bad idea for progressive display, too. It will drop pairs of consecutive interlaced fields, resulting in a discontinuity that can be more visible than with the second method, which shows - some progressive frames twice. 29.97 frames per second interlaced + some progressive frames twice. 30000/1001 frames per second interlaced video is already a bit choppy because it really should be shown at - 59.94 fields per second, so the duplicate frames don't stand out as + 60000/1001 fields per second, so the duplicate frames don't stand out as much. Index: DOCS/xml/en/video.xml =================================================================== RCS file: /cvsroot/mplayer/main/DOCS/xml/en/video.xml,v retrieving revision 1.77 diff -u -r1.77 video.xml --- DOCS/xml/en/video.xml 5 Feb 2005 12:55:12 -0000 1.77 +++ DOCS/xml/en/video.xml 2 Mar 2005 03:27:38 -0000 @@ -2082,10 +2082,10 @@ that you use that unless you have problems with it. See the man page for further info about . Using lavc is highly recommended. Currently there is no way of setting the fps -of the em8300 which means that it is fixed to 29.97fps. Because of this it is +of the em8300 which means that it is fixed to 30000/1001 fps. Because of this it is highly recommended that you use -especially if you are using prebuffering. Then why 25 and not 29.97? Well, the -thing is that when you use 29.97 the picture becomes a bit jumpy. The reason for +especially if you are using prebuffering. Then why 25 and not 30000/1001? Well, the +thing is that when you use 30000/1001 the picture becomes a bit jumpy. The reason for this is unknown to us. If you set it to somewhere between 25 and 27 the picture becomes stable. For now all we can do is accept this for a fact. Index: help/help_mp-en.h =================================================================== RCS file: /cvsroot/mplayer/main/help/help_mp-en.h,v retrieving revision 1.163 diff -u -r1.163 help_mp-en.h --- help/help_mp-en.h 1 Mar 2005 20:21:58 -0000 1.163 +++ help/help_mp-en.h 2 Mar 2005 03:27:38 -0000 @@ -525,8 +525,8 @@ #define MSGTR_DemuxerInfoAlreadyPresent "Demuxer info %s already present!\n" #define MSGTR_ClipInfo "Clip info:\n" -#define MSGTR_LeaveTelecineMode "\ndemux_mpg: 30fps NTSC content detected, switching framerate.\n" -#define MSGTR_EnterTelecineMode "\ndemux_mpg: 24fps progressive NTSC content detected, switching framerate.\n" +#define MSGTR_LeaveTelecineMode "\ndemux_mpg: 30000/1001 fps NTSC content detected, switching framerate.\n" +#define MSGTR_EnterTelecineMode "\ndemux_mpg: 24000/1001 fps progressive NTSC content detected, switching framerate.\n" // dec_video.c & dec_audio.c: #define MSGTR_CantOpenCodec "Could not open codec.\n"