comparison DOCS/encoding.html @ 8260:352b654c7787

updates nvidia tv-out section etc
author gabucino
date Sat, 23 Nov 2002 21:56:41 +0000
parents 630360b15089
children 3f6029569733
comparison
equal deleted inserted replaced
8259:2ceab365858d 8260:352b654c7787
100 </UL> 100 </UL>
101 101
102 102
103 <H3><A NAME="rescaling">2.4.2 Rescaling movies</A></H3> 103 <H3><A NAME="rescaling">2.4.2 Rescaling movies</A></H3>
104 104
105 <P>Often the need to resize movie images' size emerges. Its reasons can be many, 105 <P>Often the need to resize movie images' size emerges. Its reasons can be
106 examples are decreasing output file size, encoding SVCDs to DivX. Ripped DVDs 106 many: decreasing file size, network bandwidth, etc. Most people
107 are mostly rescaled, for example a 4:3 DVD should be 640x480, especially 107 even do rescaling when converting DVDs or SVCDs to DivX AVI. <B>This is bad.</B>
108 when you want it to fit to 1 CD, and have good quality at the same time. 108 Instead of even you doing so, read the <A HREF="#aspect">Preserving
109 SVCDs have 480x480 size, and their header contains the aspect ratio the 109 aspect ratio</A> section.</P>
110 player should use (Ex.: 480x480 + 4:3 = 640x480). However when encoding to
111 AVI (DivX) files, you have be aware that AVI headers don't store this
112 value. Thus, the only solution is rescaling.</P>
113 110
114 <P>The scaling process is handled by the <I>'scale'</I> video filter: 111 <P>The scaling process is handled by the <I>'scale'</I> video filter:
115 <CODE>-vop scale=X:Y</CODE>. Its quality can be set with the 112 <CODE>-vop scale=widht:height</CODE>. Its quality can be set with the
116 <CODE>-sws</CODE> option. If it's not specified, MEncoder will use 0: 113 <CODE>-sws</CODE> option. If it's not specified, MEncoder will use 0:
117 fast bilinear.</P> 114 fast bilinear.</P>
118 115
119 <P>Usage:<BR> 116 <H5>Usage:</H5>
120 <CODE>&nbsp;&nbsp;&nbsp;&nbsp;mencoder sample-svcd.mpg -ovc lavc -lavcopts 117
121 vcodec=mpeg4:more_options -vop scale=640:480 -oac copy -o 118 <P><CODE>&nbsp;&nbsp;&nbsp;&nbsp;mencoder input.mpg -ovc lavc -lavcopts
122 output.avi</CODE></P> 119 vcodec=mpeg4:more_options -vop scale=640:480 -oac copy -o
120 output.avi</CODE></P>
123 121
124 122
125 <H3><A NAME="copying">2.4.3 Stream copying</A></H3> 123 <H3><A NAME="copying">2.4.3 Stream copying</A></H3>
126 124
127 <P>MEncoder can handle input streams in two ways: <B>encode</B> or 125 <P>MEncoder can handle input streams in two ways: <B>encode</B> or
266 &nbsp;&nbsp;<CODE>rm subtitles.idx subtitles.sub</CODE><BR> 264 &nbsp;&nbsp;<CODE>rm subtitles.idx subtitles.sub</CODE><BR>
267 &nbsp;&nbsp;<CODE>mencoder movie.mpg -ifo movie.ifo -vobsubout subtitles 265 &nbsp;&nbsp;<CODE>mencoder movie.mpg -ifo movie.ifo -vobsubout subtitles
268 -vobsuboutindex 0 -vobsuboutid fr -sid 1</CODE></P> 266 -vobsuboutindex 0 -vobsuboutid fr -sid 1</CODE></P>
269 267
270 268
269 <H3><A NAME="aspect">2.4.8 Preserving aspect ratio</A></H3>
270
271 <P>DVDs and SVCDs (i.e. MPEG1/2) files contain an aspect ratio value,
272 which describes how should the player scale the video stream, so humans
273 won't have egg heads (ex.: 480x480 + 4:3 = 640x480). However when encoding
274 to AVI (DivX) files, you have be aware that AVI headers don't store this
275 value. Rescaling the movie is disgusting and time consuming, there
276 must be a better feature!</P>
277
278 <P>There is.</P>
279
280 <P>MPEG4 has an unique feature: the video stream can contain
281 its needed aspect ratio. Yes, just like MPEG1/2 files (DVD, SVCD).
282 Regretfully, there are <U>no</U> video players outside which support this
283 attribute. Except MPlayer.</P>
284
285 <P>This feature can be used only with <B>libavcodec</B>'s <CODE>mpeg4</CODE>
286 codec. Keep in mind: although MPlayer will correctly play the created file,
287 other players will use the wrong aspect ratio.</P>
288
289 <P>You seriously should crop the black bands over and below the movie image.
290 See TODO.</P>
291
292 <H5>Usage:</H5>
293
294 <P><CODE>$ mencoder sample-svcd.mpg -ovc lavc -lavcopts
295 vcodec=mpeg4:aspect=16.0/9.0 -vop crop=714:548:0:14 -oac copy -o output.avi</CODE></P>
296
271 </BODY> 297 </BODY>
272 </HTML> 298 </HTML>