Mercurial > mplayer.hg
annotate DOCS/xml/en/mencoder.xml @ 15010:aec21cf429cb
Improved encoding guide:
- explains how to do a smart resize
- calculate a bitrate to target a certain size
- rip audio and transcode in Ogg/Vorbis
- a lot of libavcodec's options
to come: muxing in matroska files...
author | gpoirier |
---|---|
date | Fri, 25 Mar 2005 21:17:21 +0000 |
parents | 85546d215f6e |
children | b0dd473ed38a |
rev | line source |
---|---|
9675 | 1 <?xml version="1.0" encoding="iso-8859-1"?> |
10913
49b1a67e7381
Add revision keyword to english xml files, to ease translation synchronization
lumag
parents:
10869
diff
changeset
|
2 <!-- $Revision$ --> |
9675 | 3 <chapter id="mencoder"> |
11540 | 4 <title>Encoding with <application>MEncoder</application></title> |
9675 | 5 |
6 <para> | |
7 For the complete list of available <application>MEncoder</application> options | |
8 and examples, please see the man page. For a series of hands-on examples and | |
9 detailed guides on using several encoding parameters, read the | |
10 <ulink url="../../tech/encoding-tips.txt">encoding-tips</ulink> that were | |
11 collected from several mailing list threads on mplayer-users. Search the | |
12 <ulink url="http://mplayerhq.hu/pipermail/mplayer-users/">archives</ulink> | |
13 for a wealth of discussions about all aspects of and problems related to | |
14 encoding with <application>MEncoder</application>. | |
15 </para> | |
16 | |
12400
903ac68f2bc8
divx --> lavc, spelling, more sensible section name
diego
parents:
12399
diff
changeset
|
17 <sect1 id="menc-feat-mpeg4"> |
14421 | 18 <title>Encoding two pass MPEG-4 ("DivX")</title> |
9675 | 19 |
20 <para> | |
21 The name comes from the fact that this method encodes the file <emphasis>twice</emphasis>. | |
22 The first encoding (dubbed pass) creates some temporary files | |
23 (<filename>*.log</filename>) with a size of few megabytes, do not delete | |
14421 | 24 them yet (you can delete the AVI). In the second pass, the two pass output |
9675 | 25 file is created, using the bitrate data from the temporary files. The |
26 resulting file will have much better image quality. If this is the first | |
27 time you heard about this, you should consult some guides available on the | |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
28 net. |
9675 | 29 </para> |
30 | |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
31 <example> |
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
32 <title>copy audio track</title> |
9675 | 33 <para> |
14421 | 34 Two pass encode of a DVD to an MPEG-4 ("DivX") AVI while copying |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
35 the audio track. |
9675 | 36 <screen> |
11710 | 37 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac copy -o <replaceable>movie.avi</replaceable> |
38 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -oac copy -o <replaceable>movie.avi</replaceable> | |
9675 | 39 </screen> |
40 </para> | |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
41 </example> |
9675 | 42 |
43 <example> | |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
44 <title>encode audio track</title> |
9675 | 45 <para> |
14421 | 46 Two pass encode of a DVD to an MPEG-4 ("DivX") AVI while encoding |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
47 the audio track to MP3. |
9675 | 48 <screen> |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
49 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac mp3lame -lameopts vbr=3 -o <replaceable>movie.avi</replaceable> |
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
50 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -oac mp3lame -lameopts vbr=3 -o <replaceable>movie.avi</replaceable> |
9675 | 51 </screen> |
52 </para> | |
53 </example> | |
54 </sect1> | |
55 | |
56 <sect1 id="menc-feat-mpeg"> | |
57 <title>Encoding to MPEG format</title> | |
58 <para> | |
59 <application>MEncoder</application> can create MPEG (MPEG-PS) format output | |
11822
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
60 files. It's probably useful only with |
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
61 <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>'s |
10869 | 62 <emphasis>mpeg1video</emphasis> codec, because players - except |
14024 | 63 <application>MPlayer</application> - expect MPEG-1 video, and MPEG-1 layer 2 (MP2) |
10869 | 64 audio streams in MPEG files. |
9675 | 65 </para> |
66 | |
67 <para> | |
11680
f2f7c22847b3
added capital letter at the beginning of the sentence
paszczi
parents:
11540
diff
changeset
|
68 This feature is not very useful right now, aside that it probably has many bugs, |
11540 | 69 but the more importantly because <application>MEncoder</application> currently |
14024 | 70 cannot encode MPEG-1 layer 2 (MP2) audio, which all other players expect in MPEG files. |
9675 | 71 </para> |
72 | |
73 <para> | |
12578 | 74 To change <application>MEncoder</application>'s output file format, |
11540 | 75 use the <option>-of mpeg</option> option. |
9675 | 76 </para> |
77 | |
78 <para> | |
79 Example: | |
80 <screen> | |
11710 | 81 mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -oac copy <replaceable>other_options</replaceable> <replaceable>media.avi</replaceable> -o <replaceable>output.mpg</replaceable> |
9675 | 82 </screen> |
83 </para> | |
84 </sect1> | |
85 | |
86 | |
87 <sect1 id="menc-feat-rescale"> | |
88 <title>Rescaling movies</title> | |
89 | |
90 <para> | |
91 Often the need to resize movie images' size emerges. Its reasons can be | |
92 many: decreasing file size, network bandwidth,etc. Most people even do | |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
93 rescaling when converting DVDs or SVCDs to DivX AVI. If you wish to rescale, |
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
94 read the <link linkend="aspect">Preserving aspect ratio</link> section. |
9675 | 95 </para> |
96 | |
97 <para> | |
98 The scaling process is handled by the <literal>scale</literal> video filter: | |
9677 | 99 <option>-vf scale=<replaceable>width</replaceable>:<replaceable>height</replaceable></option>. |
9675 | 100 Its quality can be set with the <option>-sws</option> option. |
14131 | 101 If it's not specified, <application>MEncoder</application> will use 2: bicubic. |
9675 | 102 </para> |
103 | |
104 <para> | |
105 Usage: | |
106 <screen> | |
12484
58056bc98dd9
Remove 3-pass encoding guide (can break A/V sync), rescaling is not
diego
parents:
12400
diff
changeset
|
107 mencoder <replaceable>input.mpg</replaceable> -ovc lavc -lavcopts vcodec=mpeg4 -vf scale=640:480 -o <replaceable>output.avi</replaceable> |
9675 | 108 </screen> |
109 </para> | |
110 </sect1> | |
111 | |
112 | |
113 <sect1 id="menc-feat-streamcopy"> | |
114 <title>Stream copying</title> | |
115 | |
116 <para> | |
117 <application>MEncoder</application> can handle input streams in two ways: | |
118 <emphasis role="bold">encode</emphasis> or <emphasis role="bold">copy</emphasis> | |
119 them. This section is about <emphasis role="bold">copying</emphasis>. | |
120 </para> | |
121 | |
122 <itemizedlist> | |
123 <listitem><para> | |
124 <emphasis role="bold">Video stream</emphasis> (option <option>-ovc copy</option>): | |
125 nice stuff can be done :) Like, putting (not converting!) FLI or VIVO or | |
14024 | 126 MPEG-1 video into an AVI file! Of course only |
9675 | 127 <application>MPlayer</application> can play such files :) And it probably |
128 has no real life value at all. Rationally: video stream copying can be | |
129 useful for example when only the audio stream has to be encoded (like, | |
130 uncompressed PCM to MP3). | |
131 </para></listitem> | |
132 <listitem><para> | |
133 <emphasis role="bold">Audio stream</emphasis> (option <option>-oac copy</option>): | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
134 straightforward. It is possible to take an external audio file (MP3, |
10429 | 135 WAV) and mux it into the output stream. Use the |
9675 | 136 <option>-audiofile <replaceable>filename</replaceable></option> option |
137 for this. | |
138 </para></listitem> | |
139 </itemizedlist> | |
140 </sect1> | |
141 | |
142 | |
143 <sect1 id="menc-feat-fix-avi"> | |
144 <title>Fixing AVIs with broken index or interleaving</title> | |
145 | |
146 <para> | |
147 Easiest thing. We simply copy the video and audio streams, and | |
148 <application>MEncoder</application> generates the index. Of course this cannot fix possible bugs in | |
149 the video and/or audio streams. It also fixes files with broken interleaving, | |
150 thus the <option>-ni</option> option won't be needed for them anymore. | |
151 </para> | |
152 | |
153 <para> | |
154 Command: | |
155 <screen> | |
156 mencoder -idx <replaceable>input.avi</replaceable> -ovc copy -oac copy -o <replaceable>output.avi</replaceable><!-- | |
157 --></screen> | |
158 </para> | |
159 | |
160 | |
161 <sect2 id="menc-feat-appending"> | |
162 <title>Appending multiple AVI files</title> | |
163 | |
164 <para> | |
11540 | 165 As a side-effect, the broken AVI fixer function enables <application>MEncoder</application> |
166 to append 2 (or more) AVI files: | |
9675 | 167 </para> |
168 | |
169 <para> | |
170 Command: | |
12599
8795514d0f29
MEncoder has problems reading from stdin, files need to be concatenated
diego
parents:
12578
diff
changeset
|
171 <screen>cat <replaceable>1.avi</replaceable> <replaceable>2.avi</replaceable> > <replaceable>3.avi</replaceable> |
8795514d0f29
MEncoder has problems reading from stdin, files need to be concatenated
diego
parents:
12578
diff
changeset
|
172 mencoder -noidx -ovc copy -oac copy -o <replaceable>output.avi</replaceable> <replaceable>3.avi</replaceable></screen> |
9675 | 173 </para> |
174 | |
175 <note><para> | |
176 This expects <filename>1.avi</filename> and <filename>2.avi</filename> to use | |
177 the same codecs, resolution, stream rate etc, and at least <filename>1.avi</filename> | |
178 must not be broken. You may need to fix your input AVI files first, as described | |
179 <link linkend="menc-feat-fix-avi">above</link>. | |
180 </para></note> | |
181 </sect2> | |
182 </sect1> | |
183 | |
184 <sect1 id="menc-feat-enc-libavcodec"> | |
11822
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
185 <title>Encoding with the <systemitem class="library">libavcodec</systemitem> |
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
186 codec family</title> |
9675 | 187 |
188 <para> | |
11822
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
189 <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link> |
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
190 provides simple encoding to a lot of interesting video and audio formats. |
11747 | 191 You can encode to the following codecs (more or less up to date): |
9675 | 192 |
193 <informaltable frame="all"> | |
194 <tgroup cols="2"> | |
195 <thead> | |
196 <row><entry>Codec name</entry><entry>Description</entry></row> | |
197 </thead> | |
198 <tbody> | |
199 <row><entry>mjpeg</entry><entry> | |
200 Motion JPEG | |
201 </entry></row> | |
10869 | 202 <row><entry>ljpeg</entry><entry> |
203 Lossless JPEG | |
204 </entry></row> | |
9675 | 205 <row><entry>h263</entry><entry> |
13111 | 206 H.263 |
9675 | 207 </entry></row> |
208 <row><entry>h263p</entry><entry> | |
13111 | 209 H.263+ |
9675 | 210 </entry></row> |
211 <row><entry>mpeg4</entry><entry> | |
14024 | 212 ISO standard MPEG-4 (DivX 5, XVID compatible) |
9675 | 213 </entry></row> |
214 <row><entry>msmpeg4</entry><entry> | |
14024 | 215 pre-standard MPEG-4 variant by MS, v3 (AKA DivX3) |
9675 | 216 </entry></row> |
217 <row><entry>msmpeg4v2</entry><entry> | |
14024 | 218 pre-standard MPEG-4 by MS, v2 (used in old asf files) |
9675 | 219 </entry></row> |
10869 | 220 <row><entry>wmv1</entry><entry> |
13222 | 221 Windows Media Video, version 1 (AKA WMV7) |
9675 | 222 </entry></row> |
10869 | 223 <row><entry>wmv2</entry><entry> |
13222 | 224 Windows Media Video, version 2 (AKA WMV8) |
10869 | 225 </entry></row> |
9675 | 226 <row><entry>rv10</entry><entry> |
227 an old RealVideo codec | |
228 </entry></row> | |
229 <row><entry>mpeg1video</entry><entry> | |
14024 | 230 MPEG-1 video |
10869 | 231 </entry></row> |
232 <row><entry>mpeg2video</entry><entry> | |
14024 | 233 MPEG-2 video |
9675 | 234 </entry></row> |
235 <row><entry>huffyuv</entry><entry> | |
236 lossless compression | |
237 </entry></row> | |
10869 | 238 <row><entry>asv1</entry><entry> |
239 ASUS Video v1 | |
240 </entry></row> | |
241 <row><entry>asv2</entry><entry> | |
242 ASUS Video v2 | |
243 </entry></row> | |
244 <row><entry>ffv1</entry><entry> | |
245 FFmpeg's lossless video codec | |
246 </entry></row> | |
9675 | 247 </tbody> |
248 </tgroup> | |
249 </informaltable> | |
250 | |
251 The first column contains the codec names that should be passed after the | |
252 <literal>vcodec</literal> config, like: <option>-lavcopts vcodec=msmpeg4</option> | |
253 </para> | |
254 | |
255 <informalexample> | |
256 <para> | |
257 An example, with MJPEG compression: | |
10184
b6c63ab184a4
Changed a few remaining -dvd and -vcd options to dvd:// and vcd://.
diego
parents:
10065
diff
changeset
|
258 <screen>mencoder dvd://2 -o title2.avi -ovc lavc -lavcopts vcodec=mjpeg -oac copy</screen> |
9675 | 259 </para> |
260 </informalexample> | |
261 </sect1> | |
262 | |
263 | |
264 <sect1 id="menc-feat-enc-images"> | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
265 <title>Encoding from multiple input image files (JPEG, PNG, TGA, SGI)</title> |
9675 | 266 |
267 <para> | |
268 <application>MEncoder</application> is capable of creating movies from one | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
269 or more JPEG, PNG or TGA files. With simple framecopy it can create MJPEG |
9675 | 270 (Motion JPEG), MPNG (Motion PNG) or MTGA (Motion TGA) files. |
271 </para> | |
272 | |
273 <orderedlist> | |
274 <title>Explanation of the process:</title> | |
275 <listitem><para> | |
276 <application>MEncoder</application> <emphasis>decodes</emphasis> the input image(s) with | |
277 <systemitem class="library">libjpeg</systemitem> (when decoding PNGs, it | |
278 will use <systemitem class="library">libpng</systemitem>). | |
279 </para></listitem> | |
280 <listitem><para> | |
281 <application>MEncoder</application> then feeds the decoded image to the | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
282 chosen video compressor (DivX4, XviD, FFmpeg msmpeg4, etc.). |
9675 | 283 </para></listitem> |
284 </orderedlist> | |
285 | |
286 <formalpara> | |
287 <title>Examples</title> | |
288 <para> | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
289 The explanation of the <option>-mf</option> option is in the man page. |
9675 | 290 |
291 <informalexample> | |
292 <para> | |
14024 | 293 Creating an MPEG-4 file from all the JPEG files in the current directory: |
9675 | 294 <screen> |
14093
3bf74bf969ff
Unify all image encoding examples and fix a typo (*.jpg vs *.png) noticed
diego
parents:
14024
diff
changeset
|
295 mencoder mf://*.jpg -mf w=800:h=600:fps=25:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -o <replaceable>output.avi</replaceable> |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
296 </screen> |
9675 | 297 </para> |
298 </informalexample> | |
299 | |
300 <informalexample> | |
301 <para> | |
14024 | 302 Creating an MPEG-4 file from some JPEG files in the current directory: |
9675 | 303 <screen> |
14093
3bf74bf969ff
Unify all image encoding examples and fix a typo (*.jpg vs *.png) noticed
diego
parents:
14024
diff
changeset
|
304 mencoder mf://<replaceable>frame001.jpg,frame002.jpg</replaceable> -mf w=800:h=600:fps=25:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -o <replaceable>output.avi</replaceable> |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
305 </screen> |
9675 | 306 </para> |
307 </informalexample> | |
308 | |
309 <informalexample> | |
310 <para> | |
311 Creating a Motion JPEG (MJPEG) file from all the JPEG files in the current | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
312 directory: |
9675 | 313 <screen> |
14093
3bf74bf969ff
Unify all image encoding examples and fix a typo (*.jpg vs *.png) noticed
diego
parents:
14024
diff
changeset
|
314 mencoder mf://*.jpg -mf w=800:h=600:fps=25:type=jpg -ovc copy -oac copy -o <replaceable>output.avi</replaceable> |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
315 </screen> |
9675 | 316 </para> |
317 </informalexample> | |
318 | |
319 <informalexample> | |
320 <para> | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
321 Creating an uncompressed file from all the PNG files in the current directory: |
9675 | 322 <screen> |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
323 mencoder mf:// -mf w=800:h=600:fps=25:type=png -ovc raw -oac copy -o <replaceable>output.avi</replaceable> |
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
324 </screen> |
9675 | 325 </para> |
326 </informalexample> | |
327 | |
328 <note><para> | |
329 Width must be integer multiple of 4, it's a limitation of the RAW RGB AVI format. | |
330 </para></note> | |
331 | |
332 <informalexample> | |
333 <para> | |
334 Creating a Motion PNG (MPNG) file from all the PNG files in the current | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
335 directory: |
9675 | 336 <screen> |
14093
3bf74bf969ff
Unify all image encoding examples and fix a typo (*.jpg vs *.png) noticed
diego
parents:
14024
diff
changeset
|
337 mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc copy -oac copy -o <replaceable>output.avi</replaceable> <!-- |
9675 | 338 --></screen> |
339 </para> | |
340 </informalexample> | |
341 | |
342 <informalexample> | |
343 <para> | |
344 Creating a Motion TGA (MTGA) file from all the TGA files in the current | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
345 directory: |
9675 | 346 <screen> |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
347 mencoder mf://*.tga -mf w=800:h=600:fps=25:type=tga -ovc copy -oac copy -o <replaceable>output.avi</replaceable><!-- |
9675 | 348 --></screen> |
349 </para> | |
350 </informalexample> | |
351 | |
352 </para> | |
353 </formalpara> | |
354 </sect1> | |
355 | |
356 | |
357 <sect1 id="menc-feat-extractsub"> | |
12615 | 358 <title>Extracting DVD subtitles to VOBsub file</title> |
9675 | 359 |
360 <para> | |
361 <application>MEncoder</application> is capable of extracting subtitles from | |
12615 | 362 a DVD into VOBsub formatted files. They consist of a pair of files ending in |
9675 | 363 <filename>.idx</filename> and <filename>.sub</filename> and are usually |
364 packaged in a single <filename>.rar</filename> archive. | |
365 <application>MPlayer</application> can play these with the | |
366 <option>-vobsub</option> and <option>-vobsubid</option> options. | |
367 </para> | |
368 | |
369 <para> | |
370 You specify the basename (i.e without the <filename>.idx</filename> or | |
371 <filename>.sub</filename> extension) of the output files with | |
372 <option>-vobsubout</option> and the index for this subtitle in the | |
373 resulting files with <option>-vobsuboutindex</option>. | |
374 </para> | |
375 | |
376 <para> | |
377 If the input is not from a DVD you should use <option>-ifo</option> to | |
378 indicate the <filename>.ifo</filename> file needed to construct the | |
379 resulting <filename>.idx</filename> file. | |
380 </para> | |
381 | |
382 <para> | |
383 If the input is not from a DVD and you do not have the | |
384 <filename>.ifo</filename> file you will need to use the | |
385 <option>-vobsubid</option> option to let it know what language id to put in | |
386 the <filename>.idx</filename> file. | |
387 </para> | |
388 | |
389 <para> | |
390 Each run will append the running subtitle if the <filename>.idx</filename> | |
391 and <filename>.sub</filename> files already exist. So you should remove any | |
392 before starting. | |
393 </para> | |
394 | |
395 <example> | |
14421 | 396 <title>Copying two subtitles from a DVD while doing two pass encoding</title> |
9675 | 397 <screen> |
398 rm subtitles.idx subtitles.sub | |
12776 | 399 mencoder dvd://1 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -vobsubout subtitles -vobsuboutindex 0 -sid 2 |
12400
903ac68f2bc8
divx --> lavc, spelling, more sensible section name
diego
parents:
12399
diff
changeset
|
400 mencoder dvd://1 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -vobsubout subtitles -vobsuboutindex 1 -sid 5<!-- |
9675 | 401 --></screen> |
402 </example> | |
403 | |
404 <example> | |
405 <title>Copying a french subtitle from an MPEG file</title> | |
406 <screen> | |
407 rm subtitles.idx subtitles.sub | |
11710 | 408 mencoder <replaceable>movie.mpg</replaceable> -ifo <replaceable>movie.ifo</replaceable> -vobsubout subtitles -vobsuboutindex 0 -vobsuboutid fr -sid 1<!-- |
9675 | 409 --></screen> |
410 </example> | |
411 | |
412 </sect1> | |
413 | |
414 <sect1 id="aspect"> | |
415 <title>Preserving aspect ratio</title> | |
416 <para> | |
14024 | 417 DVDs and SVCDs (i.e. MPEG-1/2) files contain an aspect ratio value, which |
10065
422876da049e
Error in the aspect ratio calculation, plus typos and rewordings.
diego
parents:
9677
diff
changeset
|
418 describes how the player should scale the video stream, so humans won't |
9675 | 419 have egg heads (ex.: 480x480 + 4:3 = 640x480). However when encoding to AVI |
420 (DivX) files, you have be aware that AVI headers don't store this value. | |
10065
422876da049e
Error in the aspect ratio calculation, plus typos and rewordings.
diego
parents:
9677
diff
changeset
|
421 Rescaling the movie is disgusting and time consuming, there has to be a better |
422876da049e
Error in the aspect ratio calculation, plus typos and rewordings.
diego
parents:
9677
diff
changeset
|
422 way! |
9675 | 423 </para> |
424 | |
425 <para>There is</para> | |
426 | |
427 <para> | |
14024 | 428 MPEG-4 has an unique feature: the video stream can contain its needed aspect |
429 ratio. Yes, just like MPEG-1/2 (DVD, SVCD) and H.263 files. Regretfully, there are | |
9675 | 430 <emphasis role="bold">no</emphasis> video players outside which support this |
14024 | 431 attribute of MPEG-4, except <application>MPlayer</application>. |
9675 | 432 </para> |
433 | |
434 <para> | |
11822
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
435 This feature can be used only with |
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
436 <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>'s |
10869 | 437 <systemitem>mpeg4</systemitem> codec. Keep in mind: although |
438 <application>MPlayer</application> will correctly play the created file, | |
439 other players will use the wrong aspect ratio. | |
9675 | 440 </para> |
441 | |
442 <para> | |
443 You seriously should crop the black bands over and below the movie image. | |
10065
422876da049e
Error in the aspect ratio calculation, plus typos and rewordings.
diego
parents:
9677
diff
changeset
|
444 See the man page for the usage of the <systemitem>cropdetect</systemitem> and |
9675 | 445 <systemitem>crop</systemitem> filters. |
446 </para> | |
447 | |
448 <para> | |
10869 | 449 Usage |
11710 | 450 <screen>mencoder <replaceable>sample-svcd.mpg</replaceable> -ovc lavc -lavcopts vcodec=mpeg4:autoaspect -vf crop=714:548:0:14 -oac copy -o <replaceable>output.avi</replaceable></screen> |
9675 | 451 </para> |
10869 | 452 </sect1> |
453 | |
454 <sect1 id="custommatrices"><title>Custom inter/intra matrices</title> | |
455 | |
456 <para> | |
11822
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
457 With this feature of |
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
458 <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link> |
13022 | 459 you are able to set custom inter (I-frames/keyframes) and intra |
11822
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
460 (P-frames/predicted frames) matrices. It is supported by many of the codecs: |
10869 | 461 <systemitem>mpeg1video</systemitem> and <systemitem>mpeg2video</systemitem> |
462 are reported as working. | |
463 </para> | |
464 | |
465 <para> | |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
466 A typical usage of this feature is to set the matrices preferred by the |
10869 | 467 <ulink url="http://www.kvcd.net/">KVCD</ulink> specifications. |
468 </para> | |
469 | |
470 <para> | |
471 The <emphasis role="bold">KVCD "Notch" Quantization Matrix:</emphasis> | |
472 </para> | |
473 | |
474 <para> | |
475 Intra: | |
476 <screen> | |
477 8 9 12 22 26 27 29 34 | |
478 9 10 14 26 27 29 34 37 | |
479 12 14 18 27 29 34 37 38 | |
480 22 26 27 31 36 37 38 40 | |
481 26 27 29 36 39 38 40 48 | |
482 27 29 34 37 38 40 48 58 | |
483 29 34 37 38 40 48 58 69 | |
484 34 37 38 40 48 58 69 79 | |
485 </screen> | |
486 | |
487 Inter: | |
488 <screen> | |
489 16 18 20 22 24 26 28 30 | |
490 18 20 22 24 26 28 30 32 | |
491 20 22 24 26 28 30 32 34 | |
492 22 24 26 30 32 32 34 36 | |
493 24 26 28 32 34 34 36 38 | |
494 26 28 30 32 34 36 38 40 | |
495 28 30 32 34 36 38 42 42 | |
496 30 32 34 36 38 40 42 44 | |
497 </screen> | |
498 </para> | |
499 | |
500 <para> | |
501 Usage: | |
502 <screen> | |
11710 | 503 $ mencoder <replaceable>input.avi</replaceable> -o <replaceable>output.avi</replaceable> -oac copy -ovc lavc -lavcopts inter_matrix=...:intra_matrix=... |
10869 | 504 </screen> |
505 </para> | |
506 | |
507 <para> | |
508 <screen> | |
11710 | 509 $ mencoder <replaceable>input.avi</replaceable> -ovc lavc -lavcopts |
10869 | 510 vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37, |
511 12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27, | |
512 29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79 | |
513 :inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26, | |
514 28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34, | |
515 36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44 -oac copy -o svcd.mpg | |
516 </screen> | |
517 </para> | |
9675 | 518 </sect1> |
519 | |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
520 <sect1 id="menc-feat-dvd-mpeg4"> |
14024 | 521 <title>Making a high quality MPEG-4 ("DivX") rip of a DVD movie</title> |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
522 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
523 <para> |
15010 | 524 One frequently asked question is "How do I make highest quality rip for |
525 a given size?". Another question is "How do I make the highest quality DVD | |
526 rip possible? I don't care about file size, I just want the best quality." | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
527 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
528 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
529 <para> |
15010 | 530 The latter question is perhaps at least somewhat wrongly posed. After all, if |
531 you don't care about file size, why not simply copy the entire MPEG-2 video | |
532 stream from the the DVD? Sure, your AVI will end up being 5GB, give | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
533 or take, but if you want the best quality and don't care about size, |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
534 this is certainly your best option. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
535 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
536 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
537 <para> |
14024 | 538 In fact, the reason you want to transcode a DVD into MPEG-4 is |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
539 specifically because you <emphasis role="bold">do</emphasis> care about |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
540 file size. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
541 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
542 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
543 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
544 It's difficult to offer a cookbook recipe on how to create a very high |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
545 quality DVD rip. There are several factors to consider, and you should |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
546 understand these details or else you're likely to end up disappointed |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
547 with your results. Below we'll investigate some of these issues, and |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
548 then have a look at an example. We assume you're using |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
549 <systemitem class="library">libavcodec</systemitem> to encode the video, |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
550 although the theory applies to other codecs as well. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
551 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
552 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
553 <para> |
15010 | 554 If this seems to be too much for you, you should probably use one of the |
555 many fine front-ends that are listed on our | |
556 <ulink url="http://mplayerhq.hu/homepage/design7/projects.html">related projects page</ulink>. | |
557 That way, you should be able to achieve high quality rips without too much | |
558 thinking, because most of those tools are designed to take clever decisions | |
559 for you. | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
560 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
561 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
562 <sect2 id="menc-feat-dvd-mpeg4-2pass"> |
14421 | 563 <title>Constant Quantizer vs. two pass</title> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
564 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
565 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
566 There are three approaches to encoding the video: constant bitrate |
14421 | 567 (CBR), constant quantizer, and two pass (ABR, or average bitrate). |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
568 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
569 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
570 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
571 In each of these modes, <systemitem class="library">libavcodec</systemitem> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
572 breaks the video frame into 16x16 pixel macroblocks and then applies a |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
573 quantizer to each macroblock. The lower the quantizer, the better the |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
574 quality and higher the bitrate. The method |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
575 <systemitem class="library">libavcodec</systemitem> uses to determine |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
576 which quantizer to use for a given macroblock varies and is highly |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
577 tunable. (This is an extreme over-simplification of the actual |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
578 process, but the basic concept is useful to understand.) |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
579 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
580 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
581 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
582 When you specify a constant bitrate, <systemitem |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
583 class="library">libavcodec</systemitem> will encode the video, discarding |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
584 detail as much as necessary and as little as possible in order to remain |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
585 lower than the given bitrate. If you truly don't care about file size, |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
586 you could as well use CBR and specify a bitrate of infinity. (In |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
587 practice, this means a value high enough so that it poses no limit, like |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
588 10000Kbit.) With no real restriction on bitrate, the result is that |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
589 <systemitem class="library">libavcodec</systemitem> will use the lowest |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
590 possible quantizer for each macroblock (as specified by |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
591 <option>vqmin</option>, which is 2 by default). As soon as you specify a |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
592 low enough bitrate that <systemitem class="library">libavcodec</systemitem> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
593 is forced to use a higher quantizer, then you're almost certainly ruining |
15010 | 594 the quality of your video. |
595 In order to avoid that, you should probably down-scale your video, according | |
596 to the method which will be exposed later on that guide. | |
597 In general, you should avoid CBR altogether if you care about quality. | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
598 </para> |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
599 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
600 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
601 With constant quantizer, <systemitem |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
602 class="library">libavcodec</systemitem> uses the same quantizer, as |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
603 specified by the <option>vqscale</option> option, on every macroblock. If |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
604 you want the highest quality rip possible, again ignoring bitrate, you can |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
605 use <option>vqscale=2</option>. This will yield the same bitrate and PSNR |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
606 (peak signal-to-noise ratio) as CBR with |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
607 <option>vbitrate</option>=infinity and the default <option>vqmin</option> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
608 of 2. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
609 </para> |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
610 |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
611 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
612 The problem with constant quantizing is that it uses the given quantizer |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
613 whether the macroblock needs it or not. That is, it might be possible |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
614 to use a higher quantizer on a macroblock without sacrificing visual |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
615 quality. Why waste the bits on an unnecessarily low quantizer? Your |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
616 CPU has as many cycles as there is time, but there's only so many bits |
13523 | 617 on your hard disk. |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
618 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
619 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
620 <para> |
14421 | 621 With a two pass encode, the first pass will rip the movie as though it |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
622 were CBR, but it will keep a log of properties for each frame. This |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
623 data is then used during the second pass in order to make intelligent |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
624 decisions about which quantizers to use. During fast action or low |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
625 detail scenes, higher quantizers will likely be used, and during |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
626 slow moving or high detail scenes, lower quantizers will be used. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
627 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
628 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
629 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
630 If you use <option>vqscale=2</option>, then you're wasting bits. If you |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
631 use <option>vqscale=3</option>, then you're not getting the highest |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
632 quality rip. Suppose you rip a DVD at <option>vqscale=3</option>, and |
14421 | 633 the result is 1800Kbit. If you do a two pass encode with |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
634 <option>vbitrate=1800</option>, the resulting video will have <emphasis |
14734 | 635 role="bold">higher quality</emphasis> for the |
636 <emphasis role="bold">same bitrate</emphasis>. | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
637 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
638 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
639 <para> |
14421 | 640 Since you're now convinced that two pass is the way to go, the real |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
641 question now is what bitrate to use? The answer is that there's no |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
642 single answer. Ideally you want to choose a bitrate that yields the |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
643 best balance between quality and file size. This is going to vary |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
644 depending on the source video. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
645 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
646 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
647 <para> |
15010 | 648 If size doesn't matter, a good starting point for a very high quality |
649 rip is about 2000Kbit plus or minus 200Kbit. | |
650 For fast action or high detail source video, or if you just have a very | |
651 critical eye, you might decide on 2400 or 2600. | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
652 For some DVDs, you might not notice a difference at 1400Kbit. It's a |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
653 good idea to experiment with scenes at different bitrates to get a feel. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
654 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
655 |
15010 | 656 <para> |
657 If you aim at a certain size, you will have to somehow calculate the bitrate. | |
658 But before that, you need to know how much space you should reserve for the | |
659 audio track(s), so you should <link linkend="menc-feat-dvd-mpeg4-audio">rip | |
660 those</link> first. | |
661 You can compute the bitrate with the following equation: | |
662 bitrate = (target_size_in_Mbytes - sound_size_in_Mbytes) * 1024 * 1024 / length_in_secs * 8 / 1000 | |
663 For instance, to squeeze a two-hour movie into a 702Mbytes CD, with 60Mbytes | |
664 of audio track, the video bitrate will have to be | |
665 (702 - 60) * 1024 * 1024 / (120*60) * 8 / 1000 = 740kbps. | |
666 </para> | |
667 | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
668 </sect2> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
669 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
670 <sect2 id="menc-feat-dvd-mpeg4-crop"> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
671 <title>Cropping and Scaling</title> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
672 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
673 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
674 Native DVD resolution is 720x480 for NTSC, and 720x576 for PAL, but |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
675 there's an aspect flag that specifies whether it's full-screen (4:3) or |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
676 wide-screen (16:9). Many (if not most) widescreen DVDs are not strictly |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
677 16:9, and will be either 1.85:1 or 2.35:1 (cinescope). This means that |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
678 there will be black bands in the video that will need to be cropped out. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
679 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
680 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
681 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
682 <application>MPlayer</application> provides a crop detection filter that |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
683 will determine the crop rectangle (<option>-vf cropdetect</option>). |
14024 | 684 Because MPEG-4 uses 16x16 macroblocks, you'll want to make sure that each |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
685 dimension of the video you're encoding is a multiple of 16 or else you |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
686 will be degrading quality, especially at lower bitrates. You can do this |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
687 by rounding the width and height of the crop rectangle down to the nearest |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
688 multiple of 16. When cropping, you'll want to increase the y-offset by |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
689 half the difference of the old and the new height so that the resulting |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
690 video is taken from the center of the frame. And because of the way DVD |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
691 video is sampled, make sure the offset is an even number. (In fact, as a |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
692 rule, never use odd values for any parameter when you're cropping and |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
693 scaling video.) If you're not comfortable throwing a few extra pixels |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
694 away, you might prefer instead to scale the video instead. We'll look |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
695 at this in our example below. |
15010 | 696 You can actually let the <option>cropdetect</option> filter do all of the |
697 above for you, as it has an optional <option>round</option> parameter that | |
698 is equal to 16 by default. | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
699 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
700 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
701 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
702 Also, be careful about "half black" pixels at the edges. Make sure you |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
703 crop these out too, or else you'll be wasting bits there that |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
704 are better spent elsewhere. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
705 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
706 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
707 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
708 After all is said and done, you'll probably end up with video whose pixels |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
709 aren't quite 1.85:1 or 2.35:1, but rather something close to that. You |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
710 could calculate the new aspect ratio manually, but |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
711 <application>MEncoder</application> offers an option for <systemitem |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
712 class="library">libavcodec</systemitem> called <option>autoaspect</option> |
15010 | 713 that will do this for you. Absolutely do not scale this video up in order to |
13523 | 714 square the pixels unless you like to waste your hard disk space. Scaling |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
715 should be done on playback, and the player will use the aspect stored in |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
716 the AVI to determine the correct resolution. |
15010 | 717 Unfortunately, not all players enforce this auto-scaling information, |
718 therefore you may still want to rescale. | |
719 </para> | |
720 | |
721 <para> | |
722 First, you should compute the encoded aspect ratio: | |
723 ARc = (Wc x (ARa / PRdvd )) / Hc | |
724 <itemizedlist> | |
725 <title>where:</title> | |
726 <listitem><para> | |
727 Wc and Hc are the width and height of the cropped video, | |
728 </para></listitem> | |
729 <listitem><para> | |
730 PRdvd is the pixel ratio of the DVD wich is equal to 1.25=(720/576) for PAL, | |
731 </para></listitem> | |
732 <listitem><para> | |
733 DVDs and 1.5=(720/480) for NTSC DVDs, | |
734 </para></listitem> | |
735 </itemizedlist> | |
736 </para> | |
737 | |
738 <para> | |
739 Then, you can compute the X and Y resolution, according to a certain | |
740 Compression Quality (CQ) factor: | |
741 ResY = INT( SQRT(1000 * Bitrate / 25 / ARc / CQ) / 16 ) * 16 | |
742 ResX = INT( ResY * ARc / 16) * 16 | |
743 </para> | |
744 | |
745 <para> | |
746 Okay, but what is the CQ? | |
747 The CQ represents the number of bits per pixel and per frame of the encode. | |
748 Roughly speaking, the greater the CQ, the less the likelihood to see | |
749 encoding artifacts. | |
750 However, if you have a target size for your movie (1 or 2 CDs for instance), | |
751 there's a limited total number of bits that you can spend; therefore it's | |
752 necessary to find a good tradeoff between compressibility and quality. | |
753 The CQ depends both on the bitrate and the movie resolution. | |
754 In order to raise the CQ, typically you'd downscale the movie given that the | |
755 bitrate is computed in function of the target size and the length of the | |
756 movie, which are constant. | |
757 A CQ below 0.18 usually ends up in a very blocky picture, because there | |
758 aren't enough bits to code the information of each macroblock (MPEG4, like | |
759 many other codecs, groups pixels by blocks of several pixels to compress the | |
760 image; if there aren't enough bits, the edge of those blocks are | |
761 visible). | |
762 It's therefore wise to take a CQ ranging from 0.20 to 0.22 for a 1 CD rip, | |
763 and 0.26-0.28 for 2 CDs. | |
764 Please thake note that the CQ is just an indicative figure, as depending on | |
765 the encoded content, a CQ of 0.18 may look just fine for a Bergman, contrary | |
766 to a movie such as The Matrix, which contains many high-motion scenes. | |
767 On the other hand, it's worthless to raise CQ as higher than 0.30 as you'd | |
768 be wasting bits without any noticeable quality gain. | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
769 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
770 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
771 </sect2> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
772 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
773 <sect2 id="menc-feat-dvd-mpeg4-audio"> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
774 <title>Audio</title> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
775 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
776 <para> |
15010 | 777 Audio is a much simpler problem to solve: if you care about quality, just |
778 leave it as is. | |
779 Even AC3 5.1 streams are at most 448Kbit/s, and they're worth every bit. | |
780 You might be tempted to transcode the audio to high quality Ogg Vorbis, but | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
781 just because you don't have an A/V receiver for AC3 pass-through today |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
782 doesn't mean you won't have one tomorrow. Future-proof your DVD rips by |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
783 preserving the AC3 stream. |
15010 | 784 You can keep the AC3 stream either by copying it directly into the video |
785 stream <link linkend="menc-feat-mpeg4">during the encoding</link>. | |
786 You can also extract the AC3 stream in order to mux it into containers such | |
787 as NUT, Matroska or OGM. | |
788 <screen>mplayer source_file.vob -aid 129 -dumpaudio -dumpfile sound.ac3</screen> | |
789 will dump into the file sound.ac3 the audio track number 129 from the file | |
790 source_file.vob (NB: DVD VOB files usually use a different audio numbering, | |
791 which means that the VOB audio track 128 is the 2nd audio track of the file). | |
792 </para> | |
793 | |
794 <para> | |
795 But sometimes you truly have no choice but to further compress the | |
796 sound so that more bits can be spent on the video. | |
797 Most people choose to compress audio with either MP3 or Ogg Vorbis audio | |
798 codecs. | |
799 While the latter is a very space-efficient codec, MP3 is better supported | |
800 by hardware players, although this trend is changing. | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
801 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
802 |
15010 | 803 <para> |
804 First of all, you will have to convert the DVD sound into a WAV file that the | |
805 audio codec can use as input. | |
806 For example: | |
807 <screen>mplayer source_file.vob -ao pcm:file=destination_sound.wav -vc dummy -aid 1 -vo null</screen> | |
808 will dump the second audio track from the file source_file.vob into the file | |
809 destination_sound.wav. | |
810 You may want to normalize the sound before encoding, as DVD audio tracks | |
811 are commonly recorded at low volumes. | |
812 You can use the tool <application>normalize</application> for instance, | |
813 which is available in most distribution. | |
814 You will compress in either Ogg Vorbis or MP3. | |
815 For example: | |
816 <screen>oggenc -q1 destination_sound.wav</screen> | |
817 will encode destination_sound.wav with the encoding quality 1, which is | |
818 roughly equivalent to 80Kb/s, and is the minimum quality at which you | |
819 should encode if you care about quality. | |
820 Please note that MEncoder currently can't currently mux Ogg Vorbis files | |
821 into a video stream because it can only create AVI and MPEG files. | |
822 Don't worry, this document will show you how you can do that with third | |
823 party programs. | |
824 </para> | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
825 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
826 </sect2> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
827 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
828 <sect2 id="menc-feat-dvd-mpeg4-interlacing"> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
829 <title>Interlacing and Telecine</title> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
830 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
831 <para> |
14958 | 832 Almost all movies are shot at 24 fps. Because NTSC is 30000/1001 fps, some |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
833 processing must be done to this 24 fps video to make it run at the correct |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
834 NTSC framerate. The process is called 3:2 pulldown, commonly referred to |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
835 as telecine (because pulldown is often applied during the telecine |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
836 process), and, naively described, it works by slowing the film down to |
14958 | 837 24000/1001 fps, and repeating every fourth frame. |
11780 | 838 </para> |
839 | |
840 <para> | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
841 No special processing, however, is done to the video for PAL DVDs, which |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
842 run at 25 fps. (Technically, PAL can be telecined, called 2:2 pulldown, |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
843 but this doesn't become an issue in practice.) The 24 fps film is simply |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
844 played back at 25 fps. The result is that the movie runs slightly faster, |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
845 but unless you're an alien, you probably won't notice the difference. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
846 Most PAL DVDs have pitch-corrected audio, so when they're played back at |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
847 25 fps things will sound right, even though the audio track (and hence the |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
848 whole movie) has a running time that's 4% less than NTSC DVDs. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
849 </para> |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
850 |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
851 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
852 Because the video in a PAL DVD hasn't been altered, you needn't worry |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
853 much about frame rate. The source is 25 fps, and your rip will be 25 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
854 fps. However, if you're ripping an NTSC DVD movie, you may need to |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
855 apply inverse telecine. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
856 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
857 |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
858 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
859 For movies shot at 24 fps, the video on the NTSC DVD is either telecined |
14958 | 860 30000/1001, or else it is progressive 24000/1001 fps and intended to be telecined |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
861 on-the-fly by a DVD player. On the other hand, TV series are usually |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
862 only interlaced, not telecined. This is not a hard rule: some TV series |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
863 are interlaced (such as Buffy the Vampire Slayer) whereas some are a |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
864 mixture of progressive and interlaced (such as Angel, or 24). |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
865 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
866 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
867 <para> |
14734 | 868 It's highly recommended that you read the section on |
869 <link linkend="menc-feat-telecine">How to deal with telecine and interlacing in NTSC DVDs</link> | |
870 to learn how to handle the different possibilities. | |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
871 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
872 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
873 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
874 However, if you're mostly just ripping movies, likely you're either |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
875 dealing with 24 fps progressive or telecined video, in which case you can |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
876 use the <option>pullup</option> filter <option>-vf |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
877 pullup,softskip</option>. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
878 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
879 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
880 </sect2> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
881 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
882 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
883 <sect2 id="menc-feat-dvd-mpeg4-filtering"> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
884 <title>Filtering</title> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
885 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
886 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
887 In general, you want to do as little filtering as possible to the movie |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
888 in order to remain close to the original DVD source. Cropping is often |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
889 necessary (as described above), but do not scale the video. Although |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
890 scaling down is sometimes preferred to using higher quantizers, we want |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
891 to avoid both these things: remember that we decided from the start to |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
892 trade bits for quality. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
893 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
894 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
895 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
896 Also, do not adjust gamma, contrast, brightness, etc. What looks good |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
897 on your display may not look good on others. These adjustments should |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
898 be done on playback only. |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
899 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
900 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
901 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
902 One thing you might want to do, however, is pass the video through a |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
903 very light denoise filter, such as <option>-vf hqdn3d=2:1:2</option>. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
904 Again, it's a matter of putting those bits to better use: why waste them |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
905 encoding noise when you can just add that noise back in during playback? |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
906 Increasing the parameters for <option>hqdn3d</option> will further |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
907 improve compressibility, but if you increase the values too much, you |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
908 risk degrading the image visibily. The suggested values above |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
909 (<option>2:1:2</option>) are quite conservative; you should feel free to |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
910 experiment with higher values and observe the results for yourself. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
911 </para> |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
912 |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
913 </sect2> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
914 |
15010 | 915 <sect2 id="menc-feat-dvd-mpeg4-encoding-options"> |
916 <title>Encoding options</title> | |
917 | |
918 <para> | |
919 Ideally, you'd probably want to be able to just tell the encoder to switch | |
920 into "high quality" mode and move on. | |
921 That would probably be nice, but unfortunately hard to implement as different | |
922 encoding options yield different qualities depending on the source material. | |
923 Anime and live action are for example two very different materials that | |
924 require different care. | |
925 The good news is that some options should never be left out, like | |
926 <option>mbd=2</option>, <option>trell</option>, and <option>v4mv</option>. | |
927 See below a detailed description of common encoding options. | |
928 </para> | |
929 | |
930 | |
931 <itemizedlist> | |
932 <title>Options to adjust:</title> | |
933 <listitem><para> | |
934 <emphasis role="bold">vmax_b_frames</emphasis>: 1 or 2 is good, depending on | |
935 the movie. | |
936 Note that libavcodec does not yet support closed GOP (the option | |
937 <option>cgop</option> doesn't currently work), so DivX5 won't be able to | |
938 decode anything encoded with B-frames. | |
939 </para></listitem> | |
940 | |
941 <listitem><para> | |
942 <emphasis role="bold">vb_strategy=1</emphasis>: helps in high-motion scenes. | |
943 Requires vmax_b_frames >= 2. | |
944 On some videos, vmax_b_frames may hurt quality, but vmax_b_frames=2 along | |
945 with vb_strategy=1 helps. | |
946 </para></listitem> | |
947 | |
948 <listitem><para> | |
949 <emphasis role="bold">dia</emphasis>: motion search range. Bigger is better | |
950 and slower. | |
951 Negative values are a completely different scale. | |
952 Good values are -1 for a fast encode, or 2-4 for slower. | |
953 </para></listitem> | |
954 | |
955 <listitem><para> | |
956 <emphasis role="bold">predia</emphasis>: motion search pre-pass. | |
957 Not as important as dia. Good values are 1 (default) to 4. Requires preme=2 | |
958 to really be useful. | |
959 </para></listitem> | |
960 | |
961 <listitem><para> | |
962 <emphasis role="bold">cmp, subcmp, precmp</emphasis>: Comparison function for | |
963 motion estimation. | |
964 Experiment with values of 0 (default), 2 (hadamard), 3 (dct), and 6 (rate | |
965 distortion). | |
966 0 is fastest, and sufficient for precmp. | |
967 For cmp and subcmp, 2 is good for anime, and 3 is good for live action. | |
968 6 may or may not be slightly better, but is slow. | |
969 </para></listitem> | |
970 | |
971 <listitem><para> | |
972 <emphasis role="bold">last_pred</emphasis>: Number of motion predictors to | |
973 take from the previous frame. | |
974 1-3 or so help at little speed cost. | |
975 Higher values are slow for no extra gain. | |
976 </para></listitem> | |
977 | |
978 <listitem><para> | |
979 <emphasis role="bold">cbp, mv0</emphasis>: Controls the selection of macroblocks. | |
980 Small speed cost for small quality gain. | |
981 </para></listitem> | |
982 | |
983 <listitem><para> | |
984 <emphasis role="bold">qprd</emphasis>: adaptive quantization based on the | |
985 macroblock's complexity. | |
986 May help or hurt depending on the video and other options. | |
987 This can cause artifacts unless you set vqmax to some reasonably small value | |
988 (6 is good, maybe as low as 4); vqmin=1 should also help. | |
989 </para></listitem> | |
990 | |
991 <listitem><para> | |
992 <emphasis role="bold">qns</emphasis>: very slow, especially when combined | |
993 with qprd. | |
994 This option will make the encoder reduce as much as possible noise due to | |
995 compression artifacts instead making the encoded video strictly match the | |
996 source. | |
997 Don't use this unless you've already tweaked everything else as far as it | |
998 will go and the results still aren't good enough. | |
999 </para></listitem> | |
1000 | |
1001 <listitem><para> | |
1002 <emphasis role="bold">vqcomp</emphasis>: Tweak ratecontrol. | |
1003 What values are good depends on the movie. | |
1004 You can safely leave this alone if you want. | |
1005 Reducing vqcomp puts more bits on low-complexity scenes, increasing it puts | |
1006 them on high-complexity scenes (default: 0.5, range: 0-1. recommended range: | |
1007 0.5-0.7). | |
1008 </para></listitem> | |
1009 | |
1010 <listitem><para> | |
1011 <emphasis role="bold">vlelim, vcelim</emphasis>: Sets the single coefficient | |
1012 elimination threshold for luminance and chroma planes. | |
1013 These are encoded separately in all MPEG-like algorithms. | |
1014 The idea behind these options is to use some good heuristics to determine | |
1015 when the change in a block is less than the threshold you specify, and in | |
1016 such a case, to just encode the block as "no change". | |
1017 This saves bits and perhaps speeds up encoding. vlelim=-4 and vcelim=9 | |
1018 seem to be good for live movies, but seem not to help in with anime; | |
1019 when encoding animation, you should probably leave them unchanged. | |
1020 </para></listitem> | |
1021 | |
1022 <listitem><para> | |
1023 <emphasis role="bold">qpel</emphasis>: Quarter pixel motion estimation. | |
1024 MPEG-4 uses a half pixel precision for its motion search by default, | |
1025 therefore this option comes with an overhead as more information will be | |
1026 stored in the encoded file. | |
1027 The compression gain/loss depends on the movie, but it's usually not very | |
1028 effective on anime. | |
1029 qpel always incurs a significant cost in CPU time needed to decode (+20% in | |
1030 practice). | |
1031 </para></listitem> | |
1032 | |
1033 <listitem><para> | |
1034 <emphasis role="bold">psnr</emphasis>: doesn't affect the actual encoding, | |
1035 but writes a log file giving the type/size/quality of each frame, and | |
1036 prints a sumary of PSNR (Peak Signal to Noise Ratio) at the end. | |
1037 </para></listitem> | |
1038 | |
1039 </itemizedlist> | |
1040 | |
1041 <itemizedlist> | |
1042 <title>Options not recommended to play with:</title> | |
1043 <listitem><para> | |
1044 <emphasis role="bold">vme</emphasis>: The default is best. | |
1045 </para></listitem> | |
1046 | |
1047 <listitem><para> | |
1048 <emphasis role="bold">lumi_mask, dark_mask</emphasis>: Psychovisual adaptive | |
1049 quantization. | |
1050 You don't want to play with those options if you care about quality. | |
1051 Reasonable values may be effective in your case, but be warned this is a very | |
1052 subjective. | |
1053 </para></listitem> | |
1054 | |
1055 <listitem><para> | |
1056 <emphasis role="bold">scplx_mask</emphasis>: Tries to prevent blocky | |
1057 artifacts, but postprocessing is better. | |
1058 </para></listitem> | |
1059 </itemizedlist> | |
1060 | |
1061 </sect2> | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1062 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1063 <sect2 id="menc-feat-dvd-mpeg4-example"> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1064 <title>Example</title> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1065 |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1066 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1067 So, you've just bought your shiny new copy of Harry Potter and the Chamber |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1068 of Secrets (widescreen edition, of course), and you want to rip this DVD |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1069 so that you can add it to your Home Theatre PC. This is a region 1 DVD, |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1070 so it's NTSC. The example below will still apply to PAL, except you'll |
14958 | 1071 omit <option>-ofps 24000/1001</option> (because the output framerate is the |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1072 same as the input framerate), and of course the crop dimensions will be |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1073 different. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1074 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1075 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1076 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1077 After running <option>mplayer dvd://1</option>, we follow the process |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1078 detailed in the section <link linkend="menc-feat-telecine">How to deal |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1079 with telecine and interlacing in NTSC DVDs</link> and discover that it's |
14958 | 1080 24000/1001 fps progressive video, which means that we needn't use an inverse |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1081 telecine filter, such as <option>pullup</option> or |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1082 <option>filmdint</option>. |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1083 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1084 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1085 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1086 Next, we want to determine the appropriate crop rectangle, so we use the |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1087 cropdetect filter: |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1088 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1089 <screen>mplayer dvd://1 -vf cropdetect</screen> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1090 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1091 Make sure you seek to a fully filled frame (such as a bright scene), and |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1092 you'll see in <application>MPlayer</application>'s console output: |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1093 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1094 <screen>crop area: X: 0..719 Y: 57..419 (-vf crop=720:362:0:58)</screen> |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1095 |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1096 We then play the movie back with this filter to test its correctness: |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1097 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1098 <screen>mplayer dvd://1 -vf crop=720:362:0:58</screen> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1099 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1100 And we see that it looks perfectly fine. Next, we ensure the width and |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1101 height are a multiple of 16. The width is fine, however the height is |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1102 not. Since we didn't fail 7th grade math, we know that the nearest |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1103 multiple of 16 lower than 362 is 352. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1104 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1105 |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1106 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1107 We could just use <option>crop=720:352:0:58</option>, but it'd be nice |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1108 to take a little off the top and a little off the bottom so that we |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1109 retain the center. We've shrunk the height by 10 pixels, but we don't |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1110 want to increase the y-offset by 5-pixels since that's an odd number and |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1111 will adversely affect quality. Instead, we'll increase the y-offset by |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1112 4 pixels: |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1113 |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1114 <screen>mplayer dvd://1 -vf crop=720:352:0:62</screen> |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1115 |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1116 Another reason to shave pixels from both the top and the bottom is that we |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1117 ensure we've eliminated any half-black pixels if they exist. Note that if |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1118 your video is telecined, make sure the <option>pullup</option> filter (or |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1119 whichever inverse telecine filter you decide to use) appears in the filter |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1120 chain before you crop. If it is interlaced, deinterlace before cropping. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1121 (If you choose to preserve the interlaced video, then make sure your |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1122 vertical crop offset is a multiple of 4.) |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1123 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1124 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1125 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1126 If you're really concerned about losing those 10 pixels, you might |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1127 prefer instead to scale the dimensions down to the nearest multiple of 16. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1128 The filter chain would look like: |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1129 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1130 <screen>-vf crop=720:362:0:58,scale=720:352</screen> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1131 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1132 Scaling the video down like this will mean that some small amount of |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1133 detail is lost, though it probably won't be perceptible. Scaling up will |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1134 result in lower quality (unless you increase the bitrate). Cropping |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1135 discards those pixels altogether. It's a tradeoff that you'll want to |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1136 consider for each circumstance. For example, if the DVD video was made |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1137 for television, you might want to avoid vertical scaling, since the line |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1138 sampling corresponds to the way the content was originally recorded. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1139 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1140 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1141 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1142 On inspection, we see that our movie has a fair bit of action and high |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1143 amounts of detail, so we pick 2400Kbit for our bitrate. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1144 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1145 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1146 <para> |
14422 | 1147 We're now ready to do the two pass encode. Pass one: |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1148 |
14958 | 1149 <screen>mencoder dvd://1 -ofps 24000/1001 -oac copy -vf crop=720:352:0:62,hqdn3d=2:1:2 -ovc lavc \ |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1150 -lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:autoaspect:vpass=1 \ |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1151 -o Harry_Potter_2.avi</screen> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1152 |
14422 | 1153 And pass two is the same, except that we specify <option>vpass=2</option>: |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1154 |
14958 | 1155 <screen>mencoder dvd://1 -ofps 24000/1001 -oac copy -vf crop=720:352:0:62,hqdn3d=2:1:2 -ovc lavc \ |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1156 -lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:autoaspect:vpass=2 \ |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1157 -o Harry_Potter_2.avi</screen> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1158 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1159 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1160 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1161 The options <option>v4mv:mbd=2:trell</option> will greatly increase the |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1162 quality at the expense of encoding time. There's little reason to leave |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1163 these options out when the primary goal is quality. The options |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1164 <option>cmp=3:subcmp=3:mbcmp=3</option> select a comparison function that |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1165 yields higher quality than the defaults. You might try experimenting with |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1166 this parameter (refer to the man page for the possible values) as |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1167 different functions can have a large impact on quality depending on the |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1168 source material. For example, if you find |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1169 <systemitem class="library">libavcodec</systemitem> produces too much |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1170 blocky artifacting, you could try selecting the experimental NSSE as |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1171 comparison function via <option>*cmp=10</option>. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1172 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1173 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1174 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1175 For this movie, the resulting AVI will be 138 minutes long and nearly |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1176 3GB. And because you said that file size doesn't matter, this is a |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1177 perfectly acceptable size. However, if you had wanted it smaller, you |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1178 could try a lower bitrate. Increasing bitrates have diminishing |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1179 returns, so while we might clearly see an improvement from 1800Kbit to |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1180 2000Kbit, it might not be so noticeable above 2000Kbit. Feel |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1181 free to experiment until you're happy. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1182 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1183 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1184 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1185 Because we passed the source video through a denoise filter, you may want |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1186 to add some of it back during playback. This, along with the |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1187 <option>spp</option> post-processing filter, drastically improves the |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1188 perception of quality and helps eliminate blocky artifacts in the video. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1189 With <application>MPlayer</application>'s <option>autoq</option> option, |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1190 you can vary the amount of post-processing done by the spp filter |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1191 depending on available CPU. Also, at this point, you may want to apply |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1192 gamma and/or color correction to best suit your display. For example: |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1193 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1194 <screen>mplayer Harry_Potter_2.avi -vf spp,noise=9ah:5ah,eq2=1.2 -autoq 3</screen> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1195 |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1196 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1197 </sect2> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1198 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1199 </sect1> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1200 |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1201 <sect1 id="menc-feat-telecine"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1202 <title>How to deal with telecine and interlacing within NTSC DVDs</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1203 |
14958 | 1204 <sect2 id="menc-feat-telecine-intro"> |
1205 <title>Introduction</title> | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1206 <formalpara> |
14958 | 1207 <title>What is telecine?</title> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1208 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1209 I suggest you visit this page if you don't understand much of what |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1210 is written in this document: |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1211 <ulink url="http://www.divx.com/support/guides/guide.php?gid=10">http://www.divx.com/support/guides/guide.php?gid=10</ulink> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1212 This URL links to an understandable and reasonably comprehensive |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1213 description of what telecine is. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1214 </para></formalpara> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1215 |
14958 | 1216 <formalpara> |
1217 <title>A note about the numbers.</title> | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1218 <para> |
14958 | 1219 Many documents, including the guide linked above, refer to the fields |
1220 per second value of NTSC video as 59.94 and the corresponding frames | |
1221 per second values as 29.97 (for telecined and interlaced) and 23.976 | |
1222 (for progressive). For simplicity, some documents even round these | |
1223 numbers to 60, 30, and 24. | |
1224 </para></formalpara> | |
1225 | |
1226 <para> | |
1227 Strictly speaking, all those numbers are approximations. Black and | |
1228 white NTSC video was exactly 60 fields per second, but 60000/1001 | |
1229 was later chosen to accomodate color data while remaining compatible | |
1230 with contemporary black and white televisions. Digital NTSC video | |
1231 (such as on a DVD) is also 60000/1001 fields per second. From this, | |
1232 interlaced and telecined video are derived to be 30000/1001 frames | |
1233 per second; progressive video is 24000/1001 frames per second. | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1234 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1235 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1236 <para> |
14958 | 1237 Older versions of the <application>MEncoder</application> documentation |
1238 and many archived mailing list posts refer to 59.94, 29.97, and 23.976. | |
1239 All <application>MEncoder</application> documentation has been updated | |
1240 to use the fractional values, and you should use them too. | |
1241 </para> | |
1242 | |
1243 <para> | |
1244 <option>-ofps 23.976</option> is incorrect. | |
1245 <option>-ofps 24000/1001</option> should be used instead. | |
1246 </para> | |
1247 | |
1248 <formalpara> | |
1249 <title>How telecine is used.</title> | |
1250 <para> | |
1251 All video intended to be displayed on an NTSC | |
1252 television set must be 60000/1001 fields per second. Made-for-TV movies | |
1253 and shows are often filmed directly at 60000/1001 fields per second, but | |
1254 the majority of cinema is filmed at 24 or 24000/1001 frames per | |
1255 second. When cinematic movie DVDs are mastered, the video is then | |
1256 converted for television using a process called telecine. | |
1257 </para></formalpara> | |
1258 | |
1259 <para> | |
1260 On a DVD, the video is never actually stored as 60000/1001 fields per | |
1261 second. For video that was originally 60000/1001, each pair of fields is | |
1262 combined to form a frame, resulting in 30000/1001 frames per | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1263 second. Hardware DVD players then read a flag embedded in the video |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1264 stream to determine whether the odd- or even-numbered lines should |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1265 form the first field. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1266 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1267 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1268 <para> |
14958 | 1269 Usually, 24000/1001 frames per second content stays as it is when |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1270 encoded for a DVD, and the DVD player must perform telecining |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1271 on-the-fly. Sometimes, however, the video is telecined |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1272 <emphasis>before</emphasis> being stored on the DVD; even though it |
14958 | 1273 was originally 24000/1001 frames per second, it becomes 60000/1001 fields per |
1274 second. When it is stored on the DVD, pairs of fields are combined to form | |
1275 30000/1001 frames per second. | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1276 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1277 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1278 <para> |
14958 | 1279 When looking at individual frames formed from 60000/10001 fields per |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1280 second video, telecined or otherwise, interlacing is clearly visible |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1281 wherever there is any motion, because one field (say, the |
14958 | 1282 even-numbered lines) represents a moment in time 1/(60000/1001) |
1283 seconds later than the other. Playing interlaced video on a computer | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1284 looks ugly both because the monitor is higher resolution and because |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1285 the video is shown frame-after-frame instead of field-after-field. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1286 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1287 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1288 <itemizedlist> |
14958 | 1289 <title>Notes:</title> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1290 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1291 This section only applies to NTSC DVDs, and not PAL. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1292 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1293 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1294 The example <application>MEncoder</application> lines throughout the |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1295 document are <emphasis role="bold">not</emphasis> intended for |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1296 actual use. They are simply the bare minimum required to encode the |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1297 pertaining video category. How to make good DVD rips or fine-tune |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1298 <systemitem class="library">libavcodec</systemitem> for maximum |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1299 quality is not within the scope of this document. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1300 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1301 <listitem><para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1302 There are a couple footnotes specific to this guide, linked like this: |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1303 <link linkend="menc-feat-telecine-footnotes">[1]</link> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1304 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1305 </itemizedlist> |
14958 | 1306 </sect2> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1307 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1308 <sect2 id="menc-feat-telecine-ident"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1309 <title>How to tell what type of video you have</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1310 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1311 <sect3 id="menc-feat-telecine-ident-progressive"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1312 <title>Progressive</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1313 <para> |
14958 | 1314 Progressive video was originally filmed at 24000/1001 fps, and stored |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1315 on the DVD without alteration. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1316 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1317 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1318 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1319 When you play a progressive DVD in <application>MPlayer</application>, |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1320 <application>MPlayer</application> will print the following line as |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1321 soon as the movie begins to play: |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1322 |
14958 | 1323 <screen> demux_mpg: 24000/1001 fps progressive NTSC content detected, switching framerate.</screen> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1324 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1325 From this point forward, demux_mpg should never say it finds |
14958 | 1326 "30000/1001 fps NTSC content." |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1327 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1328 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1329 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1330 When you watch progressive video, you should never see any |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1331 interlacing. Beware, however, because sometimes there is a tiny bit |
14734 | 1332 of telecine mixed in where you wouldn't expect. I've encountered TV |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1333 show DVDs that have one second of telecine at every scene change, or |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1334 at seemingly random places. I once watched a DVD that had a |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1335 progressive first half, and the second half was telecined. If you |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1336 want to be <emphasis>really</emphasis> thorough, you can scan the |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1337 entire movie: |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1338 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1339 <screen>mplayer dvd://1 -nosound -vo null -benchmark</screen> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1340 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1341 Using <option>-benchmark</option> makes |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1342 <application>MPlayer</application> play the movie as quickly as it |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1343 possibly can; still, depending on your hardware, it can take a |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1344 while. Every time demux_mpg reports a framerate change, the line |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1345 immediately above will show you the time at which the change |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1346 occurred. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1347 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1348 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1349 <para> |
14734 | 1350 Sometimes progressive video on DVDs is referred to as |
1351 "soft-telecine" because it is intended to | |
1352 be telecined by the DVD player. | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1353 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1354 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1355 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1356 <sect3 id="menc-feat-telecine-ident-telecined"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1357 <title>Telecined</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1358 <para> |
14958 | 1359 Telecined video was originally filmed at 24000/1001, but was telecined |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1360 <emphasis>before</emphasis> it was written to the DVD. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1361 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1362 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1363 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1364 <application>MPlayer</application> does not (ever) report any |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1365 framerate changes when it plays telecined video. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1366 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1367 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1368 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1369 Watching a telecined video, you will see interlacing artifacts that |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1370 seem to "blink": they repeatedly appear and disappear. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1371 You can look closely at this by |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1372 <orderedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1373 <listitem> |
14734 | 1374 <screen>mplayer dvd://1</screen> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1375 </listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1376 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1377 Seek to a part with motion. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1378 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1379 <listitem><para> |
14734 | 1380 Use the <keycap>.</keycap> key to step forward one frame at a time. |
1381 </para></listitem> | |
1382 <listitem><para> | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1383 Look at the pattern of interlaced-looking and progressive-looking |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1384 frames. If the pattern you see is PPPII,PPPII,PPPII,... then the |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1385 video is telecined. If you see some other pattern, then the video |
14734 | 1386 may have been telecined using some non-standard method; |
1387 <application>MEncoder</application> cannot losslessly convert | |
1388 non-standard telecine to progressive. If you don't see any | |
1389 pattern at all, then it is most likely interlaced. | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1390 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1391 </orderedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1392 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1393 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1394 <para> |
14734 | 1395 Sometimes telecined video on DVDs is referred to as |
14958 | 1396 "hard-telecine". Since hard-telecine is already 60000/1001 fields |
14734 | 1397 per second, the DVD player plays the video without any manipulation. |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1398 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1399 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1400 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1401 <sect3 id="menc-feat-telecine-ident-interlaced"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1402 <title>Interlaced</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1403 <para> |
14958 | 1404 Interlaced video was originally filmed at 60000/1001 fields per second, |
1405 and stored on the DVD as 30000/1001 frames per second. The interlacing effect | |
14734 | 1406 (often called "combing") is a result of combining pairs of |
14958 | 1407 fields into frames. Each field is supposed to be 1/(60000/1001) seconds apart, |
14734 | 1408 and when they are displayed simultaneously the difference is apparent. |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1409 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1410 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1411 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1412 As with telecined video, <application>MPlayer</application> should |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1413 not ever report any framerate changes when playing interlaced content. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1414 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1415 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1416 <para> |
14734 | 1417 When you view an interlaced video closely by frame-stepping with the |
1418 <keycap>.</keycap> key, you will see that every single frame is interlaced. | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1419 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1420 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1421 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1422 <sect3 id="menc-feat-telecine-ident-mixedpt"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1423 <title>Mixed progressive and telecine</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1424 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1425 All of a "mixed progressive and telecine" video was originally |
14958 | 1426 24000/1001 frames per second, but some parts of it ended up being telecined. |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1427 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1428 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1429 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1430 When <application>MPlayer</application> plays this category, it will |
14958 | 1431 (often repeatedly) switch back and forth between "30000/1001 fps NTSC" |
1432 and "24000/1001 fps progressive NTSC". Watch the bottom of | |
12578 | 1433 <application>MPlayer</application>'s output to see these messages. |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1434 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1435 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1436 <para> |
14958 | 1437 You should check the "30000/1001 fps NTSC" sections to make sure |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1438 they are actually telecine, and not just interlaced. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1439 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1440 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1441 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1442 <sect3 id="menc-feat-telecine-ident-mixedpi"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1443 <title>Mixed progressive and interlaced</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1444 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1445 In "mixed progressive and interlaced" content, progressive |
11913 | 1446 and interlaced video have been spliced together. |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1447 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1448 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1449 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1450 This category looks just like "mixed progressive and telecine", |
14958 | 1451 until you examine the 30000/1001 fps sections and see that they don't have the |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1452 telecine pattern. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1453 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1454 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1455 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1456 </sect2> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1457 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1458 <sect2 id="menc-feat-telecine-encode"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1459 <title>How to encode each category</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1460 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1461 As I mentioned in the beginning, example <application>MEncoder</application> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1462 lines below are <emphasis role="bold">not</emphasis> meant to actually be used; |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1463 they only demonstrate the minimum parameters to properly encode each category. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1464 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1465 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1466 <sect3 id="menc-feat-telecine-encode-progressive"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1467 <title>Progressive</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1468 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1469 Progressive video requires no special filtering to encode. The only |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1470 parameter you need to be sure to use is |
14958 | 1471 <option>-ofps 24000/1001</option>. Otherwise, <application>MEncoder</application> |
1472 will try to encode at 30000/1001 fps and will duplicate frames. | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1473 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1474 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1475 <para> |
14958 | 1476 <screen>mencoder dvd://1 -nosound -ovc lavc -ofps 24000/1001</screen> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1477 </para> |
14734 | 1478 |
1479 <para> | |
1480 It is often the case, however, that a video that looks progressive | |
1481 actually has very short parts of telecine mixed in. Unless you are | |
1482 sure, it is safest to treat the video as | |
1483 <link linkend="menc-feat-telecine-encode-mixedpt">mixed progressive and telecine</link>. | |
1484 The performance loss is small | |
1485 <link linkend="menc-feat-telecine-footnotes">[3]</link>. | |
1486 </para> | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1487 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1488 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1489 <sect3 id="menc-feat-telecine-encode-telecined"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1490 <title>Telecined</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1491 <para> |
14958 | 1492 Telecine can be reversed to retrieve the original 24000/1001 content, |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1493 using a process called inverse-telecine. |
14734 | 1494 <application>MPlayer</application> contains several filters to |
1495 accomplish this; the best filter, <option>pullup</option>, is described | |
1496 in the <link linkend="menc-feat-telecine-encode-mixedpt">mixed | |
1497 progressive and telecine</link> section. | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1498 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1499 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1500 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1501 <sect3 id="menc-feat-telecine-encode-interlaced"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1502 <title>Interlaced</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1503 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1504 For most practical cases it is not possible to retrieve a complete |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1505 progressive video from interlaced content. The only way to do so |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1506 without losing half of the vertical resolution is to double the |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1507 framerate and try to "guess" what ought to make up the |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1508 corresponding lines for each field (this has drawbacks - see method |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1509 3). |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1510 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1511 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1512 <orderedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1513 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1514 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1515 Encode the video in interlaced form. Normally, interlacing wreaks |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1516 havoc with the encoder's ability to compress well, but |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1517 <systemitem class="library">libavcodec</systemitem> has two |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1518 parameters specifically for dealing with storing interlaced video a |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1519 bit better: <option> ildct</option> and <option>ilme</option>. Also, |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1520 using <option>mbd=2</option> is strongly recommended |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1521 <link linkend="menc-feat-telecine-footnotes">[2] </link> because it |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1522 will encode macroblocks as non-interlaced in places where there is |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1523 no motion. Note that <option>-ofps</option> is NOT needed here. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1524 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1525 <screen>mencoder dvd://1 -nosound -ovc lavc -lavcopts ildct:ilme:mbd=2</screen> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1526 </para></listitem> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1527 <listitem><para> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1528 Use a deinterlacing filter before encoding. There are several of |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1529 these filters available to choose from, each with its own advantages |
11913 | 1530 and disadvantages. Consult <option>mplayer -pphelp</option> to see |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1531 what's available (grep for "deint"), and search the |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1532 <ulink url="http://www.mplayerhq.hu/homepage/design6/info.html#mailing_lists"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1533 MPlayer mailing lists</ulink> to find many discussions about the |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1534 various filters. Again, the framerate is not changing, so no |
11913 | 1535 <option>-ofps</option>. Also, deinterlacing should be done after |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1536 cropping <link linkend="menc-feat-telecine-footnotes">[1]</link> and |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1537 before scaling. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1538 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1539 <screen>mencoder dvd://1 -nosound -vf pp=lb -ovc lavc</screen> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1540 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1541 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1542 Unfortunately, this option is buggy with |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1543 <application>MEncoder</application>; it ought to work well with |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1544 <application>MEncoder G2</application>, but that isn't here yet. You |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1545 might experience crahes. Anyway, the purpose of <option> -vf |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1546 tfields</option> is to create a full frame out of each field, which |
14958 | 1547 makes the framerate 60000/1001. The advantage of this approach is that no |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1548 data is ever lost; however, since each frame comes from only one |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1549 field, the missing lines have to be interpolated somehow. There are |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1550 no very good methods of generating the missing data, and so the |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1551 result will look a bit similar to when using some deinterlacing |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1552 filters. Generating the missing lines creates other issues, as well, |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1553 simply because the amount of data doubles. So, higher encoding |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1554 bitrates are required to maintain quality, and more CPU power is |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1555 used for both encoding and decoding. tfields has several different |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1556 options for how to create the missing lines of each frame. If you |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1557 use this method, then Reference the manual, and chose whichever |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1558 option looks best for your material. Note that when using |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1559 <option>tfields</option> you |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1560 <emphasis role="bold">have to</emphasis> specify both |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1561 <option>-fps</option> and <option>-ofps</option> to be twice the |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1562 framerate of your original source. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1563 |
14958 | 1564 <screen>mencoder dvd://1 -nosound -vf tfields=2 -ovc lavc -fps 60000/1001 -ofps 60000/1001</screen> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1565 </para></listitem> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1566 <listitem><para> |
14734 | 1567 If you plan on downscaling dramatically, you can extract and encode |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1568 only one of the two fields. Of course, you'll lose half the vertical |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1569 resolution, but if you plan on downscaling to at most 1/2 of the |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1570 original, the loss won't matter much. The result will be a |
14958 | 1571 progressive 30000/1001 frames per second file. The procedure is to use |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1572 <option>-vf field</option>, then crop |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1573 <link linkend="menc-feat-telecine-footnotes">[1]</link> and scale |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1574 appropriately. Remember that you'll have to adjust the scale to |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1575 compensate for the vertical resolution being halved. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1576 <screen>mencoder dvd://1 -nosound -vf field=0 -ovc lavc</screen> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1577 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1578 </orderedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1579 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1580 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1581 <sect3 id="menc-feat-telecine-encode-mixedpt"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1582 <title>Mixed progressive and telecine</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1583 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1584 In order to turn mixed progressive and telecine video into entirely |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1585 progressive video, the telecined parts have to be |
14734 | 1586 inverse-telecined. There are three ways to accomplish this, |
1587 described below. Note that you should | |
1588 <emphasis role="bold">always</emphasis> inverse-telecine before any | |
1589 rescaling; unless you really know what you're doing, | |
1590 inverse-telecine before cropping, too | |
1591 <link linkend="menc-feat-telecine-footnotes">[1]</link>. | |
14958 | 1592 <option>-ofps 24000/1001</option> is needed here because the output video |
1593 will be 24000/1001 frames per second. | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1594 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1595 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1596 <itemizedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1597 <listitem><para> |
14734 | 1598 <option>-vf pullup</option> is designed to inverse-telecine |
1599 telecined material while leaving progressive data alone. In order to | |
1600 work properly, <option>pullup</option> <emphasis role="bold">must</emphasis> | |
1601 be followed by the <option>softskip</option> filter or | |
1602 else <application>MEncoder</application> will crash. | |
1603 <option>pullup</option> is, however, the cleanest and most | |
1604 accurate method available for encoding both telecine and | |
1605 "mixed progressive and telecine". | |
1606 | |
14958 | 1607 <screen>mencoder dvd://1 -nosound -vf pullup,softskip -ovc lavc -ofps 24000/1001</screen> |
14734 | 1608 </para> |
1609 | |
1610 | |
1611 </listitem> | |
1612 <listitem><para> | |
1613 An older method | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1614 is to, rather than inverse-telecine the telecined parts, telecine |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1615 the non-telecined parts and then inverse-telecine the whole |
11913 | 1616 video. Sound confusing? softpulldown is a filter that goes through |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1617 a video and makes the entire file telecined. If we follow |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1618 softpulldown with either <option>detc</option> or |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1619 <option>ivtc</option>, the final result will be entirely |
14958 | 1620 progressive. <option>-ofps 24000/1001</option> is needed. |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1621 |
14958 | 1622 <screen>mencoder dvd://1 -nosound -vf softpulldown,ivtc=1 -ovc lavc -ofps 24000/1001</screen> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1623 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1624 </listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1625 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1626 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1627 I haven't used <option>-vf filmdint</option> myself, but here's what |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1628 D Richard Felker III has to say: |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1629 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1630 <blockquote><para>It's OK, but IMO it tries to deinterlace rather |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1631 than doing inverse telecine too often (much like settop DVD |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1632 players & progressive TVs) which gives ugly flickering and |
15010 | 1633 other artifacts. If you're going to use it, you at least need to |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1634 spend some time tuning the options and watching the output first |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1635 to make sure it's not messing up.</para></blockquote> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1636 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1637 </itemizedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1638 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1639 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1640 <sect3 id="menc-feat-telecine-encode-mixedpi"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1641 <title>Mixed progressive and interlaced</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1642 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1643 There are two options for dealing with this category, each of |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1644 which is a compromise. You should decide based on the |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1645 duration/location of each type. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1646 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1647 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1648 <itemizedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1649 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1650 Treat it as progressive. The interlaced parts will look interlaced, |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1651 and some of the interlaced fields will have to be dropped, resulting |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1652 in a bit of uneven jumpiness. You can use a postprocessing filter if |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1653 you want to, but it may slightly degrade the progressive parts. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1654 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1655 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1656 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1657 This option should definitely not be used if you want to eventually |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1658 display the video on an interlaced device (with a TV card, for |
14958 | 1659 example). If you have interlaced frames in a 24000/1001 frames per |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1660 second video, they will be telecined along with the progressive |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1661 frames. Half of the interlaced "frames" will be displayed for three |
14958 | 1662 fields' duration (3/(60000/1001) seconds), resulting in a flicking |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1663 "jump back in time" effect that looks quite bad. If you |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1664 even attempt this, you <emphasis role="bold">must</emphasis> use a |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1665 deinterlacing filter like <option>lb</option> or |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1666 <option>l5</option>. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1667 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1668 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1669 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1670 It may also be a bad idea for progressive display, too. It will drop |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1671 pairs of consecutive interlaced fields, resulting in a discontinuity |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1672 that can be more visible than with the second method, which shows |
14958 | 1673 some progressive frames twice. 30000/1001 frames per second interlaced |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1674 video is already a bit choppy because it really should be shown at |
14958 | 1675 60000/1001 fields per second, so the duplicate frames don't stand out as |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1676 much. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1677 </para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1678 |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1679 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1680 Either way, it's best to consider your content and how you intend to |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1681 display it. If your video is 90% progressive and you never intend to |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1682 show it on a TV, you should favor a progressive approach. If it's |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1683 only half progressive, you probably want to encode it as if it's all |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1684 interlaced. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1685 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1686 </listitem> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1687 |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1688 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1689 Treat it as interlaced. Some frames of the progressive parts will |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1690 need to be duplicated, resulting in uneven jumpiness. Again, |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1691 deinterlacing filters may slightly degrade the progressive parts. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1692 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1693 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1694 </itemizedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1695 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1696 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1697 </sect2> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1698 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1699 <sect2 id="menc-feat-telecine-footnotes"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1700 <title>Footnotes</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1701 <orderedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1702 <listitem><formalpara> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1703 <title>About cropping:</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1704 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1705 Video data on DVDs are stored in a format called YUV 4:2:0. In YUV |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1706 video, luma ("brightness") and chroma ("color") |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1707 are stored separately. Because the human eye is somewhat less |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1708 sensitive to color than it is to brightness, in a YUV 4:2:0 picture |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1709 there is only one chroma pixel for every four luma pixels. In a |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1710 progressive picture, each square of four luma pixels (two on each |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1711 side) has one common chroma pixel. You must crop progressive YUV |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1712 4:2:0 to even resolutions, and use even offsets. For example, |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1713 <option>crop=716:380:2:26</option> is OK but |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1714 <option>crop=716:380:3:26 </option> is not. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1715 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1716 </formalpara> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1717 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1718 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1719 When you are dealing with interlaced YUV 4:2:0, the situation is a |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1720 bit more complicated. Instead of every four luma pixels in the |
11913 | 1721 <emphasis>frame</emphasis> sharing a chroma pixel, every four luma |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1722 pixels in each <emphasis> field</emphasis> share a chroma |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1723 pixel. When fields are interlaced to form a frame, each scanline is |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1724 one pixel high. Now, instead of all four luma pixels being in a |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1725 square, there are two pixels side-by-side, and the other two pixels |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1726 are side-by-side two scanlines down. The two luma pixels in the |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1727 intermediate scanline are from the other field, and so share a |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1728 different chroma pixel with two luma pixels two scanlines away. All |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1729 this confusion makes it necessary to have vertical crop dimensions |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1730 and offsets be multiples of four. Horizontal can stay even. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1731 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1732 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1733 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1734 For telecined video, I recommend that cropping take place after |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1735 inverse telecining. Once the video is progressive you only need to |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1736 crop by even numbers. If you really want to gain the slight speedup |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1737 that cropping first may offer, you must crop vertically by multiples |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1738 of four or else the inverse-telecine filter won't have proper data. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1739 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1740 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1741 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1742 For interlaced (not telecined) video, you must always crop |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1743 vertically by multiples of four unless you use <option>-vf |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1744 field</option> before cropping. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1745 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1746 </listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1747 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1748 <listitem><formalpara> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1749 <title>About encoding parameters and quality:</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1750 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1751 Just because I recommend <option>mbd=2</option> here doesn't mean it |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1752 shouldn't be used elsewhere. Along with <option>trell</option>, |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1753 <option>mbd=2</option> is one of the two |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1754 <systemitem class="library">libavcodec</systemitem> options that |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1755 increases quality the most, and you should always use at least those |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1756 two unless the drop in encoding speed is prohibitive (e.g. realtime |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1757 encoding). There are many other options to |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1758 <systemitem class="library">libavcodec</systemitem> that increase |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1759 encoding quality (and decrease encoding speed) but that is beyond |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1760 the scope of this document. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1761 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1762 </formalpara> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1763 </listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1764 |
14734 | 1765 <listitem><formalpara> |
1766 <title>About the performance of pullup:</title> | |
1767 <para> | |
1768 It is safe to use <option>pullup</option> (along with <option>softskip | |
1769 </option>) on progressive video, and is usually a good idea unless | |
1770 the source has been definitively verified to be entirely progressive. | |
1771 The performace loss is small for most cases. On a bare-minimum encode, | |
1772 <option>pullup</option> causes <application>MEncoder</application> to | |
1773 be 50% slower. Adding sound processing and advanced <option>lavcopts | |
14828
37112d48fb50
grammar fix by Corey Hickey <bugfood-ml at fatooh dot org>
diego
parents:
14734
diff
changeset
|
1774 </option> overshadows that difference, bringing the performance |
14734 | 1775 decrease of using <option>pullup</option> down to 2%. |
1776 </para> | |
1777 </formalpara> | |
1778 </listitem> | |
1779 | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1780 </orderedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1781 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1782 </sect2> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1783 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1784 </sect1> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1785 |
9675 | 1786 </chapter> |