Mercurial > mplayer.hg
annotate DOCS/xml/en/mencoder.xml @ 15148:067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
obtained with MEncoder into different containers.
Based on Rich's guide and some tips by Nico Sabi.
Reviewed by The Wanderer, Dominik 'Rathann' Mierzejewski and Diego Biurrun
author | gpoirier |
---|---|
date | Wed, 13 Apr 2005 18:53:30 +0000 |
parents | f9490925a69d |
children | 0f3be1ff01fb |
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 | |
15029 | 11 collected from several mailing list threads on MPlayer-users. Search the |
9675 | 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-enc-libavcodec"> | |
11822
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
144 <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
|
145 codec family</title> |
9675 | 146 |
147 <para> | |
11822
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
148 <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
|
149 provides simple encoding to a lot of interesting video and audio formats. |
11747 | 150 You can encode to the following codecs (more or less up to date): |
9675 | 151 |
152 <informaltable frame="all"> | |
153 <tgroup cols="2"> | |
154 <thead> | |
155 <row><entry>Codec name</entry><entry>Description</entry></row> | |
156 </thead> | |
157 <tbody> | |
158 <row><entry>mjpeg</entry><entry> | |
159 Motion JPEG | |
160 </entry></row> | |
10869 | 161 <row><entry>ljpeg</entry><entry> |
162 Lossless JPEG | |
163 </entry></row> | |
9675 | 164 <row><entry>h263</entry><entry> |
13111 | 165 H.263 |
9675 | 166 </entry></row> |
167 <row><entry>h263p</entry><entry> | |
13111 | 168 H.263+ |
9675 | 169 </entry></row> |
170 <row><entry>mpeg4</entry><entry> | |
14024 | 171 ISO standard MPEG-4 (DivX 5, XVID compatible) |
9675 | 172 </entry></row> |
173 <row><entry>msmpeg4</entry><entry> | |
14024 | 174 pre-standard MPEG-4 variant by MS, v3 (AKA DivX3) |
9675 | 175 </entry></row> |
176 <row><entry>msmpeg4v2</entry><entry> | |
14024 | 177 pre-standard MPEG-4 by MS, v2 (used in old asf files) |
9675 | 178 </entry></row> |
10869 | 179 <row><entry>wmv1</entry><entry> |
13222 | 180 Windows Media Video, version 1 (AKA WMV7) |
9675 | 181 </entry></row> |
10869 | 182 <row><entry>wmv2</entry><entry> |
13222 | 183 Windows Media Video, version 2 (AKA WMV8) |
10869 | 184 </entry></row> |
9675 | 185 <row><entry>rv10</entry><entry> |
186 an old RealVideo codec | |
187 </entry></row> | |
188 <row><entry>mpeg1video</entry><entry> | |
14024 | 189 MPEG-1 video |
10869 | 190 </entry></row> |
191 <row><entry>mpeg2video</entry><entry> | |
14024 | 192 MPEG-2 video |
9675 | 193 </entry></row> |
194 <row><entry>huffyuv</entry><entry> | |
195 lossless compression | |
196 </entry></row> | |
10869 | 197 <row><entry>asv1</entry><entry> |
198 ASUS Video v1 | |
199 </entry></row> | |
200 <row><entry>asv2</entry><entry> | |
201 ASUS Video v2 | |
202 </entry></row> | |
203 <row><entry>ffv1</entry><entry> | |
204 FFmpeg's lossless video codec | |
205 </entry></row> | |
9675 | 206 </tbody> |
207 </tgroup> | |
208 </informaltable> | |
209 | |
210 The first column contains the codec names that should be passed after the | |
211 <literal>vcodec</literal> config, like: <option>-lavcopts vcodec=msmpeg4</option> | |
212 </para> | |
213 | |
214 <informalexample> | |
215 <para> | |
216 An example, with MJPEG compression: | |
10184
b6c63ab184a4
Changed a few remaining -dvd and -vcd options to dvd:// and vcd://.
diego
parents:
10065
diff
changeset
|
217 <screen>mencoder dvd://2 -o title2.avi -ovc lavc -lavcopts vcodec=mjpeg -oac copy</screen> |
9675 | 218 </para> |
219 </informalexample> | |
220 </sect1> | |
221 | |
222 | |
223 <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
|
224 <title>Encoding from multiple input image files (JPEG, PNG, TGA, SGI)</title> |
9675 | 225 |
226 <para> | |
227 <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
|
228 or more JPEG, PNG or TGA files. With simple framecopy it can create MJPEG |
9675 | 229 (Motion JPEG), MPNG (Motion PNG) or MTGA (Motion TGA) files. |
230 </para> | |
231 | |
232 <orderedlist> | |
233 <title>Explanation of the process:</title> | |
234 <listitem><para> | |
235 <application>MEncoder</application> <emphasis>decodes</emphasis> the input image(s) with | |
236 <systemitem class="library">libjpeg</systemitem> (when decoding PNGs, it | |
237 will use <systemitem class="library">libpng</systemitem>). | |
238 </para></listitem> | |
239 <listitem><para> | |
240 <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
|
241 chosen video compressor (DivX4, XviD, FFmpeg msmpeg4, etc.). |
9675 | 242 </para></listitem> |
243 </orderedlist> | |
244 | |
245 <formalpara> | |
246 <title>Examples</title> | |
247 <para> | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
248 The explanation of the <option>-mf</option> option is in the man page. |
9675 | 249 |
250 <informalexample> | |
251 <para> | |
14024 | 252 Creating an MPEG-4 file from all the JPEG files in the current directory: |
9675 | 253 <screen> |
14093
3bf74bf969ff
Unify all image encoding examples and fix a typo (*.jpg vs *.png) noticed
diego
parents:
14024
diff
changeset
|
254 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
|
255 </screen> |
9675 | 256 </para> |
257 </informalexample> | |
258 | |
259 <informalexample> | |
260 <para> | |
14024 | 261 Creating an MPEG-4 file from some JPEG files in the current directory: |
9675 | 262 <screen> |
14093
3bf74bf969ff
Unify all image encoding examples and fix a typo (*.jpg vs *.png) noticed
diego
parents:
14024
diff
changeset
|
263 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
|
264 </screen> |
9675 | 265 </para> |
266 </informalexample> | |
267 | |
268 <informalexample> | |
269 <para> | |
270 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
|
271 directory: |
9675 | 272 <screen> |
14093
3bf74bf969ff
Unify all image encoding examples and fix a typo (*.jpg vs *.png) noticed
diego
parents:
14024
diff
changeset
|
273 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
|
274 </screen> |
9675 | 275 </para> |
276 </informalexample> | |
277 | |
278 <informalexample> | |
279 <para> | |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
280 Creating an uncompressed file from all the PNG files in the current directory: |
9675 | 281 <screen> |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
282 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
|
283 </screen> |
9675 | 284 </para> |
285 </informalexample> | |
286 | |
287 <note><para> | |
288 Width must be integer multiple of 4, it's a limitation of the RAW RGB AVI format. | |
289 </para></note> | |
290 | |
291 <informalexample> | |
292 <para> | |
293 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
|
294 directory: |
9675 | 295 <screen> |
14093
3bf74bf969ff
Unify all image encoding examples and fix a typo (*.jpg vs *.png) noticed
diego
parents:
14024
diff
changeset
|
296 mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc copy -oac copy -o <replaceable>output.avi</replaceable> <!-- |
9675 | 297 --></screen> |
298 </para> | |
299 </informalexample> | |
300 | |
301 <informalexample> | |
302 <para> | |
303 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
|
304 directory: |
9675 | 305 <screen> |
12399
9403b245fcda
Obsolet -mf syntax replaced by mf://, based on a patch sent by Compn, bug
diego
parents:
11913
diff
changeset
|
306 mencoder mf://*.tga -mf w=800:h=600:fps=25:type=tga -ovc copy -oac copy -o <replaceable>output.avi</replaceable><!-- |
9675 | 307 --></screen> |
308 </para> | |
309 </informalexample> | |
310 | |
311 </para> | |
312 </formalpara> | |
313 </sect1> | |
314 | |
315 | |
316 <sect1 id="menc-feat-extractsub"> | |
12615 | 317 <title>Extracting DVD subtitles to VOBsub file</title> |
9675 | 318 |
319 <para> | |
320 <application>MEncoder</application> is capable of extracting subtitles from | |
12615 | 321 a DVD into VOBsub formatted files. They consist of a pair of files ending in |
9675 | 322 <filename>.idx</filename> and <filename>.sub</filename> and are usually |
323 packaged in a single <filename>.rar</filename> archive. | |
324 <application>MPlayer</application> can play these with the | |
325 <option>-vobsub</option> and <option>-vobsubid</option> options. | |
326 </para> | |
327 | |
328 <para> | |
329 You specify the basename (i.e without the <filename>.idx</filename> or | |
330 <filename>.sub</filename> extension) of the output files with | |
331 <option>-vobsubout</option> and the index for this subtitle in the | |
332 resulting files with <option>-vobsuboutindex</option>. | |
333 </para> | |
334 | |
335 <para> | |
336 If the input is not from a DVD you should use <option>-ifo</option> to | |
337 indicate the <filename>.ifo</filename> file needed to construct the | |
338 resulting <filename>.idx</filename> file. | |
339 </para> | |
340 | |
341 <para> | |
342 If the input is not from a DVD and you do not have the | |
343 <filename>.ifo</filename> file you will need to use the | |
344 <option>-vobsubid</option> option to let it know what language id to put in | |
345 the <filename>.idx</filename> file. | |
346 </para> | |
347 | |
348 <para> | |
349 Each run will append the running subtitle if the <filename>.idx</filename> | |
350 and <filename>.sub</filename> files already exist. So you should remove any | |
351 before starting. | |
352 </para> | |
353 | |
354 <example> | |
14421 | 355 <title>Copying two subtitles from a DVD while doing two pass encoding</title> |
9675 | 356 <screen> |
357 rm subtitles.idx subtitles.sub | |
12776 | 358 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
|
359 mencoder dvd://1 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -vobsubout subtitles -vobsuboutindex 1 -sid 5<!-- |
9675 | 360 --></screen> |
361 </example> | |
362 | |
363 <example> | |
364 <title>Copying a french subtitle from an MPEG file</title> | |
365 <screen> | |
366 rm subtitles.idx subtitles.sub | |
11710 | 367 mencoder <replaceable>movie.mpg</replaceable> -ifo <replaceable>movie.ifo</replaceable> -vobsubout subtitles -vobsuboutindex 0 -vobsuboutid fr -sid 1<!-- |
9675 | 368 --></screen> |
369 </example> | |
370 | |
371 </sect1> | |
372 | |
373 <sect1 id="aspect"> | |
374 <title>Preserving aspect ratio</title> | |
375 <para> | |
14024 | 376 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
|
377 describes how the player should scale the video stream, so humans won't |
9675 | 378 have egg heads (ex.: 480x480 + 4:3 = 640x480). However when encoding to AVI |
379 (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
|
380 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
|
381 way! |
9675 | 382 </para> |
383 | |
384 <para>There is</para> | |
385 | |
386 <para> | |
14024 | 387 MPEG-4 has an unique feature: the video stream can contain its needed aspect |
388 ratio. Yes, just like MPEG-1/2 (DVD, SVCD) and H.263 files. Regretfully, there are | |
9675 | 389 <emphasis role="bold">no</emphasis> video players outside which support this |
14024 | 390 attribute of MPEG-4, except <application>MPlayer</application>. |
9675 | 391 </para> |
392 | |
393 <para> | |
11822
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
394 This feature can be used only with |
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
395 <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>'s |
10869 | 396 <systemitem>mpeg4</systemitem> codec. Keep in mind: although |
397 <application>MPlayer</application> will correctly play the created file, | |
398 other players will use the wrong aspect ratio. | |
9675 | 399 </para> |
400 | |
401 <para> | |
402 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
|
403 See the man page for the usage of the <systemitem>cropdetect</systemitem> and |
9675 | 404 <systemitem>crop</systemitem> filters. |
405 </para> | |
406 | |
407 <para> | |
10869 | 408 Usage |
11710 | 409 <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 | 410 </para> |
10869 | 411 </sect1> |
412 | |
413 <sect1 id="custommatrices"><title>Custom inter/intra matrices</title> | |
414 | |
415 <para> | |
11822
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
416 With this feature of |
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11820
diff
changeset
|
417 <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link> |
13022 | 418 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
|
419 (P-frames/predicted frames) matrices. It is supported by many of the codecs: |
10869 | 420 <systemitem>mpeg1video</systemitem> and <systemitem>mpeg2video</systemitem> |
421 are reported as working. | |
422 </para> | |
423 | |
424 <para> | |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
425 A typical usage of this feature is to set the matrices preferred by the |
10869 | 426 <ulink url="http://www.kvcd.net/">KVCD</ulink> specifications. |
427 </para> | |
428 | |
429 <para> | |
430 The <emphasis role="bold">KVCD "Notch" Quantization Matrix:</emphasis> | |
431 </para> | |
432 | |
433 <para> | |
434 Intra: | |
435 <screen> | |
436 8 9 12 22 26 27 29 34 | |
437 9 10 14 26 27 29 34 37 | |
438 12 14 18 27 29 34 37 38 | |
439 22 26 27 31 36 37 38 40 | |
440 26 27 29 36 39 38 40 48 | |
441 27 29 34 37 38 40 48 58 | |
442 29 34 37 38 40 48 58 69 | |
443 34 37 38 40 48 58 69 79 | |
444 </screen> | |
445 | |
446 Inter: | |
447 <screen> | |
448 16 18 20 22 24 26 28 30 | |
449 18 20 22 24 26 28 30 32 | |
450 20 22 24 26 28 30 32 34 | |
451 22 24 26 30 32 32 34 36 | |
452 24 26 28 32 34 34 36 38 | |
453 26 28 30 32 34 36 38 40 | |
454 28 30 32 34 36 38 42 42 | |
455 30 32 34 36 38 40 42 44 | |
456 </screen> | |
457 </para> | |
458 | |
459 <para> | |
460 Usage: | |
461 <screen> | |
11710 | 462 $ mencoder <replaceable>input.avi</replaceable> -o <replaceable>output.avi</replaceable> -oac copy -ovc lavc -lavcopts inter_matrix=...:intra_matrix=... |
10869 | 463 </screen> |
464 </para> | |
465 | |
466 <para> | |
467 <screen> | |
11710 | 468 $ mencoder <replaceable>input.avi</replaceable> -ovc lavc -lavcopts |
10869 | 469 vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37, |
470 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, | |
471 29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79 | |
472 :inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26, | |
473 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, | |
474 36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44 -oac copy -o svcd.mpg | |
475 </screen> | |
476 </para> | |
9675 | 477 </sect1> |
478 | |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
479 <sect1 id="menc-feat-dvd-mpeg4"> |
14024 | 480 <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
|
481 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
482 <para> |
15034 | 483 One frequently asked question is "How do I make the highest quality rip for |
15010 | 484 a given size?". Another question is "How do I make the highest quality DVD |
485 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
|
486 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
487 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
488 <para> |
15010 | 489 The latter question is perhaps at least somewhat wrongly posed. After all, if |
490 you don't care about file size, why not simply copy the entire MPEG-2 video | |
491 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
|
492 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
|
493 this is certainly your best option. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
494 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
495 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
496 <para> |
14024 | 497 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
|
498 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
|
499 file size. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
500 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
501 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
502 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
503 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
|
504 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
|
505 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
|
506 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
|
507 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
|
508 <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
|
509 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
|
510 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
511 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
512 <para> |
15010 | 513 If this seems to be too much for you, you should probably use one of the |
15034 | 514 many fine frontends that are listed in the |
515 <ulink url="http://mplayerhq.hu/homepage/design7/projects.html#mencoder_frontends">MEncoder section</ulink> | |
516 of our related projects page. | |
15010 | 517 That way, you should be able to achieve high quality rips without too much |
518 thinking, because most of those tools are designed to take clever decisions | |
519 for you. | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
520 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
521 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
522 <sect2 id="menc-feat-dvd-mpeg4-2pass"> |
14421 | 523 <title>Constant Quantizer vs. two pass</title> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
524 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
525 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
526 There are three approaches to encoding the video: constant bitrate |
14421 | 527 (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
|
528 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
529 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
530 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
531 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
|
532 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
|
533 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
|
534 quality and higher the bitrate. The method |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
535 <systemitem class="library">libavcodec</systemitem> uses to determine |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
536 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
|
537 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
|
538 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
|
539 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
540 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
541 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
542 When you specify a constant bitrate, <systemitem |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
543 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
|
544 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
|
545 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
|
546 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
|
547 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
|
548 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
|
549 <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
|
550 possible quantizer for each macroblock (as specified by |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
551 <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
|
552 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
|
553 is forced to use a higher quantizer, then you're almost certainly ruining |
15010 | 554 the quality of your video. |
15034 | 555 In order to avoid that, you should probably downscale your video, according |
556 to the method described later on in this guide. | |
15010 | 557 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
|
558 </para> |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
559 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
560 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
561 With constant quantizer, <systemitem |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
562 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
|
563 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
|
564 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
|
565 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
|
566 (peak signal-to-noise ratio) as CBR with |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
567 <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
|
568 of 2. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
569 </para> |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
570 |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
571 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
572 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
|
573 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
|
574 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
|
575 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
|
576 CPU has as many cycles as there is time, but there's only so many bits |
13523 | 577 on your hard disk. |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
578 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
579 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
580 <para> |
14421 | 581 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
|
582 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
|
583 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
|
584 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
|
585 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
|
586 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
|
587 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
588 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
589 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
590 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
|
591 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
|
592 quality rip. Suppose you rip a DVD at <option>vqscale=3</option>, and |
14421 | 593 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
|
594 <option>vbitrate=1800</option>, the resulting video will have <emphasis |
14734 | 595 role="bold">higher quality</emphasis> for the |
596 <emphasis role="bold">same bitrate</emphasis>. | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
597 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
598 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
599 <para> |
14421 | 600 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
|
601 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
|
602 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
|
603 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
|
604 depending on the source video. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
605 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
606 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
607 <para> |
15010 | 608 If size doesn't matter, a good starting point for a very high quality |
609 rip is about 2000Kbit plus or minus 200Kbit. | |
610 For fast action or high detail source video, or if you just have a very | |
611 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
|
612 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
|
613 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
|
614 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
615 |
15010 | 616 <para> |
617 If you aim at a certain size, you will have to somehow calculate the bitrate. | |
618 But before that, you need to know how much space you should reserve for the | |
619 audio track(s), so you should <link linkend="menc-feat-dvd-mpeg4-audio">rip | |
620 those</link> first. | |
621 You can compute the bitrate with the following equation: | |
15131
3f01fef97002
Fix HTML generation, <equation> is more elaborate in most DTDs.
diego
parents:
15129
diff
changeset
|
622 <systemitem>bitrate = (target_size_in_Mbytes - sound_size_in_Mbytes) * |
3f01fef97002
Fix HTML generation, <equation> is more elaborate in most DTDs.
diego
parents:
15129
diff
changeset
|
623 1024 * 1024 / length_in_secs * 8 / 1000</systemitem> |
15034 | 624 For instance, to squeeze a two-hour movie onto a 702MB CD, with 60MB |
15113
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
625 of audio track, the video bitrate will have to be: |
15131
3f01fef97002
Fix HTML generation, <equation> is more elaborate in most DTDs.
diego
parents:
15129
diff
changeset
|
626 <systemitem>(702 - 60) * 1024 * 1024 / (120*60) * 8 / 1000 |
3f01fef97002
Fix HTML generation, <equation> is more elaborate in most DTDs.
diego
parents:
15129
diff
changeset
|
627 = 740kbps</systemitem> |
15010 | 628 </para> |
629 | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
630 </sect2> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
631 |
15113
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
632 |
15114
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
633 <sect2 id="menc-feat-dvd-mpeg4-constraints"> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
634 <title>Constraints for efficient encoding</title> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
635 |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
636 <para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
637 Due to the nature of MPEG-type compression, there are various |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
638 constraints you should follow for maximal quality. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
639 MPEG splits the video up into 16x16 squares called macroblocks, |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
640 each composed of 4 8x8 blocks of luma (intensity) information and two |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
641 half-resolution 8x8 chroma (color) blocks (one for red-cyan axis and |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
642 the other for the blue-yellow axis). |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
643 Even if your movie width and height are not multiples of 16, the |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
644 encoder will use enough 16x16 macroblocks to cover the whole picture |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
645 area, and the extra space will go to waste. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
646 So in the interests of maximizing quality at a fixed filesize, it is |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
647 a bad idea to use dimensions that are not multiples of 16. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
648 </para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
649 |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
650 <para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
651 Most DVDs also have some degree of black borders at the edges. Leaving |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
652 these in place can hurt quality in several ways. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
653 </para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
654 |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
655 <orderedlist> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
656 <listitem> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
657 <para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
658 MPEG-type compression is also highly dependent on frequency domain |
15129 | 659 transformations, in particular the Discrete Cosine Transform (DCT), |
15114
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
660 which is similar to the Fourier transform. This sort of encoding is |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
661 efficient for representing patterns and smooth transitions, but it |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
662 has a hard time with sharp edges. In order to encode them it must |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
663 use many more bits, or else an artifact known as ringing will |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
664 appear. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
665 </para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
666 |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
667 <para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
668 The frequency transform (DCT) takes place separately on each |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
669 macroblock (actually each block), so this problem only applies when |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
670 the sharp edge is inside a block. If your black borders begin |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
671 exactly at multiple-of-16 pixel boundaries, this is not a problem. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
672 However, the black borders on DVDs rarely come nicely aligned, so |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
673 in practice you will always need to crop to avoid this penalty. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
674 </para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
675 </listitem> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
676 </orderedlist> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
677 |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
678 <para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
679 In addition to frequency domain transforms, MPEG-type compression uses |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
680 motion vectors to represent the change from one frame to the next. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
681 Motion vectors naturally work much less efficiently for new content |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
682 coming in from the edges of the picture, because it is not present in |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
683 the previous frame. As long as the picture extends all the way to the |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
684 edge of the encoded region, motion vectors have no problem with |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
685 content moving out the edges of the picture. However, in the presence |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
686 of black borders, there can be trouble: |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
687 </para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
688 |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
689 <orderedlist continuation="continues"> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
690 <listitem> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
691 <para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
692 For each macroblock, MPEG-type compression stores a vector |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
693 identifying which part of the previous frame should be copied into |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
694 this macroblock as a base for predicting the next frame. Only the |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
695 remaining differences need to be encoded. If a macroblock spans the |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
696 edge of the picture and contains part of the black border, then |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
697 motion vectors from other parts of the picture will overwrite the |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
698 black border. This means that lots of bits must be spent either |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
699 re-blackening the border that was overwritten, or (more likely) a |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
700 motion vector won't be used at all and all the changes in this |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
701 macroblock will have to be coded explicitly. Either way, encoding |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
702 efficiency is greatly reduced. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
703 </para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
704 |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
705 <para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
706 Again, this problem only applies if black borders do not line up on |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
707 multiple-of-16 boundaries. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
708 </para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
709 </listitem> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
710 |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
711 <listitem> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
712 <para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
713 Finally, suppose we have a macroblock in the interior of the |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
714 picture, and an object is moving into this block from near the edge |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
715 of the image. MPEG-type coding can't say "copy the part that's |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
716 inside the picture but not the black border." So the black border |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
717 will get copied inside too, and lots of bits will have to be spent |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
718 encoding the part of the picture that's supposed to be there. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
719 </para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
720 |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
721 <para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
722 If the picture runs all the way to the edge of the encoded area, |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
723 MPEG has special optimizations to repeatedly copy the pixels at the |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
724 edge of the picture when a motion vector comes from outside the |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
725 encoded area. This feature becomes useless when the movie has black |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
726 borders. Unlike problems 1 and 2, aligning the borders at multiples |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
727 of 16 does not help here. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
728 </para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
729 </listitem> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
730 |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
731 <listitem> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
732 <para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
733 Depite the borders being entirely black and never changing, there |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
734 is at least a minimal amount of overhead involved in having more |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
735 macroblocks. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
736 </para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
737 </listitem> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
738 </orderedlist> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
739 |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
740 <para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
741 For all of these reasons, it's recommended to fully crop black |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
742 borders. Further, if there is an area of noise/distortion at the edge |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
743 of the picture, cropping this will improve encoding efficiency as |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
744 well. Videophile purists who want to preserve the original as close as |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
745 possible may object to this cropping, but unless you plan to encode at |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
746 constant quantizer, the quality you gain from cropping will |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
747 considerably exceed the amount of information lost at the edges. |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
748 </para> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
749 </sect2> |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
750 |
3d462baeb78e
New section "Constraints for efficient encoding",
gpoirier
parents:
15113
diff
changeset
|
751 |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
752 <sect2 id="menc-feat-dvd-mpeg4-crop"> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
753 <title>Cropping and Scaling</title> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
754 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
755 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
756 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
|
757 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
|
758 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
|
759 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
|
760 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
|
761 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
762 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
763 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
764 <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
|
765 will determine the crop rectangle (<option>-vf cropdetect</option>). |
14024 | 766 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
|
767 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
|
768 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
|
769 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
|
770 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
|
771 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
|
772 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
|
773 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
|
774 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
|
775 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
|
776 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
|
777 at this in our example below. |
15010 | 778 You can actually let the <option>cropdetect</option> filter do all of the |
779 above for you, as it has an optional <option>round</option> parameter that | |
780 is equal to 16 by default. | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
781 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
782 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
783 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
784 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
|
785 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
|
786 are better spent elsewhere. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
787 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
788 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
789 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
790 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
|
791 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
|
792 could calculate the new aspect ratio manually, but |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
793 <application>MEncoder</application> offers an option for <systemitem |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
794 class="library">libavcodec</systemitem> called <option>autoaspect</option> |
15010 | 795 that will do this for you. Absolutely do not scale this video up in order to |
13523 | 796 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
|
797 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
|
798 the AVI to determine the correct resolution. |
15010 | 799 Unfortunately, not all players enforce this auto-scaling information, |
800 therefore you may still want to rescale. | |
801 </para> | |
802 | |
803 <para> | |
804 First, you should compute the encoded aspect ratio: | |
15131
3f01fef97002
Fix HTML generation, <equation> is more elaborate in most DTDs.
diego
parents:
15129
diff
changeset
|
805 <systemitem>ARc = (Wc x (ARa / PRdvd )) / Hc</systemitem> |
15010 | 806 <itemizedlist> |
807 <title>where:</title> | |
808 <listitem><para> | |
809 Wc and Hc are the width and height of the cropped video, | |
810 </para></listitem> | |
811 <listitem><para> | |
812 PRdvd is the pixel ratio of the DVD wich is equal to 1.25=(720/576) for PAL, | |
813 </para></listitem> | |
814 <listitem><para> | |
815 DVDs and 1.5=(720/480) for NTSC DVDs, | |
816 </para></listitem> | |
817 </itemizedlist> | |
818 </para> | |
819 | |
820 <para> | |
821 Then, you can compute the X and Y resolution, according to a certain | |
822 Compression Quality (CQ) factor: | |
15131
3f01fef97002
Fix HTML generation, <equation> is more elaborate in most DTDs.
diego
parents:
15129
diff
changeset
|
823 <systemitem>ResY = INT(SQRT( 1000*Bitrate/25/ARc/CQ )/16) * 16</systemitem> |
3f01fef97002
Fix HTML generation, <equation> is more elaborate in most DTDs.
diego
parents:
15129
diff
changeset
|
824 <systemitem>ResX = INT( ResY * ARc / 16) * 16</systemitem> |
15010 | 825 </para> |
826 | |
827 <para> | |
828 Okay, but what is the CQ? | |
829 The CQ represents the number of bits per pixel and per frame of the encode. | |
830 Roughly speaking, the greater the CQ, the less the likelihood to see | |
831 encoding artifacts. | |
832 However, if you have a target size for your movie (1 or 2 CDs for instance), | |
833 there's a limited total number of bits that you can spend; therefore it's | |
834 necessary to find a good tradeoff between compressibility and quality. | |
15113
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
835 </para> |
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
836 |
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
837 <para> |
15010 | 838 The CQ depends both on the bitrate and the movie resolution. |
15034 | 839 In order to raise the CQ, typically you'd downscale the movie given that the |
15010 | 840 bitrate is computed in function of the target size and the length of the |
841 movie, which are constant. | |
842 A CQ below 0.18 usually ends up in a very blocky picture, because there | |
843 aren't enough bits to code the information of each macroblock (MPEG4, like | |
844 many other codecs, groups pixels by blocks of several pixels to compress the | |
15034 | 845 image; if there aren't enough bits, the edges of those blocks are |
15010 | 846 visible). |
847 It's therefore wise to take a CQ ranging from 0.20 to 0.22 for a 1 CD rip, | |
848 and 0.26-0.28 for 2 CDs. | |
15113
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
849 </para> |
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
850 |
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
851 <para> |
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
852 Please take note that the CQ is just an indicative figure, as depending on |
15010 | 853 the encoded content, a CQ of 0.18 may look just fine for a Bergman, contrary |
854 to a movie such as The Matrix, which contains many high-motion scenes. | |
15034 | 855 On the other hand, it's worthless to raise CQ higher than 0.30 as you'd |
15010 | 856 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
|
857 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
858 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
859 </sect2> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
860 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
861 <sect2 id="menc-feat-dvd-mpeg4-audio"> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
862 <title>Audio</title> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
863 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
864 <para> |
15010 | 865 Audio is a much simpler problem to solve: if you care about quality, just |
866 leave it as is. | |
867 Even AC3 5.1 streams are at most 448Kbit/s, and they're worth every bit. | |
15034 | 868 You might be tempted to transcode the audio to high quality Vorbis, but |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
869 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
|
870 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
|
871 preserving the AC3 stream. |
15010 | 872 You can keep the AC3 stream either by copying it directly into the video |
873 stream <link linkend="menc-feat-mpeg4">during the encoding</link>. | |
874 You can also extract the AC3 stream in order to mux it into containers such | |
875 as NUT, Matroska or OGM. | |
15139 | 876 <screen>mplayer <replaceable>source_file.vob</replaceable> -aid 129 -dumpaudio -dumpfile <replaceable>sound.ac3</replaceable></screen> |
15010 | 877 will dump into the file sound.ac3 the audio track number 129 from the file |
878 source_file.vob (NB: DVD VOB files usually use a different audio numbering, | |
15034 | 879 which means that the VOB audio track 129 is the 2nd audio track of the file). |
15010 | 880 </para> |
881 | |
882 <para> | |
883 But sometimes you truly have no choice but to further compress the | |
884 sound so that more bits can be spent on the video. | |
15034 | 885 Most people choose to compress audio with either MP3 or Vorbis audio |
15010 | 886 codecs. |
887 While the latter is a very space-efficient codec, MP3 is better supported | |
888 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
|
889 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
890 |
15010 | 891 <para> |
892 First of all, you will have to convert the DVD sound into a WAV file that the | |
893 audio codec can use as input. | |
894 For example: | |
15139 | 895 <screen>mplayer <replaceable>source_file.vob</replaceable> -ao pcm:file=<replaceable>destination_sound.wav</replaceable> -vc dummy -aid 1 -vo null</screen> |
15010 | 896 will dump the second audio track from the file source_file.vob into the file |
897 destination_sound.wav. | |
898 You may want to normalize the sound before encoding, as DVD audio tracks | |
899 are commonly recorded at low volumes. | |
900 You can use the tool <application>normalize</application> for instance, | |
15031
d377a597dc28
Fixes better wording. Suggestions by The Wanderer and Josh Varner.
gpoirier
parents:
15029
diff
changeset
|
901 which is available in most distributions. |
d377a597dc28
Fixes better wording. Suggestions by The Wanderer and Josh Varner.
gpoirier
parents:
15029
diff
changeset
|
902 If you're using Windows, a tool such as <application>BeSweet</application> |
d377a597dc28
Fixes better wording. Suggestions by The Wanderer and Josh Varner.
gpoirier
parents:
15029
diff
changeset
|
903 can do the same job. |
15034 | 904 You will compress in either Vorbis or MP3. |
15010 | 905 For example: |
15139 | 906 <screen>oggenc -q1 <replaceable>destination_sound.wav</replaceable></screen> |
15010 | 907 will encode destination_sound.wav with the encoding quality 1, which is |
908 roughly equivalent to 80Kb/s, and is the minimum quality at which you | |
909 should encode if you care about quality. | |
15113
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
910 Please note that MEncoder currently cannot mux Vorbis audio tracks |
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
911 into the output file because it only supports AVI and MPEG |
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
912 containers as an output, each of which may lead to audio/video |
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
913 playback synchronization problems with some players when the AVI file |
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
914 contain VBR audio streams such as Vorbis. |
15010 | 915 Don't worry, this document will show you how you can do that with third |
916 party programs. | |
917 </para> | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
918 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
919 </sect2> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
920 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
921 <sect2 id="menc-feat-dvd-mpeg4-interlacing"> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
922 <title>Interlacing and Telecine</title> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
923 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
924 <para> |
14958 | 925 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
|
926 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
|
927 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
|
928 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
|
929 process), and, naively described, it works by slowing the film down to |
14958 | 930 24000/1001 fps, and repeating every fourth frame. |
11780 | 931 </para> |
932 | |
933 <para> | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
934 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
|
935 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
|
936 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
|
937 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
|
938 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
|
939 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
|
940 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
|
941 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
|
942 </para> |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
943 |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
944 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
945 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
|
946 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
|
947 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
|
948 apply inverse telecine. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
949 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
950 |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
951 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
952 For movies shot at 24 fps, the video on the NTSC DVD is either telecined |
14958 | 953 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
|
954 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
|
955 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
|
956 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
|
957 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
|
958 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
959 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
960 <para> |
14734 | 961 It's highly recommended that you read the section on |
962 <link linkend="menc-feat-telecine">How to deal with telecine and interlacing in NTSC DVDs</link> | |
963 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
|
964 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
965 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
966 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
967 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
|
968 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
|
969 use the <option>pullup</option> filter <option>-vf |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
970 pullup,softskip</option>. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
971 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
972 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
973 </sect2> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
974 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
975 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
976 <sect2 id="menc-feat-dvd-mpeg4-filtering"> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
977 <title>Filtering</title> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
978 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
979 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
980 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
|
981 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
|
982 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
|
983 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
|
984 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
|
985 trade bits for quality. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
986 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
987 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
988 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
989 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
|
990 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
|
991 be done on playback only. |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
992 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
993 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
994 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
995 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
|
996 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
|
997 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
|
998 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
|
999 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
|
1000 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
|
1001 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
|
1002 (<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
|
1003 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
|
1004 </para> |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1005 |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1006 </sect2> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1007 |
15113
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
1008 <sect2 id="menc-feat-dvd-mpeg4-lavc-encoding-options"> |
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
1009 <title>Encoding options of libavcodec</title> |
15010 | 1010 |
1011 <para> | |
1012 Ideally, you'd probably want to be able to just tell the encoder to switch | |
1013 into "high quality" mode and move on. | |
1014 That would probably be nice, but unfortunately hard to implement as different | |
15034 | 1015 encoding options yield different quality results depending on the source material. |
15031
d377a597dc28
Fixes better wording. Suggestions by The Wanderer and Josh Varner.
gpoirier
parents:
15029
diff
changeset
|
1016 That's because compression depends on the visual properties of the video |
d377a597dc28
Fixes better wording. Suggestions by The Wanderer and Josh Varner.
gpoirier
parents:
15029
diff
changeset
|
1017 in question. |
d377a597dc28
Fixes better wording. Suggestions by The Wanderer and Josh Varner.
gpoirier
parents:
15029
diff
changeset
|
1018 For example, anime and live action have very different properties and |
d377a597dc28
Fixes better wording. Suggestions by The Wanderer and Josh Varner.
gpoirier
parents:
15029
diff
changeset
|
1019 thus require different options to obtain optimum encoding. |
15010 | 1020 The good news is that some options should never be left out, like |
1021 <option>mbd=2</option>, <option>trell</option>, and <option>v4mv</option>. | |
15034 | 1022 See below for a detailed description of common encoding options. |
15010 | 1023 </para> |
1024 | |
1025 | |
1026 <itemizedlist> | |
1027 <title>Options to adjust:</title> | |
1028 <listitem><para> | |
1029 <emphasis role="bold">vmax_b_frames</emphasis>: 1 or 2 is good, depending on | |
1030 the movie. | |
1031 Note that libavcodec does not yet support closed GOP (the option | |
1032 <option>cgop</option> doesn't currently work), so DivX5 won't be able to | |
1033 decode anything encoded with B-frames. | |
1034 </para></listitem> | |
1035 | |
1036 <listitem><para> | |
1037 <emphasis role="bold">vb_strategy=1</emphasis>: helps in high-motion scenes. | |
1038 Requires vmax_b_frames >= 2. | |
1039 On some videos, vmax_b_frames may hurt quality, but vmax_b_frames=2 along | |
1040 with vb_strategy=1 helps. | |
1041 </para></listitem> | |
1042 | |
1043 <listitem><para> | |
1044 <emphasis role="bold">dia</emphasis>: motion search range. Bigger is better | |
1045 and slower. | |
1046 Negative values are a completely different scale. | |
1047 Good values are -1 for a fast encode, or 2-4 for slower. | |
1048 </para></listitem> | |
1049 | |
1050 <listitem><para> | |
1051 <emphasis role="bold">predia</emphasis>: motion search pre-pass. | |
1052 Not as important as dia. Good values are 1 (default) to 4. Requires preme=2 | |
1053 to really be useful. | |
1054 </para></listitem> | |
1055 | |
1056 <listitem><para> | |
1057 <emphasis role="bold">cmp, subcmp, precmp</emphasis>: Comparison function for | |
1058 motion estimation. | |
1059 Experiment with values of 0 (default), 2 (hadamard), 3 (dct), and 6 (rate | |
1060 distortion). | |
1061 0 is fastest, and sufficient for precmp. | |
1062 For cmp and subcmp, 2 is good for anime, and 3 is good for live action. | |
1063 6 may or may not be slightly better, but is slow. | |
1064 </para></listitem> | |
1065 | |
1066 <listitem><para> | |
1067 <emphasis role="bold">last_pred</emphasis>: Number of motion predictors to | |
1068 take from the previous frame. | |
1069 1-3 or so help at little speed cost. | |
1070 Higher values are slow for no extra gain. | |
1071 </para></listitem> | |
1072 | |
1073 <listitem><para> | |
1074 <emphasis role="bold">cbp, mv0</emphasis>: Controls the selection of macroblocks. | |
1075 Small speed cost for small quality gain. | |
1076 </para></listitem> | |
1077 | |
1078 <listitem><para> | |
1079 <emphasis role="bold">qprd</emphasis>: adaptive quantization based on the | |
1080 macroblock's complexity. | |
1081 May help or hurt depending on the video and other options. | |
1082 This can cause artifacts unless you set vqmax to some reasonably small value | |
1083 (6 is good, maybe as low as 4); vqmin=1 should also help. | |
1084 </para></listitem> | |
1085 | |
1086 <listitem><para> | |
1087 <emphasis role="bold">qns</emphasis>: very slow, especially when combined | |
1088 with qprd. | |
15031
d377a597dc28
Fixes better wording. Suggestions by The Wanderer and Josh Varner.
gpoirier
parents:
15029
diff
changeset
|
1089 This option will make the encoder minimize noise due to compression |
15038 | 1090 artifacts instead of making the encoded video strictly match the source. |
15010 | 1091 Don't use this unless you've already tweaked everything else as far as it |
1092 will go and the results still aren't good enough. | |
1093 </para></listitem> | |
1094 | |
1095 <listitem><para> | |
1096 <emphasis role="bold">vqcomp</emphasis>: Tweak ratecontrol. | |
1097 What values are good depends on the movie. | |
1098 You can safely leave this alone if you want. | |
1099 Reducing vqcomp puts more bits on low-complexity scenes, increasing it puts | |
1100 them on high-complexity scenes (default: 0.5, range: 0-1. recommended range: | |
1101 0.5-0.7). | |
1102 </para></listitem> | |
1103 | |
1104 <listitem><para> | |
1105 <emphasis role="bold">vlelim, vcelim</emphasis>: Sets the single coefficient | |
1106 elimination threshold for luminance and chroma planes. | |
1107 These are encoded separately in all MPEG-like algorithms. | |
1108 The idea behind these options is to use some good heuristics to determine | |
1109 when the change in a block is less than the threshold you specify, and in | |
1110 such a case, to just encode the block as "no change". | |
1111 This saves bits and perhaps speeds up encoding. vlelim=-4 and vcelim=9 | |
15034 | 1112 seem to be good for live movies, but seem not to help with anime; |
15010 | 1113 when encoding animation, you should probably leave them unchanged. |
1114 </para></listitem> | |
1115 | |
1116 <listitem><para> | |
1117 <emphasis role="bold">qpel</emphasis>: Quarter pixel motion estimation. | |
15034 | 1118 MPEG-4 uses half pixel precision for its motion search by default, |
15010 | 1119 therefore this option comes with an overhead as more information will be |
1120 stored in the encoded file. | |
1121 The compression gain/loss depends on the movie, but it's usually not very | |
1122 effective on anime. | |
15034 | 1123 qpel always incurs a significant cost in CPU decode time (+20% in |
15010 | 1124 practice). |
1125 </para></listitem> | |
1126 | |
1127 <listitem><para> | |
1128 <emphasis role="bold">psnr</emphasis>: doesn't affect the actual encoding, | |
1129 but writes a log file giving the type/size/quality of each frame, and | |
15034 | 1130 prints a summary of PSNR (Peak Signal to Noise Ratio) at the end. |
15010 | 1131 </para></listitem> |
1132 | |
1133 </itemizedlist> | |
1134 | |
1135 <itemizedlist> | |
1136 <title>Options not recommended to play with:</title> | |
1137 <listitem><para> | |
1138 <emphasis role="bold">vme</emphasis>: The default is best. | |
1139 </para></listitem> | |
1140 | |
1141 <listitem><para> | |
1142 <emphasis role="bold">lumi_mask, dark_mask</emphasis>: Psychovisual adaptive | |
1143 quantization. | |
1144 You don't want to play with those options if you care about quality. | |
15031
d377a597dc28
Fixes better wording. Suggestions by The Wanderer and Josh Varner.
gpoirier
parents:
15029
diff
changeset
|
1145 Reasonable values may be effective in your case, but be warned this is very |
15010 | 1146 subjective. |
1147 </para></listitem> | |
1148 | |
1149 <listitem><para> | |
1150 <emphasis role="bold">scplx_mask</emphasis>: Tries to prevent blocky | |
1151 artifacts, but postprocessing is better. | |
1152 </para></listitem> | |
1153 </itemizedlist> | |
1154 | |
1155 </sect2> | |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1156 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1157 <sect2 id="menc-feat-dvd-mpeg4-example"> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1158 <title>Example</title> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1159 |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1160 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1161 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
|
1162 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
|
1163 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
|
1164 so it's NTSC. The example below will still apply to PAL, except you'll |
14958 | 1165 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
|
1166 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
|
1167 different. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1168 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1169 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1170 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1171 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
|
1172 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
|
1173 with telecine and interlacing in NTSC DVDs</link> and discover that it's |
14958 | 1174 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
|
1175 telecine filter, such as <option>pullup</option> or |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1176 <option>filmdint</option>. |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1177 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1178 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1179 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1180 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
|
1181 cropdetect filter: |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1182 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1183 <screen>mplayer dvd://1 -vf cropdetect</screen> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1184 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1185 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
|
1186 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
|
1187 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1188 <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
|
1189 |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1190 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
|
1191 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1192 <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
|
1193 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1194 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
|
1195 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
|
1196 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
|
1197 multiple of 16 lower than 362 is 352. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1198 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1199 |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1200 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1201 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
|
1202 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
|
1203 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
|
1204 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
|
1205 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
|
1206 4 pixels: |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1207 |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1208 <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
|
1209 |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1210 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
|
1211 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
|
1212 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
|
1213 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
|
1214 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
|
1215 (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
|
1216 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
|
1217 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1218 |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1219 <para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1220 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
|
1221 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
|
1222 The filter chain would look like: |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1223 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1224 <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
|
1225 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1226 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
|
1227 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
|
1228 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
|
1229 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
|
1230 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
|
1231 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
|
1232 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
|
1233 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1234 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1235 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1236 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
|
1237 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
|
1238 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1239 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1240 <para> |
14422 | 1241 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
|
1242 |
14958 | 1243 <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
|
1244 -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
|
1245 -o Harry_Potter_2.avi</screen> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1246 |
14422 | 1247 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
|
1248 |
14958 | 1249 <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
|
1250 -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
|
1251 -o Harry_Potter_2.avi</screen> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1252 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1253 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1254 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1255 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
|
1256 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
|
1257 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
|
1258 <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
|
1259 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
|
1260 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
|
1261 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
|
1262 source material. For example, if you find |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1263 <systemitem class="library">libavcodec</systemitem> produces too much |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1264 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
|
1265 comparison function via <option>*cmp=10</option>. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1266 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1267 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1268 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1269 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
|
1270 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
|
1271 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
|
1272 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
|
1273 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
|
1274 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
|
1275 free to experiment until you're happy. |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1276 </para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1277 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1278 <para> |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1279 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
|
1280 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
|
1281 <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
|
1282 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
|
1283 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
|
1284 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
|
1285 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
|
1286 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
|
1287 |
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1288 <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
|
1289 |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1290 </para> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1291 </sect2> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1292 |
15148
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1293 <sect2 id="menc-feat-dvd-mpeg4-muxing"> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1294 <title>Muxing</title> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1295 <para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1296 Now that you have encoded your video, you will most likely want |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1297 to mux it with one or more audio tracks into a movie container, such |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1298 as AVI, Matroska or NUT. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1299 <application>MEncoder</application> is currently only able to output |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1300 audio and video into MPEG and AVI container formats. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1301 for example: |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1302 <screen>mencoder -oac copy -ovc copy -o <replaceable>output_movie.avi</replaceable> -audiofile <replaceable>input_audio.mp2</replaceable> <replaceable>input_video.avi</replaceable></screen> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1303 This would merge the video file <replaceable>input_video.avi</replaceable> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1304 and the audio file <replaceable>input_audio.mp2</replaceable> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1305 into the AVI file <replaceable>output_movie.avi</replaceable>. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1306 This command works with MPEG-1 layer I, II and III (more commonly known |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1307 as MP3) audio, WAV and a few other audio formats too. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1308 </para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1309 |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1310 <para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1311 MEncoder features experimental support for |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1312 <systemitem class="library">libavformat</systemitem>, which is a |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1313 library from the FFmpeg project that supports muxing and demuxing |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1314 a variety of containers. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1315 For example: |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1316 <screen>mencoder -oac copy -ovc copy -o <replaceable>output_movie.asf</replaceable> -audiofile <replaceable>input_audio.mp2</replaceable> <replaceable>input_video.avi</replaceable> -of lavf -lavfopts format=asf</screen> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1317 This will do the same thing as the previous example, except that |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1318 the output container will be ASF. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1319 Please note that this support is highly experimental (but getting |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1320 better every day), and will only work if you compiled |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1321 <application>MPlayer</application> with the support for |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1322 <systemitem class="library">libavformat</systemitem> enabled (which |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1323 means that a pre-packaged binary version will not work in most cases). |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1324 </para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1325 |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1326 <sect3 id="menc-feat-dvd-mpeg4-muxing-avi-limitations"> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1327 <title>Limitations of the AVI container</title> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1328 <para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1329 Although it is the most widely-supported container format after MPEG-1, |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1330 AVI also has some major drawbacks. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1331 Perhaps the most obvious is the overhead. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1332 For each chunk of the AVI file, 24 bytes are wasted on headers and |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1333 index. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1334 This translates into a little over 5 MB per hour, or 1-2.5% |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1335 overhead for a 700 MB movie. This may not seem like much, but it could |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1336 mean the difference between being able to use 700 kbit/sec video or |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1337 714 kbit/sec, and every bit of quality counts. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1338 </para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1339 |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1340 <para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1341 In addition this gross inefficiency, AVI also has the following major |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1342 limitations: |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1343 </para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1344 |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1345 <orderedlist> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1346 <listitem> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1347 <para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1348 Only fixed-fps content can be stored. This is particularly limiting |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1349 if the original material you want to encode is mixed content, for |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1350 example a mix of NTSC video and film material. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1351 Actually there are hacks that can be used to store mixed-framerate |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1352 content in AVI, but they increase the (already huge) overhead |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1353 fivefold or more and so are not practical. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1354 </para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1355 </listitem> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1356 <listitem> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1357 <para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1358 Audio in AVI files must be either constant-bitrate (CBR) or |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1359 constant-framesize (i.e. all frames decode to the same number of |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1360 samples). |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1361 Unfortunately, the most efficient codec, Vorbis, does not meet |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1362 either of these requirements. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1363 Therefore, if you plan to store your movie in AVI, you'll have to |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1364 use a less efficient codec such as MP3 or AC3. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1365 </para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1366 </listitem> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1367 </orderedlist> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1368 |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1369 <para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1370 Having said all that, <application>MEncoder</application> does not |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1371 currently support variable-fps output or Vorbis encoding. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1372 Therefore, you may not see these as limitations if |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1373 <application>MEncoder</application> is the |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1374 only tool you will be using to produce your encodes. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1375 However, it is possible to use <application>MEncoder</application> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1376 only for video encoding, and then use external tools to encode |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1377 audio and mux it into another container format. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1378 </para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1379 </sect3> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1380 |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1381 <sect3 id="menc-feat-dvd-mpeg4-muxing-matroska"> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1382 <title>Muxing into the Matroska container</title> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1383 <para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1384 The Matroska is a free, open standard container format, aiming |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1385 to offer a lot of advanced features, which older containers |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1386 like AVI cannot handle. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1387 For example, Matroska supports variable bitrate audio content |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1388 (VBR), variable framerates (VFR), chapters, file attachments, |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1389 error detection (EDC) and modern A/V Codecs like "advanced audio |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1390 coding" (AAC), "Vorbis" or "MPEG-4 AVC" (H.264), next to nothing |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1391 handled by AVI. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1392 </para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1393 |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1394 <para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1395 The tools required to create Matroska files are collectively called |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1396 <application>mkvtoolnix</application>, and are available for most |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1397 Unix platforms as well as <application>Windows</application>. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1398 Given that Matroska is an open standard, you may find other |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1399 tools that suit you better, but since mkvtoolnix is the most |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1400 common, and is supported by the Matroska team itself, we will |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1401 only cover its usage. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1402 </para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1403 |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1404 <para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1405 Probably the easiest way to get started with Matroska is to use |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1406 <application>MMG</application>, the graphical frontend shipped with |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1407 <application>mkvtoolnix</application>, and follow the |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1408 <ulink url="http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvmerge-gui.html">guide to mkvmerge GUI (mmg)</ulink> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1409 </para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1410 |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1411 <para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1412 You may also mux audio and video files using the command line: |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1413 <screen>mkvmerge -o <replaceable>output.mkv</replaceable> <replaceable>input_video.avi</replaceable> <replaceable>input_audio1.mp3</replaceable> <replaceable>input_audio2.ac3</replaceable></screen> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1414 This would merge the video file <replaceable>input_video.avi</replaceable> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1415 and the two audio files <replaceable>input_audio1.mp3</replaceable> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1416 and <replaceable>input_audio2.ac3</replaceable> into the Matroska |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1417 file <replaceable>output.mkv</replaceable>. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1418 Matroska, as mentioned earlier, is able to do much more than that, like |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1419 multiple audio tracks (including fine-tuning of audio/video |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1420 synchronization), chapters, subtitles, splitting, etc... |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1421 Please refer to the documentation of those applications for |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1422 more details. |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1423 </para> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1424 |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1425 </sect3> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1426 |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1427 </sect2> |
067f10ad6538
New section: "menc-feat-dvd-mpeg4-muxing" about how to mux a video
gpoirier
parents:
15139
diff
changeset
|
1428 |
11732
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1429 </sect1> |
d5784b575959
DVD ripping section added courtesy of Samuli K«£rkk«£inen with some
diego
parents:
11710
diff
changeset
|
1430 |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1431 <sect1 id="menc-feat-telecine"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1432 <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
|
1433 |
14958 | 1434 <sect2 id="menc-feat-telecine-intro"> |
1435 <title>Introduction</title> | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1436 <formalpara> |
14958 | 1437 <title>What is telecine?</title> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1438 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1439 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
|
1440 is written in this document: |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1441 <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
|
1442 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
|
1443 description of what telecine is. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1444 </para></formalpara> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1445 |
14958 | 1446 <formalpara> |
1447 <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
|
1448 <para> |
14958 | 1449 Many documents, including the guide linked above, refer to the fields |
1450 per second value of NTSC video as 59.94 and the corresponding frames | |
1451 per second values as 29.97 (for telecined and interlaced) and 23.976 | |
1452 (for progressive). For simplicity, some documents even round these | |
1453 numbers to 60, 30, and 24. | |
1454 </para></formalpara> | |
1455 | |
1456 <para> | |
1457 Strictly speaking, all those numbers are approximations. Black and | |
1458 white NTSC video was exactly 60 fields per second, but 60000/1001 | |
1459 was later chosen to accomodate color data while remaining compatible | |
1460 with contemporary black and white televisions. Digital NTSC video | |
1461 (such as on a DVD) is also 60000/1001 fields per second. From this, | |
1462 interlaced and telecined video are derived to be 30000/1001 frames | |
1463 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
|
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 <para> |
14958 | 1467 Older versions of the <application>MEncoder</application> documentation |
1468 and many archived mailing list posts refer to 59.94, 29.97, and 23.976. | |
1469 All <application>MEncoder</application> documentation has been updated | |
1470 to use the fractional values, and you should use them too. | |
1471 </para> | |
1472 | |
1473 <para> | |
1474 <option>-ofps 23.976</option> is incorrect. | |
1475 <option>-ofps 24000/1001</option> should be used instead. | |
1476 </para> | |
1477 | |
1478 <formalpara> | |
1479 <title>How telecine is used.</title> | |
1480 <para> | |
1481 All video intended to be displayed on an NTSC | |
1482 television set must be 60000/1001 fields per second. Made-for-TV movies | |
1483 and shows are often filmed directly at 60000/1001 fields per second, but | |
1484 the majority of cinema is filmed at 24 or 24000/1001 frames per | |
1485 second. When cinematic movie DVDs are mastered, the video is then | |
1486 converted for television using a process called telecine. | |
1487 </para></formalpara> | |
1488 | |
1489 <para> | |
1490 On a DVD, the video is never actually stored as 60000/1001 fields per | |
1491 second. For video that was originally 60000/1001, each pair of fields is | |
1492 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
|
1493 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
|
1494 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
|
1495 form the first field. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1496 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1497 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1498 <para> |
14958 | 1499 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
|
1500 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
|
1501 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
|
1502 <emphasis>before</emphasis> being stored on the DVD; even though it |
14958 | 1503 was originally 24000/1001 frames per second, it becomes 60000/1001 fields per |
1504 second. When it is stored on the DVD, pairs of fields are combined to form | |
1505 30000/1001 frames per second. | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1506 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1507 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1508 <para> |
14958 | 1509 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
|
1510 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
|
1511 wherever there is any motion, because one field (say, the |
14958 | 1512 even-numbered lines) represents a moment in time 1/(60000/1001) |
1513 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
|
1514 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
|
1515 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
|
1516 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1517 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1518 <itemizedlist> |
14958 | 1519 <title>Notes:</title> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1520 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1521 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
|
1522 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1523 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1524 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
|
1525 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
|
1526 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
|
1527 pertaining video category. How to make good DVD rips or fine-tune |
15113
a53b942816a5
Removes the section "menc-feat-fix-avi" as part of it was wrong and the other
gpoirier
parents:
15038
diff
changeset
|
1528 <systemitem class="library">libavcodec</systemitem> for maximal |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1529 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
|
1530 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1531 <listitem><para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1532 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
|
1533 <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
|
1534 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1535 </itemizedlist> |
14958 | 1536 </sect2> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1537 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1538 <sect2 id="menc-feat-telecine-ident"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1539 <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
|
1540 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1541 <sect3 id="menc-feat-telecine-ident-progressive"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1542 <title>Progressive</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1543 <para> |
14958 | 1544 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
|
1545 on the DVD without alteration. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1546 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1547 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1548 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1549 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
|
1550 <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
|
1551 soon as the movie begins to play: |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1552 |
14958 | 1553 <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
|
1554 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1555 From this point forward, demux_mpg should never say it finds |
14958 | 1556 "30000/1001 fps NTSC content." |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1557 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1558 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1559 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1560 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
|
1561 interlacing. Beware, however, because sometimes there is a tiny bit |
14734 | 1562 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
|
1563 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
|
1564 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
|
1565 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
|
1566 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
|
1567 entire movie: |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1568 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1569 <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
|
1570 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1571 Using <option>-benchmark</option> makes |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1572 <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
|
1573 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
|
1574 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
|
1575 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
|
1576 occurred. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1577 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1578 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1579 <para> |
14734 | 1580 Sometimes progressive video on DVDs is referred to as |
1581 "soft-telecine" because it is intended to | |
1582 be telecined by the DVD player. | |
11905
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 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1585 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1586 <sect3 id="menc-feat-telecine-ident-telecined"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1587 <title>Telecined</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1588 <para> |
14958 | 1589 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
|
1590 <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
|
1591 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1592 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1593 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1594 <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
|
1595 framerate changes when it plays telecined video. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1596 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1597 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1598 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1599 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
|
1600 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
|
1601 You can look closely at this by |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1602 <orderedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1603 <listitem> |
14734 | 1604 <screen>mplayer dvd://1</screen> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1605 </listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1606 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1607 Seek to a part with motion. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1608 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1609 <listitem><para> |
14734 | 1610 Use the <keycap>.</keycap> key to step forward one frame at a time. |
1611 </para></listitem> | |
1612 <listitem><para> | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1613 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
|
1614 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
|
1615 video is telecined. If you see some other pattern, then the video |
14734 | 1616 may have been telecined using some non-standard method; |
1617 <application>MEncoder</application> cannot losslessly convert | |
1618 non-standard telecine to progressive. If you don't see any | |
1619 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
|
1620 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1621 </orderedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1622 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1623 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1624 <para> |
14734 | 1625 Sometimes telecined video on DVDs is referred to as |
14958 | 1626 "hard-telecine". Since hard-telecine is already 60000/1001 fields |
14734 | 1627 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
|
1628 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1629 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1630 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1631 <sect3 id="menc-feat-telecine-ident-interlaced"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1632 <title>Interlaced</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1633 <para> |
14958 | 1634 Interlaced video was originally filmed at 60000/1001 fields per second, |
1635 and stored on the DVD as 30000/1001 frames per second. The interlacing effect | |
14734 | 1636 (often called "combing") is a result of combining pairs of |
14958 | 1637 fields into frames. Each field is supposed to be 1/(60000/1001) seconds apart, |
14734 | 1638 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
|
1639 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1640 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1641 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1642 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
|
1643 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
|
1644 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1645 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1646 <para> |
14734 | 1647 When you view an interlaced video closely by frame-stepping with the |
1648 <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
|
1649 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1650 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1651 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1652 <sect3 id="menc-feat-telecine-ident-mixedpt"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1653 <title>Mixed progressive and telecine</title> |
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 All of a "mixed progressive and telecine" video was originally |
14958 | 1656 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
|
1657 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1658 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1659 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1660 When <application>MPlayer</application> plays this category, it will |
14958 | 1661 (often repeatedly) switch back and forth between "30000/1001 fps NTSC" |
1662 and "24000/1001 fps progressive NTSC". Watch the bottom of | |
12578 | 1663 <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
|
1664 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1665 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1666 <para> |
14958 | 1667 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
|
1668 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
|
1669 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1670 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1671 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1672 <sect3 id="menc-feat-telecine-ident-mixedpi"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1673 <title>Mixed progressive and interlaced</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1674 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1675 In "mixed progressive and interlaced" content, progressive |
11913 | 1676 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
|
1677 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1678 |
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 This category looks just like "mixed progressive and telecine", |
14958 | 1681 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
|
1682 telecine pattern. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1683 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1684 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1685 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1686 </sect2> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1687 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1688 <sect2 id="menc-feat-telecine-encode"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1689 <title>How to encode each category</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1690 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1691 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
|
1692 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
|
1693 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
|
1694 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1695 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1696 <sect3 id="menc-feat-telecine-encode-progressive"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1697 <title>Progressive</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1698 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1699 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
|
1700 parameter you need to be sure to use is |
14958 | 1701 <option>-ofps 24000/1001</option>. Otherwise, <application>MEncoder</application> |
1702 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
|
1703 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1704 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1705 <para> |
14958 | 1706 <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
|
1707 </para> |
14734 | 1708 |
1709 <para> | |
1710 It is often the case, however, that a video that looks progressive | |
1711 actually has very short parts of telecine mixed in. Unless you are | |
1712 sure, it is safest to treat the video as | |
1713 <link linkend="menc-feat-telecine-encode-mixedpt">mixed progressive and telecine</link>. | |
1714 The performance loss is small | |
1715 <link linkend="menc-feat-telecine-footnotes">[3]</link>. | |
1716 </para> | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1717 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1718 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1719 <sect3 id="menc-feat-telecine-encode-telecined"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1720 <title>Telecined</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1721 <para> |
14958 | 1722 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
|
1723 using a process called inverse-telecine. |
14734 | 1724 <application>MPlayer</application> contains several filters to |
1725 accomplish this; the best filter, <option>pullup</option>, is described | |
1726 in the <link linkend="menc-feat-telecine-encode-mixedpt">mixed | |
1727 progressive and telecine</link> section. | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1728 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1729 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1730 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1731 <sect3 id="menc-feat-telecine-encode-interlaced"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1732 <title>Interlaced</title> |
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 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
|
1735 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
|
1736 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
|
1737 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
|
1738 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
|
1739 3). |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1740 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1741 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1742 <orderedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1743 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1744 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1745 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
|
1746 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
|
1747 <systemitem class="library">libavcodec</systemitem> has two |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1748 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
|
1749 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
|
1750 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
|
1751 <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
|
1752 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
|
1753 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
|
1754 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1755 <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
|
1756 </para></listitem> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1757 <listitem><para> |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1758 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
|
1759 these filters available to choose from, each with its own advantages |
11913 | 1760 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
|
1761 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
|
1762 <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
|
1763 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
|
1764 various filters. Again, the framerate is not changing, so no |
11913 | 1765 <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
|
1766 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
|
1767 before scaling. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1768 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1769 <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
|
1770 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1771 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1772 Unfortunately, this option is buggy with |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1773 <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
|
1774 <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
|
1775 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
|
1776 tfields</option> is to create a full frame out of each field, which |
14958 | 1777 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
|
1778 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
|
1779 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
|
1780 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
|
1781 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
|
1782 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
|
1783 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
|
1784 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
|
1785 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
|
1786 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
|
1787 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
|
1788 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
|
1789 <option>tfields</option> you |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1790 <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
|
1791 <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
|
1792 framerate of your original source. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1793 |
14958 | 1794 <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
|
1795 </para></listitem> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1796 <listitem><para> |
14734 | 1797 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
|
1798 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
|
1799 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
|
1800 original, the loss won't matter much. The result will be a |
14958 | 1801 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
|
1802 <option>-vf field</option>, then crop |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1803 <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
|
1804 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
|
1805 compensate for the vertical resolution being halved. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1806 <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
|
1807 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1808 </orderedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1809 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1810 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1811 <sect3 id="menc-feat-telecine-encode-mixedpt"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1812 <title>Mixed progressive and telecine</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1813 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1814 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
|
1815 progressive video, the telecined parts have to be |
14734 | 1816 inverse-telecined. There are three ways to accomplish this, |
1817 described below. Note that you should | |
1818 <emphasis role="bold">always</emphasis> inverse-telecine before any | |
1819 rescaling; unless you really know what you're doing, | |
1820 inverse-telecine before cropping, too | |
1821 <link linkend="menc-feat-telecine-footnotes">[1]</link>. | |
14958 | 1822 <option>-ofps 24000/1001</option> is needed here because the output video |
1823 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
|
1824 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1825 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1826 <itemizedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1827 <listitem><para> |
14734 | 1828 <option>-vf pullup</option> is designed to inverse-telecine |
1829 telecined material while leaving progressive data alone. In order to | |
1830 work properly, <option>pullup</option> <emphasis role="bold">must</emphasis> | |
1831 be followed by the <option>softskip</option> filter or | |
1832 else <application>MEncoder</application> will crash. | |
1833 <option>pullup</option> is, however, the cleanest and most | |
1834 accurate method available for encoding both telecine and | |
1835 "mixed progressive and telecine". | |
1836 | |
14958 | 1837 <screen>mencoder dvd://1 -nosound -vf pullup,softskip -ovc lavc -ofps 24000/1001</screen> |
14734 | 1838 </para> |
1839 | |
1840 | |
1841 </listitem> | |
1842 <listitem><para> | |
1843 An older method | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1844 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
|
1845 the non-telecined parts and then inverse-telecine the whole |
11913 | 1846 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
|
1847 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
|
1848 softpulldown with either <option>detc</option> or |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1849 <option>ivtc</option>, the final result will be entirely |
14958 | 1850 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
|
1851 |
14958 | 1852 <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
|
1853 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1854 </listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1855 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1856 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1857 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
|
1858 D Richard Felker III has to say: |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1859 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1860 <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
|
1861 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
|
1862 players & progressive TVs) which gives ugly flickering and |
15010 | 1863 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
|
1864 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
|
1865 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
|
1866 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1867 </itemizedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1868 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1869 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1870 <sect3 id="menc-feat-telecine-encode-mixedpi"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1871 <title>Mixed progressive and interlaced</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1872 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1873 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
|
1874 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
|
1875 duration/location of each type. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1876 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1877 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1878 <itemizedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1879 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1880 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
|
1881 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
|
1882 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
|
1883 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
|
1884 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1885 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1886 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1887 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
|
1888 display the video on an interlaced device (with a TV card, for |
14958 | 1889 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
|
1890 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
|
1891 frames. Half of the interlaced "frames" will be displayed for three |
14958 | 1892 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
|
1893 "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
|
1894 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
|
1895 deinterlacing filter like <option>lb</option> or |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1896 <option>l5</option>. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1897 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1898 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1899 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1900 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
|
1901 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
|
1902 that can be more visible than with the second method, which shows |
14958 | 1903 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
|
1904 video is already a bit choppy because it really should be shown at |
14958 | 1905 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
|
1906 much. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1907 </para> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1908 |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1909 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1910 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
|
1911 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
|
1912 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
|
1913 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
|
1914 interlaced. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1915 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1916 </listitem> |
12758
250ce1b2ef8f
improved DVD ripping guide by Jason Tackaberry <tack@sault.org>
diego
parents:
12615
diff
changeset
|
1917 |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1918 <listitem><para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1919 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
|
1920 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
|
1921 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
|
1922 </para></listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1923 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1924 </itemizedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1925 </sect3> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1926 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1927 </sect2> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1928 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1929 <sect2 id="menc-feat-telecine-footnotes"> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1930 <title>Footnotes</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1931 <orderedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1932 <listitem><formalpara> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1933 <title>About cropping:</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1934 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1935 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
|
1936 video, luma ("brightness") and chroma ("color") |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1937 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
|
1938 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
|
1939 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
|
1940 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
|
1941 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
|
1942 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
|
1943 <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
|
1944 <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
|
1945 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1946 </formalpara> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1947 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1948 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1949 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
|
1950 bit more complicated. Instead of every four luma pixels in the |
11913 | 1951 <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
|
1952 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
|
1953 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
|
1954 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
|
1955 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
|
1956 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
|
1957 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
|
1958 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
|
1959 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
|
1960 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
|
1961 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1962 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1963 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1964 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
|
1965 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
|
1966 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
|
1967 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
|
1968 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
|
1969 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1970 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1971 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1972 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
|
1973 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
|
1974 field</option> before cropping. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1975 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1976 </listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1977 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1978 <listitem><formalpara> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1979 <title>About encoding parameters and quality:</title> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1980 <para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1981 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
|
1982 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
|
1983 <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
|
1984 <systemitem class="library">libavcodec</systemitem> options that |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1985 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
|
1986 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
|
1987 encoding). There are many other options to |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1988 <systemitem class="library">libavcodec</systemitem> that increase |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1989 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
|
1990 the scope of this document. |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1991 </para> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1992 </formalpara> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1993 </listitem> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
1994 |
14734 | 1995 <listitem><formalpara> |
1996 <title>About the performance of pullup:</title> | |
1997 <para> | |
1998 It is safe to use <option>pullup</option> (along with <option>softskip | |
1999 </option>) on progressive video, and is usually a good idea unless | |
2000 the source has been definitively verified to be entirely progressive. | |
2001 The performace loss is small for most cases. On a bare-minimum encode, | |
2002 <option>pullup</option> causes <application>MEncoder</application> to | |
2003 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
|
2004 </option> overshadows that difference, bringing the performance |
14734 | 2005 decrease of using <option>pullup</option> down to 2%. |
2006 </para> | |
2007 </formalpara> | |
2008 </listitem> | |
2009 | |
11905
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
2010 </orderedlist> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
2011 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
2012 </sect2> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
2013 |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
2014 </sect1> |
e1730b82a762
Telecine HOWTO by Corey Hickey <bugfood-ml@fatooh.org>, some modifications
diego
parents:
11823
diff
changeset
|
2015 |
9675 | 2016 </chapter> |