comparison DOCS/xml/en/mencoder.xml @ 14734:0b91f9428c4d

Update the MEncoder telecine documentation. patch by Corey Hickey <bugfood-ml at fatooh dot org>
author diego
date Sat, 19 Feb 2005 14:35:46 +0000
parents a4f2691c0109
children 37112d48fb50
comparison
equal deleted inserted replaced
14733:04cd0fc0a425 14734:0b91f9428c4d
627 If you use <option>vqscale=2</option>, then you're wasting bits. If you 627 If you use <option>vqscale=2</option>, then you're wasting bits. If you
628 use <option>vqscale=3</option>, then you're not getting the highest 628 use <option>vqscale=3</option>, then you're not getting the highest
629 quality rip. Suppose you rip a DVD at <option>vqscale=3</option>, and 629 quality rip. Suppose you rip a DVD at <option>vqscale=3</option>, and
630 the result is 1800Kbit. If you do a two pass encode with 630 the result is 1800Kbit. If you do a two pass encode with
631 <option>vbitrate=1800</option>, the resulting video will have <emphasis 631 <option>vbitrate=1800</option>, the resulting video will have <emphasis
632 role="bold">higher quality</emphasis> for the <emphasis role="bold">same 632 role="bold">higher quality</emphasis> for the
633 bitrate</emphasis>. 633 <emphasis role="bold">same bitrate</emphasis>.
634 </para> 634 </para>
635 635
636 <para> 636 <para>
637 Since you're now convinced that two pass is the way to go, the real 637 Since you're now convinced that two pass is the way to go, the real
638 question now is what bitrate to use? The answer is that there's no 638 question now is what bitrate to use? The answer is that there's no
752 are interlaced (such as Buffy the Vampire Slayer) whereas some are a 752 are interlaced (such as Buffy the Vampire Slayer) whereas some are a
753 mixture of progressive and interlaced (such as Angel, or 24). 753 mixture of progressive and interlaced (such as Angel, or 24).
754 </para> 754 </para>
755 755
756 <para> 756 <para>
757 It's highly recommended that you read the section on <link 757 It's highly recommended that you read the section on
758 linkend="menc-feat-telecine">How to deal with telecine and interlacing 758 <link linkend="menc-feat-telecine">How to deal with telecine and interlacing in NTSC DVDs</link>
759 in NTSC DVDs</link> to learn how to handle the different possibilities. 759 to learn how to handle the different possibilities.
760 </para> 760 </para>
761 761
762 <para> 762 <para>
763 However, if you're mostly just ripping movies, likely you're either 763 However, if you're mostly just ripping movies, likely you're either
764 dealing with 24 fps progressive or telecined video, in which case you can 764 dealing with 24 fps progressive or telecined video, in which case you can
1034 </para> 1034 </para>
1035 1035
1036 <para> 1036 <para>
1037 When you watch progressive video, you should never see any 1037 When you watch progressive video, you should never see any
1038 interlacing. Beware, however, because sometimes there is a tiny bit 1038 interlacing. Beware, however, because sometimes there is a tiny bit
1039 of telecine mixed in, where you wouldn't expect. I've encountered TV 1039 of telecine mixed in where you wouldn't expect. I've encountered TV
1040 show DVDs that have one second of telecine at every scene change, or 1040 show DVDs that have one second of telecine at every scene change, or
1041 at seemingly random places. I once watched a DVD that had a 1041 at seemingly random places. I once watched a DVD that had a
1042 progressive first half, and the second half was telecined. If you 1042 progressive first half, and the second half was telecined. If you
1043 want to be <emphasis>really</emphasis> thorough, you can scan the 1043 want to be <emphasis>really</emphasis> thorough, you can scan the
1044 entire movie: 1044 entire movie:
1052 immediately above will show you the time at which the change 1052 immediately above will show you the time at which the change
1053 occurred. 1053 occurred.
1054 </para> 1054 </para>
1055 1055
1056 <para> 1056 <para>
1057 Sometimes progressive video is referred to as &quot;soft-telecine&quot; 1057 Sometimes progressive video on DVDs is referred to as
1058 because it is intended to be telecined by the DVD player. 1058 &quot;soft-telecine&quot; because it is intended to
1059 be telecined by the DVD player.
1059 </para> 1060 </para>
1060 </sect3> 1061 </sect3>
1061 1062
1062 <sect3 id="menc-feat-telecine-ident-telecined"> 1063 <sect3 id="menc-feat-telecine-ident-telecined">
1063 <title>Telecined</title> 1064 <title>Telecined</title>
1075 Watching a telecined video, you will see interlacing artifacts that 1076 Watching a telecined video, you will see interlacing artifacts that
1076 seem to &quot;blink&quot;: they repeatedly appear and disappear. 1077 seem to &quot;blink&quot;: they repeatedly appear and disappear.
1077 You can look closely at this by 1078 You can look closely at this by
1078 <orderedlist> 1079 <orderedlist>
1079 <listitem> 1080 <listitem>
1080 <screen>mplayer dvd://1 -speed 0.1</screen> 1081 <screen>mplayer dvd://1</screen>
1081 </listitem> 1082 </listitem>
1082 <listitem><para> 1083 <listitem><para>
1083 Seek to a part with motion. 1084 Seek to a part with motion.
1084 </para></listitem> 1085 </para></listitem>
1085 <listitem><para> 1086 <listitem><para>
1087 Use the <keycap>.</keycap> key to step forward one frame at a time.
1088 </para></listitem>
1089 <listitem><para>
1086 Look at the pattern of interlaced-looking and progressive-looking 1090 Look at the pattern of interlaced-looking and progressive-looking
1087 frames. If the pattern you see is PPPII,PPPII,PPPII,... then the 1091 frames. If the pattern you see is PPPII,PPPII,PPPII,... then the
1088 video is telecined. If you see some other pattern, then the video 1092 video is telecined. If you see some other pattern, then the video
1089 may have been telecined using some non-standard method and 1093 may have been telecined using some non-standard method;
1090 <application>MEncoder</application> cannot losslessly convert it 1094 <application>MEncoder</application> cannot losslessly convert
1091 to progressive. If you don't see any pattern at all, then it is 1095 non-standard telecine to progressive. If you don't see any
1092 most likely interlaced. 1096 pattern at all, then it is most likely interlaced.
1093 </para></listitem> 1097 </para></listitem>
1094 </orderedlist> 1098 </orderedlist>
1095 </para> 1099 </para>
1096 1100
1097 <para> 1101 <para>
1098 Sometimes telecined video is referred to as &quot;hard-telecine&quot;. 1102 Sometimes telecined video on DVDs is referred to as
1103 &quot;hard-telecine&quot;. Since hard-telecine is already 59.94 fields
1104 per second, the DVD player plays the video without any manipulation.
1099 </para> 1105 </para>
1100 </sect3> 1106 </sect3>
1101 1107
1102 <sect3 id="menc-feat-telecine-ident-interlaced"> 1108 <sect3 id="menc-feat-telecine-ident-interlaced">
1103 <title>Interlaced</title> 1109 <title>Interlaced</title>
1104 <para> 1110 <para>
1105
1106 Interlaced video was originally filmed at 59.94 fields per second, 1111 Interlaced video was originally filmed at 59.94 fields per second,
1107 and stored on the DVD as 29.97 frames per second. The interlacing is 1112 and stored on the DVD as 29.97 frames per second. The interlacing effect
1108 a result of combining pairs of fields into frames, because within 1113 (often called &quot;combing&quot;) is a result of combining pairs of
1109 each frame, each field is 1/59.94 seconds apart. 1114 fields into frames. Each field is supposed to be 1/59.94 seconds apart,
1115 and when they are displayed simultaneously the difference is apparent.
1110 </para> 1116 </para>
1111 1117
1112 <para> 1118 <para>
1113 As with telecined video, <application>MPlayer</application> should 1119 As with telecined video, <application>MPlayer</application> should
1114 not ever report any framerate changes when playing interlaced content. 1120 not ever report any framerate changes when playing interlaced content.
1115 </para> 1121 </para>
1116 1122
1117 <para> 1123 <para>
1118 When you view an interlaced video closely with <option>-speed 0.1</option>, 1124 When you view an interlaced video closely by frame-stepping with the
1119 you will see that every single frame is interlaced. 1125 <keycap>.</keycap> key, you will see that every single frame is interlaced.
1120 </para> 1126 </para>
1121 </sect3> 1127 </sect3>
1122 1128
1123 <sect3 id="menc-feat-telecine-ident-mixedpt"> 1129 <sect3 id="menc-feat-telecine-ident-mixedpt">
1124 <title>Mixed progressive and telecine</title> 1130 <title>Mixed progressive and telecine</title>
1127 23.976 frames per second, but some parts of it ended up being telecined. 1133 23.976 frames per second, but some parts of it ended up being telecined.
1128 </para> 1134 </para>
1129 1135
1130 <para> 1136 <para>
1131 When <application>MPlayer</application> plays this category, it will 1137 When <application>MPlayer</application> plays this category, it will
1132 (often repeatedly) switch back and forth between &quot;30fps 1138 (often repeatedly) switch back and forth between &quot;30fps NTSC&quot;
1133 NTSC&quot; and &quot;24fps progressive NTSC&quot;. Watch the bottom of 1139 and &quot;24fps progressive NTSC&quot;. Watch the bottom of
1134 <application>MPlayer</application>'s output to see these messages. 1140 <application>MPlayer</application>'s output to see these messages.
1135 </para> 1141 </para>
1136 1142
1137 <para> 1143 <para>
1138 You should check the &quot;30fps NTSC&quot; sections to make sure 1144 You should check the &quot;30fps NTSC&quot; sections to make sure
1174 </para> 1180 </para>
1175 1181
1176 <para> 1182 <para>
1177 <screen>mencoder dvd://1 -nosound -ovc lavc -ofps 23.976</screen> 1183 <screen>mencoder dvd://1 -nosound -ovc lavc -ofps 23.976</screen>
1178 </para> 1184 </para>
1185
1186 <para>
1187 It is often the case, however, that a video that looks progressive
1188 actually has very short parts of telecine mixed in. Unless you are
1189 sure, it is safest to treat the video as
1190 <link linkend="menc-feat-telecine-encode-mixedpt">mixed progressive and telecine</link>.
1191 The performance loss is small
1192 <link linkend="menc-feat-telecine-footnotes">[3]</link>.
1193 </para>
1179 </sect3> 1194 </sect3>
1180 1195
1181 <sect3 id="menc-feat-telecine-encode-telecined"> 1196 <sect3 id="menc-feat-telecine-encode-telecined">
1182 <title>Telecined</title> 1197 <title>Telecined</title>
1183 <para> 1198 <para>
1184 Telecine can be reversed to retrieve the original 23.976 content, 1199 Telecine can be reversed to retrieve the original 23.976 content,
1185 using a process called inverse-telecine. 1200 using a process called inverse-telecine.
1186 <application>MPlayer</application> contains two filters to 1201 <application>MPlayer</application> contains several filters to
1187 accomplish this: <option>detc</option> and 1202 accomplish this; the best filter, <option>pullup</option>, is described
1188 <option>ivtc</option>. You can read the manual page to see their 1203 in the <link linkend="menc-feat-telecine-encode-mixedpt">mixed
1189 differences, but for DVDs I've never had a problem with 1204 progressive and telecine</link> section.
1190 <option>ivtc</option>. Note that you should
1191 <emphasis role="bold">always</emphasis> inverse-telecine before any
1192 rescaling; unless you really know what you're doing,
1193 inverse-telecine before cropping, too
1194 <link linkend="menc-feat-telecine-footnotes">[1]</link>. Again,
1195 <option>-ofps 23.976</option> is needed, too.
1196 </para>
1197
1198 <para>
1199 <screen>mencoder dvd://1 -nosound -vf ivtc=1 -ovc lavc -ofps 23.976</screen>
1200 </para> 1205 </para>
1201 </sect3> 1206 </sect3>
1202 1207
1203 <sect3 id="menc-feat-telecine-encode-interlaced"> 1208 <sect3 id="menc-feat-telecine-encode-interlaced">
1204 <title>Interlaced</title> 1209 <title>Interlaced</title>
1264 framerate of your original source. 1269 framerate of your original source.
1265 1270
1266 <screen>mencoder dvd://1 -nosound -vf tfields=2 -ovc lavc -fps 59.94 -ofps 59.94</screen> 1271 <screen>mencoder dvd://1 -nosound -vf tfields=2 -ovc lavc -fps 59.94 -ofps 59.94</screen>
1267 </para></listitem> 1272 </para></listitem>
1268 <listitem><para> 1273 <listitem><para>
1269 If you plan on downscaling dramatically, you can excise and encode 1274 If you plan on downscaling dramatically, you can extract and encode
1270 only one of the two fields. Of course, you'll lose half the vertical 1275 only one of the two fields. Of course, you'll lose half the vertical
1271 resolution, but if you plan on downscaling to at most 1/2 of the 1276 resolution, but if you plan on downscaling to at most 1/2 of the
1272 original, the loss won't matter much. The result will be a 1277 original, the loss won't matter much. The result will be a
1273 progressive 29.97 frames per second file. The procedure is to use 1278 progressive 29.97 frames per second file. The procedure is to use
1274 <option>-vf field</option>, then crop 1279 <option>-vf field</option>, then crop
1283 <sect3 id="menc-feat-telecine-encode-mixedpt"> 1288 <sect3 id="menc-feat-telecine-encode-mixedpt">
1284 <title>Mixed progressive and telecine</title> 1289 <title>Mixed progressive and telecine</title>
1285 <para> 1290 <para>
1286 In order to turn mixed progressive and telecine video into entirely 1291 In order to turn mixed progressive and telecine video into entirely
1287 progressive video, the telecined parts have to be 1292 progressive video, the telecined parts have to be
1288 inverse-telecined. There are two filters that accomplish this 1293 inverse-telecined. There are three ways to accomplish this,
1289 natively, but a better solution most of the time is to use two 1294 described below. Note that you should
1290 filters in conjunction (read onward for more detail). 1295 <emphasis role="bold">always</emphasis> inverse-telecine before any
1296 rescaling; unless you really know what you're doing,
1297 inverse-telecine before cropping, too
1298 <link linkend="menc-feat-telecine-footnotes">[1]</link>.
1299 <option>-ofps 23.976</option> is needed here because the output video
1300 will be 23.976 frames per second.
1291 </para> 1301 </para>
1292 1302
1293 <itemizedlist> 1303 <itemizedlist>
1294 <listitem><para> 1304 <listitem><para>
1295 Currently the most reliable method to deal with this type of video 1305 <option>-vf pullup</option> is designed to inverse-telecine
1306 telecined material while leaving progressive data alone. In order to
1307 work properly, <option>pullup</option> <emphasis role="bold">must</emphasis>
1308 be followed by the <option>softskip</option> filter or
1309 else <application>MEncoder</application> will crash.
1310 <option>pullup</option> is, however, the cleanest and most
1311 accurate method available for encoding both telecine and
1312 &quot;mixed progressive and telecine&quot;.
1313
1314 <screen>mencoder dvd://1 -nosound -vf pullup,softskip -ovc lavc -ofps 23.976</screen>
1315 </para>
1316
1317
1318 </listitem>
1319 <listitem><para>
1320 An older method
1296 is to, rather than inverse-telecine the telecined parts, telecine 1321 is to, rather than inverse-telecine the telecined parts, telecine
1297 the non-telecined parts and then inverse-telecine the whole 1322 the non-telecined parts and then inverse-telecine the whole
1298 video. Sound confusing? softpulldown is a filter that goes through 1323 video. Sound confusing? softpulldown is a filter that goes through
1299 a video and makes the entire file telecined. If we follow 1324 a video and makes the entire file telecined. If we follow
1300 softpulldown with either <option>detc</option> or 1325 softpulldown with either <option>detc</option> or
1301 <option>ivtc</option>, the final result will be entirely 1326 <option>ivtc</option>, the final result will be entirely
1302 progressive. Cropping and scaling should be done after the 1327 progressive. <option>-ofps 23.976</option> is needed.
1303 inverse-telecine operations, and <option> -ofps 23.976</option> is
1304 needed.
1305 1328
1306 <screen>mencoder dvd://1 -nosound -vf softpulldown,ivtc=1 -ovc lavc -ofps 23.976</screen> 1329 <screen>mencoder dvd://1 -nosound -vf softpulldown,ivtc=1 -ovc lavc -ofps 23.976</screen>
1307 </para>
1308 </listitem>
1309 <listitem><para>
1310 <option>-vf pullup</option> is designed to inverse-telecine
1311 telecined material while leaving progressive data alone. Pullup
1312 doesn't really work well with the current
1313 <application>MEncoder</application>, though, and is really intended
1314 for use with <application>MEncoder G2</application> (whenever it's
1315 ready). It works fine without <option>-ofps</option>, but
1316 <option>-ofps</option> is needed to prevent choppy output. With
1317 <option>-ofps</option>, it sometimes fails. The problems arise from
1318 <application>MEncoder</application>'s behavior of dropping frames to
1319 maintain synchronization between the audio and video: it drops
1320 frames before sending them through the filter chain, rather than
1321 after. As a result, <option>pullup</option> is sometimes deprived
1322 of the data it needs.
1323 </para>
1324
1325 <para>
1326 If <application>MEncoder</application> drops too many frames in a
1327 row, it starves <option>pullup</option>'s buffers and causes it to
1328 crash.
1329 </para>
1330
1331 <para>
1332 Even if <application>MEncoder</application> only drops one frame,
1333 <option> pullup</option> still doesn't get to see it, and will end
1334 up operating on an incorrect sequence of frames. Even though this
1335 doesn't cause a crash, <option> pullup</option> won't be able to
1336 make correct decisions on how to reassemble progressive frames, and
1337 will either match fields together incorrectly or drop several fields
1338 to compensate.
1339 </para> 1330 </para>
1340 </listitem> 1331 </listitem>
1341 1332
1342 <listitem><para> 1333 <listitem><para>
1343 I haven't used <option>-vf filmdint</option> myself, but here's what 1334 I haven't used <option>-vf filmdint</option> myself, but here's what
1476 the scope of this document. 1467 the scope of this document.
1477 </para> 1468 </para>
1478 </formalpara> 1469 </formalpara>
1479 </listitem> 1470 </listitem>
1480 1471
1472 <listitem><formalpara>
1473 <title>About the performance of pullup:</title>
1474 <para>
1475 It is safe to use <option>pullup</option> (along with <option>softskip
1476 </option>) on progressive video, and is usually a good idea unless
1477 the source has been definitively verified to be entirely progressive.
1478 The performace loss is small for most cases. On a bare-minimum encode,
1479 <option>pullup</option> causes <application>MEncoder</application> to
1480 be 50% slower. Adding sound processing and advanced <option>lavcopts
1481 </option> overshadows that difference, bringing the performance of
1482 decrease of using <option>pullup</option> down to 2%.
1483 </para>
1484 </formalpara>
1485 </listitem>
1486
1481 </orderedlist> 1487 </orderedlist>
1482 1488
1483 </sect2> 1489 </sect2>
1484 1490
1485 </sect1> 1491 </sect1>